/* iPhone 16 Pro Silver · Liquid Glass doctor booking demo */
:root {
  --phone-w: 100%;
  --phone-aspect: 402 / 874;
  --bezel: 11px;
  --screen-radius: 48px;
  --outer-radius: 56px;
  --safe-top: 54px;
  --safe-bottom: 28px;
  --island-w: 126px;
  --island-h: 37px;

  --silver-1: #e8e9eb;
  --silver-2: #c8cacd;
  --silver-3: #9a9da3;
  --silver-4: #6e7178;

  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-edge: rgba(255, 255, 255, 0.9);
  --glass-shadow: 0 8px 32px rgba(20, 40, 70, 0.1);

  --ink: #1a2433;
  --muted: #5a6a7c;
  /* Uprock study palette — indigo/violet, not SoftSpot teal */
  --accent: #5c4d9e;
  --accent-soft: #6b5cb8;
  --accent-blue: #3b6fa0;
  --success: #2d8a6a;
  --danger: #c44b4b;

  --bg-top: #ddd8f0;
  --bg-mid: #e8e5f4;
  --bg-bot: #f2f0f8;

  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Segoe UI", "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  background: transparent;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

body {
  display: grid;
  place-items: center;
  overflow: hidden;
  line-height: 1.4;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

/* ——— iPhone 16 Pro Silver shell ——— */
.iphone-16-pro {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0 auto;
}

.phone-bezel {
  position: absolute;
  inset: 0;
  border-radius: var(--outer-radius);
  background:
    linear-gradient(145deg, #f4f5f6 0%, var(--silver-1) 18%, var(--silver-2) 42%, var(--silver-3) 68%, var(--silver-2) 88%, #f0f1f2 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.85),
    inset 0 -1px 2px rgba(80, 85, 95, 0.35),
    0 18px 40px rgba(30, 40, 55, 0.22);
  z-index: 0;
}

.bezel-shine {
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--outer-radius) - 1px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.45), transparent 28%, transparent 72%, rgba(0, 0, 0, 0.08));
  pointer-events: none;
}

.bezel-side {
  position: absolute;
  width: 3px;
  background: linear-gradient(180deg, #d0d2d6, #8e9198);
  border-radius: 2px;
}

.bezel-left {
  left: -1px;
  top: 22%;
  height: 12%;
  opacity: 0.55;
}

.bezel-right {
  right: -1px;
  top: 28%;
  height: 10%;
  opacity: 0.45;
}

.bezel-button {
  position: absolute;
  background: linear-gradient(90deg, #b8bbc1, #e4e5e8 40%, #9a9da4);
  border-radius: 2px;
  box-shadow: inset 0 0 1px rgba(255, 255, 255, 0.6);
}

.bezel-silent {
  left: -2.5px;
  top: 118px;
  width: 3px;
  height: 28px;
}

.bezel-vol-up {
  left: -2.5px;
  top: 168px;
  width: 3px;
  height: 52px;
}

.bezel-vol-down {
  left: -2.5px;
  top: 230px;
  width: 3px;
  height: 52px;
}

.bezel-power {
  right: -2.5px;
  top: 200px;
  width: 3px;
  height: 88px;
}

.phone-screen {
  position: absolute;
  inset: var(--bezel);
  border-radius: var(--screen-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 1;
  background:
    radial-gradient(ellipse 120% 60% at 50% -10%, rgba(255, 255, 255, 0.7), transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 30%, rgba(107, 92, 184, 0.35), transparent 50%),
    radial-gradient(ellipse 70% 40% at 0% 70%, rgba(59, 111, 160, 0.18), transparent 45%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 38%, var(--bg-bot) 100%);
  isolation: isolate;
}

/* Status bar + Dynamic Island */
.status-bar {
  position: relative;
  z-index: 10;
  height: var(--safe-top);
  min-height: var(--safe-top);
  padding: 12px 22px 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  flex-shrink: 0;
  color: var(--ink);
  pointer-events: none;
}

.status-time {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  padding-top: 2px;
  padding-left: 6px;
}

.dynamic-island {
  width: var(--island-w);
  height: var(--island-h);
  background: #0a0a0c;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 12px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.island-camera {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2a3a55, #0c1220 70%);
  box-shadow: inset 0 0 2px rgba(100, 140, 200, 0.35);
}

.status-icons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  padding-top: 4px;
  padding-right: 2px;
  height: var(--island-h);
}

.status-icons svg {
  display: block;
  flex-shrink: 0;
}

/* App chrome */
.app-nav {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 4px 14px 10px;
  flex-shrink: 0;
  z-index: 5;
}

.nav-titles {
  min-width: 0;
  text-align: center;
}

.nav-eyebrow {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.9;
}

.nav-titles h1 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-back {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--accent);
}

.nav-back[hidden] {
  visibility: hidden;
  pointer-events: none;
}

.nav-step {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  padding: 5px 9px;
  min-width: 40px;
  text-align: center;
}

.app-main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 14px 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.app-main::-webkit-scrollbar {
  display: none;
}

.app-footer {
  flex-shrink: 0;
  padding: 10px 14px calc(var(--safe-bottom) + 4px);
  z-index: 5;
}

.home-indicator {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--safe-bottom);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
  pointer-events: none;
  z-index: 12;
}

