*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --sage: #3D6B5A;
  --sage-lt: #EAF2EE;
  --sage-md: #C2D9CF;
  --slate: #2C3E50;
  --mist: #F5F7F6;
  --fog: #E8EDEB;
  --white: #FFFFFF;
  --ink: #1A2B22;
  --muted: #6B8078;
  --rule: #D4DDD9;
  --radius: 14px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--mist);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Site header only — exclude footer browse and doctor portal sidebar nav */
nav:not(.hp-browse):not(.dp-nav):not(.sf-menu),
.site-nav {
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  padding: 0 40px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 24px;
}

.nav-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  min-width: 0;
  gap: 24px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 36px;
  min-width: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-burger-line {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-nav.is-open .nav-burger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.site-nav.is-open .nav-burger-line:nth-child(2) {
  opacity: 0;
}
.site-nav.is-open .nav-burger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu expands in-flow (pushes page content down). Do not lock scroll. */
body.nav-drawer-open {
  overflow: visible;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: white;
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 8px;
  min-width: 220px;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-item {
  display: block;
  padding: 9px 14px;
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 400;
}

.nav-dropdown-item:hover {
  background: var(--fog);
}

.nav-dropdown > .nav-link::after {
  content: ' ↓';
  font-size: 10px;
  opacity: 0.5;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 300;
  color: var(--sage);
  text-decoration: none;
}

.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: block;
  flex-shrink: 0;
  object-fit: cover;
}

.logo-text span { color: var(--ink); }

.logo span { color: var(--ink); }

.nav-right {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: auto;
  flex-shrink: 0;
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-login-dropdown {
  position: relative;
}

.nav-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  background: #f0f1f0;
  border: none;
  padding: 9px 14px;
  border-radius: 8px;
  cursor: pointer;
  line-height: 1;
}

.nav-login-btn:hover,
.nav-login-dropdown.is-open .nav-login-btn {
  background: #e6e8e6;
}

.nav-login-chevron {
  transition: transform 0.15s ease;
  color: #6b6b6b;
}

.nav-login-dropdown.is-open .nav-login-chevron {
  transform: rotate(180deg);
}

.nav-login-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid #e6e8e6;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  padding: 6px 0;
  z-index: 300;
}

.nav-login-section {
  padding: 10px 16px 12px;
}

.nav-login-heading {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.nav-login-item {
  display: inline-block;
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
}

.nav-login-item:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.nav-login-item-btn {
  font: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  width: 100%;
  color: var(--ink);
}

.nav-login-divider {
  height: 1px;
  background: #ecefec;
  margin: 2px 0;
}

/* Patient login modal (Zocdoc-style) */
body.pl-open {
  overflow: hidden;
}

.pl-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, 0.45);
  z-index: 900;
}

.pl-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  padding: 28px 28px 24px;
  z-index: 901;
}

.pl-close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: #8a8a8a;
  cursor: pointer;
  padding: 4px 8px;
}

.pl-close:hover {
  color: #222;
}

.pl-title {
  margin: 0 36px 22px 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  color: #111;
}

.pl-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
}

.pl-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cfcfcf;
  border-radius: 6px;
  padding: 12px 12px;
  font-size: 15px;
  margin-bottom: 14px;
  font-family: inherit;
}

.pl-input:focus {
  outline: 2px solid #f5c518;
  border-color: #f5c518;
}

.pl-btn-primary {
  width: 100%;
  border: none;
  border-radius: 8px;
  background: #f5c518;
  color: #111;
  font-size: 15px;
  font-weight: 700;
  padding: 13px 16px;
  cursor: pointer;
  font-family: inherit;
}

.pl-btn-primary:hover {
  background: #e6b800;
}

.pl-email-echo {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: #222;
}

.pl-link-btn {
  display: inline-block;
  border: none;
  background: none;
  padding: 0;
  margin: 0 0 16px;
  font: inherit;
  font-size: 13px;
  color: #2f6fed;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pl-error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fdeceb;
  color: #9b1c1c;
  font-size: 13px;
}

.pl-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: #888;
  font-size: 13px;
}

.pl-or::before,
.pl-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e4e4e4;
}

.pl-social {
  display: grid;
  gap: 10px;
}

.pl-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #222;
  border-radius: 8px;
  background: #fff;
  color: #111;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 14px;
  cursor: pointer;
  font-family: inherit;
  position: relative;
  text-decoration: none;
}