.home-indicator span {
  width: 118px;
  height: 4px;
  border-radius: 999px;
  background: rgba(20, 30, 45, 0.85);
}

/* Liquid glass primitives */
.glass {
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-edge);
}

.glass-strong {
  background: var(--glass-strong);
  backdrop-filter: blur(28px) saturate(1.5);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-edge);
}

.glass-btn {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: transform 0.15s ease, background 0.15s ease;
}

.glass-btn:active {
  transform: scale(0.96);
  background: rgba(255, 255, 255, 0.65);
}

.glass-chip {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.glass-bar {
  background: rgba(255, 255, 255, 0.48);
  backdrop-filter: blur(28px) saturate(1.5);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
  border-top: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 -8px 24px rgba(20, 40, 70, 0.06);
}

.btn {
  width: 100%;
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn.primary {
  color: #fff;
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--accent) 100%);
  box-shadow:
    0 8px 20px rgba(92, 77, 158, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(20, 80, 100, 0.2);
}

.btn.primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.btn.ghost {
  margin-top: 8px;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.lede {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
}

.hero-card {
  border-radius: 22px;
  padding: 18px 16px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), transparent 50%);
  pointer-events: none;
}

.hero-card h2 {
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
  position: relative;
}

.hero-card p {
  font-size: 13px;
  color: var(--muted);
  position: relative;
  max-width: 92%;
}

.search-glass {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.search-glass svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2px 0 10px;
}