.pl-social-btn:hover {
  background: #fafafa;
  color: #111;
  text-decoration: none;
}

.pl-social-btn.disabled,
.pl-social-btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  background: #f5f5f5;
  border-color: #bbb;
  color: #666;
}

.pl-social-icon {
  position: absolute;
  left: 14px;
  display: inline-flex;
  align-items: center;
}

.pl-provider-note {
  margin: 22px 0 0;
  text-align: center;
  font-size: 13px;
  color: #444;
}

.pl-provider-note a {
  color: #111;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.nav-signup-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  background: #f5c518;
  border: none;
  padding: 9px 18px;
  border-radius: 8px;
  text-decoration: none;
  line-height: 1;
}

.nav-signup-btn:hover {
  background: #e6b800;
  color: #1a1a1a;
}

.nav-practice-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: 1.5px solid var(--ink);
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  line-height: 1.15;
  white-space: nowrap;
}

.nav-practice-btn:hover {
  background: var(--ink);
  color: #fff;
  text-decoration: none;
}

.nav-cta {
  font-size: 14px;
  font-weight: 600;
  color: white;
  background: var(--sage);
  border: none;
  padding: 9px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}

.nav-cta:hover { background: var(--ink); }

.auth-role-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 18px;
  padding: 4px;
  background: #f0f1f0;
  border-radius: 10px;
}

.auth-role-tab {
  text-align: center;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

.auth-role-tab.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.auth-role-tab:hover {
  color: var(--ink);
}

.hero-chat {
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-left {
  padding: 52px 32px 28px;
  text-align: center;
  width: 100%;
  max-width: 680px;
}

.hero-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 16px;
}

.hero-left h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(36px, 5vw, 54px);
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 14px;
}

.hero-left h1 em { font-style: italic; color: var(--sage); }

.hero-left p {
  font-size: 16px;
  color: var(--muted);
  max-width: 440px;
  margin: 0 auto;
  line-height: 1.6;
}

.hero-right {
  padding: 24px 32px 32px;
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
}

.hero-chat-split-wrap {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.hero-chat-split-wrap.is-split {
  max-width: 1120px;
  flex-direction: row;
  align-items: stretch;
  gap: 20px;
  padding: 0 24px 32px;
}

.hero-chat-split-wrap.is-split .hero-right {
  flex: 0 0 46%;
  max-width: none;
  margin: 0;
  padding: 24px 0 0;
  min-width: 0;
}

.hero-chat-split-wrap.is-split .chat-messages {
  flex: 1;
  min-height: 0;
}

.hero-doctor-panel {
  flex: 1;
  min-width: 0;
  min-height: 0;
  padding-top: 24px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
}

.hero-doctor-panel[hidden],
.hero-chat-split-wrap:not(.is-split) .hero-doctor-panel {
  display: none !important;
}

.hero-doctor-panel-inner {
  position: relative;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: hidden;
  max-height: calc(100vh - 140px);
  height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.hero-doctor-panel-close {
  position: absolute;
  top: 12px;
  right: 30px;
  z-index: 3;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--rule);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-doctor-panel-close:hover {
  background: var(--mist);
  color: var(--ink);
}

.hero-doctor-panel-body {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 2px 4px 20px 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.hero-doctor-panel-scroll {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: min-content;
}

.hero-doctor-panel-loading {
  padding: 56px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
}

.hero-doctor-panel-loading .nuvi-loading {
  margin-right: 0;
  gap: 6px;
}

.hero-doctor-panel-loading .nuvi-loading span {
  width: 8px;
  height: 8px;
}

.hero-chat.has-doctor-panel .hero-left,
.hero-chat.has-doctor-panel .hero-steps-strip {
  max-width: 1120px;
}

.nuvi-panel-ai-card {
  background: var(--white);
  border: 1px solid var(--sage-md);
  border-radius: var(--radius);
  padding: 16px 18px 16px;
  box-shadow: 0 1px 2px rgba(26, 43, 34, 0.04);
}

.nuvi-panel-ai-card.is-loading {
  border-color: var(--rule);
}

.nuvi-panel-ai-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding-right: 36px;
}

.nuvi-panel-ai-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nuvi-panel-ai-card-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}

.nuvi-panel-ai-card-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.nuvi-panel-ai-card-text {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink);
}

.nuvi-panel-profile-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(26, 43, 34, 0.04);
}

.nuvi-panel-profile-card .hero-doctor-panel-loading {
  padding: 40px 20px;
}

.hero-doctor-panel-body .nuvi-profile-header {
  padding: 20px 48px 16px 20px;
  background: var(--sage-lt);
}

.hero-doctor-panel-body .nuvi-profile-photo,
.hero-doctor-panel-body .nuvi-profile-avatar {
  width: 96px;
  height: 96px;
}

.hero-doctor-panel-body .nuvi-profile-avatar {
  font-size: 28px;
}

.hero-doctor-panel-body .nuvi-profile-name {
  font-size: 20px;
}

.nuvi-doctor-card.selected {
  border-color: var(--sage);
  box-shadow: 0 0 0 2px rgba(61, 107, 90, 0.25);
  background: var(--sage-lt);
}

.chat-window {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 600px;
}

.chat-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--sage-lt);
}

.ai-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-size: 14px;
  color: white;
  font-weight: 300;
  flex-shrink: 0;
  overflow: hidden;
}

.ai-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.ai-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.ai-status {
  font-size: 11px;
  color: var(--sage);
}

.ai-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
  display: inline-block;
  margin-right: 4px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-steps-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--mist);
  width: 100%;
  max-width: 680px;
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}

.hero-step-cell {
  padding: 12px 20px;
  border-right: 1px solid var(--rule);
}

.hero-step-cell-last {
  border-right: none;
}

.hero-step-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 4px;
}

.hero-step-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

.chat-messages {
  padding: 20px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.msg { display: flex; gap: 10px; animation: fadeIn 0.3s ease; }
.msg.user { flex-direction: row-reverse; }

.msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--fog);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  flex-shrink: 0;
}

.msg.ai .msg-avatar { background: var(--sage); color: white; }

.msg-bubble {
  max-width: 82%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.6;
}

.msg.ai .msg-bubble { background: var(--fog); border-bottom-left-radius: 4px; }
.msg.user .msg-bubble { background: var(--sage); color: white; border-bottom-right-radius: 4px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 16px; }
.chips.chips-reveal { animation: fadeIn 0.35s ease; }

.chip {
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--sage-md);
  color: var(--sage);
  background: var(--sage-lt);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}

.chip:hover { background: var(--sage); color: white; }

.nuvi-language-select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.nuvi-language-select {
  flex: 1;
  min-width: 180px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: white;
  font: inherit;
}

.nuvi-loading {
  display: inline-flex;
  gap: 4px;
  vertical-align: middle;
  margin-right: 6px;
}

.nuvi-loading span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage);
  animation: nuviBounce 1.2s infinite ease-in-out;
}

.nuvi-loading span:nth-child(2) { animation-delay: 0.15s; }
.nuvi-loading span:nth-child(3) { animation-delay: 0.3s; }

@keyframes nuviBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

.nuvi-doctor-cards-wrap { align-items: flex-start; }
.nuvi-doctor-cards { display: flex; flex-direction: column; gap: 10px; max-width: 92%; }

.doctor-list-box {
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--white);
  flex-shrink: 0;
}

.doctor-list-box-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 8px;
  gap: 8px;
  border-bottom: 1px solid var(--rule);
}

.doctor-list-box-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.doctor-list-box-sort-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.doctor-list-box-sort-wrap::after {
  content: "▾";
  position: absolute;
  right: 9px;
  font-size: 10px;
  color: var(--sage);
  pointer-events: none;
}

.doctor-list-box-sort {
  appearance: none;
  -webkit-appearance: none;
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
  padding: 4px 26px 4px 10px;
  border: 1px solid var(--sage-md);
  border-radius: 20px;
  background: var(--sage-lt);
  color: var(--sage);
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.doctor-list-box-sort:hover,
.doctor-list-box-sort:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 2px rgba(61, 107, 90, 0.15);
}