.specialty-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.specialty-tile {
  border-radius: 18px;
  padding: 14px 12px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 88px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.specialty-tile:active {
  transform: scale(0.97);
}

.specialty-tile.selected {
  outline: 2px solid rgba(92, 77, 158, 0.5);
  outline-offset: 0;
  box-shadow: 0 8px 24px rgba(92, 77, 158, 0.18);
}

.specialty-tile .tile-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 18px;
  background: rgba(255, 255, 255, 0.65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.specialty-tile .tile-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.specialty-tile .tile-meta {
  font-size: 11px;
  color: var(--muted);
}

.chip-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.chip-row::-webkit-scrollbar {
  display: none;
}

.chip {
  flex-shrink: 0;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 650;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  white-space: nowrap;
}

.chip.active {
  color: #fff;
  background: linear-gradient(180deg, var(--accent-soft), var(--accent));
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(92, 77, 158, 0.3);
}

.doctor-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doctor-card {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  text-align: left;
  border-radius: 18px;
  padding: 12px;
  transition: transform 0.15s ease;
}

.doctor-card:active {
  transform: scale(0.985);
}

.doctor-card.selected {
  outline: 2px solid rgba(92, 77, 158, 0.45);
  outline-offset: 0;
}

.doctor-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 750;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.doctor-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.doctor-meta {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.doctor-rating {
  font-size: 13px;
  font-weight: 700;
  text-align: right;
  color: var(--ink);
}

.doctor-rating span {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 2px;
}

.profile-hero {
  border-radius: 22px;
  padding: 18px;
  margin-bottom: 14px;
  text-align: center;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 750;
  color: #fff;
}

.profile-hero h2 {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.profile-hero p {
  font-size: 13px;
  color: var(--muted);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.stat-pill {
  border-radius: 16px;
  padding: 12px 8px;
  text-align: center;
}

.stat-pill strong {
  display: block;
  font-size: 15px;
  font-weight: 750;
}

.stat-pill span {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.day-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.day-btn {
  border-radius: 14px;
  padding: 10px 4px;
  text-align: center;
  transition: transform 0.12s ease;
}

.day-btn:active:not(:disabled) {
  transform: scale(0.96);
}

.day-btn.selected {
  background: linear-gradient(180deg, var(--accent-soft), var(--accent)) !important;
  border-color: transparent !important;
  color: #fff;
  box-shadow: 0 6px 16px rgba(92, 77, 158, 0.28);
}

.day-btn.selected .day-weekday,
.day-btn.selected .day-date {
  color: #fff;
}

.day-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.day-weekday {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.day-date {
  display: block;
  font-size: 13px;
  font-weight: 750;
  margin-top: 3px;
  color: var(--ink);
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.slot-btn {
  border-radius: 12px;
  padding: 11px 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  transition: transform 0.12s ease;
}

.slot-btn:active {
  transform: scale(0.96);
}

.slot-btn.selected {
  color: #fff;
  background: linear-gradient(180deg, var(--accent-soft), var(--accent)) !important;
  border-color: transparent !important;
  box-shadow: 0 4px 12px rgba(92, 77, 158, 0.28);
}

.summary-card {
  border-radius: 18px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 12px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

.summary-row strong {
  color: var(--ink);
  text-align: right;
  font-weight: 650;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.field label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field textarea {
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(92, 77, 158, 0.45);
  box-shadow: 0 0 0 3px rgba(92, 77, 158, 0.12);
}

.field textarea {
  min-height: 72px;
  resize: none;
}

.success-panel {
  text-align: center;
  padding: 28px 8px 8px;
}

.success-ring {
  width: 76px;
  height: 76px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(31, 138, 106, 0.15);
  border: 1px solid rgba(31, 138, 106, 0.25);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  animation: pop-in 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.success-ring span {
  font-size: 32px;
  color: var(--success);
  font-weight: 700;
}

.success-panel h2 {
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  animation: fade-up 0.4s ease 0.1s both;
}

.success-panel p {
  font-size: 14px;
  color: var(--muted);
  animation: fade-up 0.4s ease 0.18s both;
}

.empty-slots {
  font-size: 13px;
  color: var(--muted);
  padding: 18px 14px;
  text-align: center;
  border-radius: 16px;
  border: 1px dashed rgba(90, 106, 124, 0.35);
  background: rgba(255, 255, 255, 0.3);
}

.hint-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 12px;
  color: var(--muted);
}

.hint-row strong {
  color: var(--accent);
  font-weight: 700;
}

@keyframes pop-in {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes fade-up {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.screen-enter {
  animation: fade-up 0.28s ease both;
}

@media (max-height: 700px) {
  :root {
    --bezel: 9px;
    --screen-radius: 40px;
    --outer-radius: 48px;
    --island-w: 110px;
    --island-h: 32px;
    --safe-top: 48px;
  }

  .hero-card h2 {
    font-size: 19px;
  }

  .specialty-tile {
    min-height: 76px;
  }
}

/* Portfolio iframe embed — phone fills parent slot */
.embed-mode html {
  overflow: hidden;
  height: 100%;
  width: 100%;
  background: transparent !important;
}

.embed-mode body {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  height: 100%;
  width: 100%;
  padding: 0;
}

.embed-mode .iphone-16-pro {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  aspect-ratio: auto;
}