.doctor-list-box-items {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.doctor-list-box .nuvi-doctor-card {
  display: flex;
  flex-direction: column;
  position: relative;
}

.doctor-list-box .nuvi-doctor-card-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.doctor-list-box .doctor-list-check {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--sage);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.nuvi-doctor-card {
  text-align: left;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.nuvi-doctor-card:hover {
  border-color: var(--sage);
  box-shadow: 0 2px 12px rgba(61, 107, 90, 0.12);
}

.nuvi-doctor-card.recommended { border-color: var(--sage); background: var(--sage-lt); }
.nuvi-doctor-card.sponsored { border-color: #c9a227; }
.nuvi-doctor-card.sponsored.recommended { background: #fbf8ee; }

.nuvi-rec-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sage);
  margin-bottom: 8px;
}

.nuvi-sponsored-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9a7b1a;
  margin-bottom: 6px;
}

.nuvi-doctor-card-top { display: flex; gap: 12px; align-items: flex-start; }

.nuvi-doctor-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--sage);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.nuvi-doctor-name { font-size: 14px; font-weight: 600; }
.nuvi-doctor-spec { font-size: 12px; color: var(--muted); }
.nuvi-doctor-loc { font-size: 11px; color: var(--muted); margin-top: 2px; }
.nuvi-doctor-phone { font-size: 12px; color: var(--ink); margin-top: 4px; font-weight: 500; }

.nuvi-match-score { text-align: center; margin-left: auto; flex-shrink: 0; }
.nuvi-match-num { font-size: 18px; font-weight: 600; color: var(--sage); }
.nuvi-match-label { font-size: 9px; text-transform: uppercase; color: var(--muted); }

.nuvi-doctor-reason { font-size: 12px; font-style: italic; color: var(--muted); margin-top: 8px; }
.nuvi-doctor-tag { font-size: 11px; color: var(--sage); margin-top: 6px; font-weight: 500; }

.nuvi-phone-link {
  display: inline-block;
  padding: 10px 16px;
  background: var(--sage);
  color: white !important;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  margin-top: 4px;
}

.nuvi-phone-link:hover { background: #2f5648; }

.nuvi-office-hours { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* Inline doctor profile in chat (final recommendation) */
.nuvi-profile-wrap { align-items: flex-start; }
.nuvi-profile-bubble {
  max-width: 100%;
  width: 100%;
  padding: 0 !important;
  overflow: hidden;
  background: var(--white) !important;
  border: 1px solid var(--rule);
}
.nuvi-profile-loading {
  padding: 16px 18px;
  font-size: 13px;
  color: var(--muted);
}
.nuvi-profile-header {
  display: flex;
  gap: 14px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--rule);
  background: var(--sage-lt);
}
.nuvi-profile-photo {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--white);
}
.nuvi-profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: var(--sage);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-size: 22px;
  flex-shrink: 0;
}
.nuvi-profile-name {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  font-weight: 400;
  margin: 0 0 4px;
  line-height: 1.2;
}
.nuvi-profile-spec { font-size: 12px; color: var(--muted); }
.nuvi-profile-loc { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.nuvi-profile-rating { font-size: 12px; margin-top: 6px; color: var(--ink); }
.nuvi-profile-video {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #111;
}
.nuvi-profile-video iframe,
.nuvi-profile-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  object-fit: cover;
}
.nuvi-profile-video-link {
  padding: 12px 18px;
  border-bottom: 1px solid var(--rule);
}
.nuvi-profile-video-link a {
  color: var(--sage);
  font-weight: 500;
  font-size: 13px;
  text-decoration: none;
}
.nuvi-profile-video-link a:hover { text-decoration: underline; }
.nuvi-profile-section {
  padding: 12px 18px;
  border-bottom: 1px solid var(--rule);
}
.nuvi-profile-section:last-child { border-bottom: none; }
.nuvi-profile-section h4 {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage);
  margin: 0 0 8px;
}
.nuvi-profile-section p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  margin: 0;
}
.nuvi-profile-insurance-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink);
}
.nuvi-profile-insurance-list li + li {
  margin-top: 0.4rem;
}
.nuvi-profile-insurance-plans {
  margin-top: 0.12rem;
  font-size: 12px;
  color: var(--muted, #667);
}
.nuvi-profile-review {
  padding: 10px 0;
  border-top: 1px solid var(--rule);
}
.nuvi-profile-review:first-child { border-top: none; padding-top: 0; }
.nuvi-profile-review-stars { color: #e6a817; font-size: 12px; margin-bottom: 4px; }
.nuvi-profile-review-text { font-size: 13px; font-style: italic; line-height: 1.45; }
.nuvi-profile-review-author { font-size: 11px; color: var(--muted); margin-top: 4px; }
.nuvi-profile-review-source {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}
.nuvi-google-reviews-block + .nuvi-patient-reviews-block {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--rule);
}
.nuvi-google-reviews-block .nuvi-profile-review:first-of-type {
  border-top: none;
  padding-top: 0;
}

.chat-input-area {
  padding: 16px;
  border-top: 1px solid var(--rule);
  display: flex;
  gap: 10px;
  align-items: flex-end;
  background: var(--white);
}

.chat-input {
  flex: 1;
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  resize: none;
  outline: none;
  background: var(--mist);
  min-height: 42px;
  max-height: 120px;
}

.chat-input:focus { border-color: var(--sage); background: white; }
.chat-input::placeholder { color: var(--muted); }
.chat-input.input-locked {
  opacity: 0.55;
  cursor: not-allowed;
  background: var(--rule);
}

.send-btn {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--sage);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

.send-btn:hover { background: var(--ink); }

.send-btn:disabled { background: var(--fog); cursor: not-allowed; }
.send-btn svg { width: 18px; height: 18px; fill: white; }

.disclaimer {
  padding: 8px 32px 0;
  font-size: 11px;
  color: var(--muted);
}

.disclaimer-banner {
  background: #FFF8E7;
  border: 1px solid #F0D080;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 12px;
  color: #7D5A00;
  line-height: 1.5;
  margin: 8px 32px 0;
}


@media (max-width: 900px) {
  /* Match desktop nav specificity (nav:not(...) height:64px) so the header can grow. */
  nav.site-nav:not(.hp-browse):not(.dp-nav),
  nav.site-nav {
    flex-wrap: wrap;
    height: auto;
    min-height: 64px;
    padding: 10px 16px;
    gap: 0;
    align-items: center;
    overflow: visible;
  }

  nav.site-nav.is-open:not(.hp-browse):not(.dp-nav),
  nav.site-nav.is-open {
    position: relative;
    height: auto;
    overflow: visible;
    box-shadow: 0 8px 20px rgba(26, 43, 34, 0.08);
  }

  .nav-burger {
    display: inline-flex;
  }

  .nav-panel {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    flex: none;
    flex-basis: 100%;
    gap: 8px;
    padding: 12px 0 16px;
    border-top: 1px solid var(--rule);
    margin-top: 10px;
    max-height: none;
    overflow: visible;
  }

  .site-nav.is-open .nav-panel {
    display: flex;
  }

  .nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    width: 100%;
  }

  .nav-links .nav-link {
    padding: 12px 14px;
    font-size: 15px;
  }

  .nav-dropdown-menu {
    position: static;
    display: block;
    box-shadow: none;
    border: none;
    padding: 0 0 0 12px;
    min-width: 0;
    background: transparent;
  }

  .nav-dropdown > .nav-link::after {
    content: '';
  }

  .nav-right {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--fog);
    margin-left: 0;
  }

  .nav-auth {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 8px;
  }

  .nav-login-dropdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  .nav-practice-btn,
  .nav-login-btn,
  .nav-signup-btn,
  .nav-cta {
    width: 100%;
    justify-content: center;
    text-align: center;
    white-space: normal;
    padding: 12px 16px;
  }

  .nav-login-menu {
    position: static;
    width: 100%;
    box-shadow: none;
    border: 1px solid var(--rule);
    margin-top: 0;
  }

  /* Logged-in patient: burger shows account links directly — no bell or name chip. */
  .site-nav .pac-notify-wrap,
  .site-nav .pac-user-btn {
    display: none;
  }

  .site-nav .pac-nav,
  .site-nav .pac-dropdown {
    display: block;
    width: 100%;
    position: static;
  }

  .site-nav .pac-menu,
  .site-nav .pac-dropdown.is-open .pac-menu,
  .site-nav .pac-menu[hidden] {
    display: flex !important;
    flex-direction: column;
    position: static;
    width: 100%;
    min-width: 0;
    right: auto;
    top: auto;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  .site-nav .pac-menu-item {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
  }

  .site-nav .nav-right:has(.pac-nav) {
    border-top: none;
    padding-top: 0;
  }
}


.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
}

.nav-link:hover {
  color: var(--ink);
  background: var(--sage-lt);
}

.nav-register {
  font-size: 14px;
  font-weight: 600;
  color: var(--sage);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--sage);
  background: transparent;
}

.nav-register:hover {
  color: var(--white);
  background: var(--sage);
}
