/* =========================================
   BRIGHTSMILE DENTAL — PRICING PAGE
   ========================================= */

/* ── Insurance Logos (large) ── */
.insurance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.insurance-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  transition: box-shadow var(--transition-base), border-color var(--transition-base);
  text-align: center;
}

.insurance-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--color-teal);
}

.insurance-card__logo {
  width: 72px;
  height: 40px;
  background: var(--color-soft-blue);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--color-navy);
}

.insurance-card__name {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-navy);
}

.insurance-card__type {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ── Pricing Table ── */
.pricing-tabs-nav {
  display: flex;
  overflow-x: auto;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: var(--space-5);
  gap: 0;
  scrollbar-width: none;
}

.pricing-tabs-nav::-webkit-scrollbar { display: none; }

.pricing-tab-btn {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  white-space: nowrap;
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color var(--transition-fast), border-color var(--transition-fast);
  min-height: 52px;
}

.pricing-tab-btn:hover { color: var(--color-teal); }

.pricing-tab-btn.is-active {
  color: var(--color-teal);
  font-weight: var(--weight-semibold);
  border-bottom-color: var(--color-teal);
}

.pricing-panel {
  display: none;
}

.pricing-panel.is-active {
  display: block;
  animation: fadeIn 0.3s var(--ease-out) both;
}

.pricing-table {
  width: 100%;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-white);
}

.pricing-table th {
  background: var(--color-navy);
  color: white;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  text-align: left;
}

.pricing-table th:last-child { text-align: right; }

.pricing-table td {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-secondary);
}

.pricing-table tr:last-child td { border-bottom: none; }

.pricing-table tr:nth-child(even) td {
  background: var(--color-soft-blue);
}

.pricing-table__price {
  font-weight: var(--weight-semibold);
  color: var(--color-navy);
  white-space: nowrap;
}

.pricing-table__coverage {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}

.pricing-table__coverage--full {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.pricing-table__coverage--partial {
  background: #FFF7ED;
  color: var(--color-warning);
}

.pricing-table__coverage--none {
  background: var(--color-light-gray);
  color: var(--color-text-muted);
}

.pricing-table__note {
  padding: var(--space-2) var(--space-3);
  background: var(--color-warm-neutral);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-style: italic;
}

/* ── Membership Plan Cards ── */
.membership-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.plan-card {
  border-radius: var(--radius-xl);
  border: 2px solid var(--color-border);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  position: relative;
  background: var(--color-white);
  transition: box-shadow var(--transition-base), border-color var(--transition-base);
}

.plan-card:hover {
  box-shadow: var(--shadow-md);
}

.plan-card--featured {
  border-color: var(--color-teal);
  box-shadow: var(--shadow-md);
  background: var(--color-navy);
}

.plan-card--featured-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-teal);
  color: white;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.plan-card__name {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--color-text-muted);
}

.plan-card--featured .plan-card__name {
  color: rgba(255,255,255,0.65);
}

.plan-card__price {
  font-family: var(--font-heading);
  font-size: var(--h1-size);
  font-weight: var(--weight-bold);
  color: var(--color-navy);
  line-height: 1;
}

.plan-card--featured .plan-card__price {
  color: var(--color-white);
}

.plan-card__price span {
  font-size: var(--text-base);
  font-weight: var(--weight-normal);
  color: var(--color-text-muted);
  font-family: var(--font-body);
}

.plan-card--featured .plan-card__price span {
  color: rgba(255,255,255,0.60);
}

.plan-card__divider {
  border-top: 1px solid var(--color-border);
}

.plan-card--featured .plan-card__divider {
  border-top-color: rgba(255,255,255,0.15);
}

.plan-card__features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
}

.plan-card__feature {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.plan-card--featured .plan-card__feature {
  color: rgba(255,255,255,0.80);
}

.plan-card__feature-check {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-circle);
  background: var(--color-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.plan-card__feature-check svg {
  width: 10px;
  height: 10px;
}

/* ── Financing Section ── */
.financing-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-4);
}

.financing-option {
  padding: var(--space-4);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
}

.financing-option__logo {
  width: 80px;
  height: 32px;
  background: var(--color-soft-blue);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--color-navy);
  margin-bottom: var(--space-2);
}

.financing-option h4 {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--color-navy);
  margin-bottom: var(--space-1);
}

.financing-option p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
}

/* ── Insurance logos grid (new HTML) ── */
/* ── Insurance section tint ── */
.insurance-section {
  background: linear-gradient(180deg, #F2F6FB 0%, #FAFBFD 55%, #FFFFFF 100%);
}

.insurance-logos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: var(--space-6);
}

.insurance-logo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px 14px 16px;
  background: var(--color-white);
  border: 1px solid rgba(218, 228, 244, 0.9);
  border-radius: 16px;
  box-shadow:
    0 1px 2px rgba(27, 58, 107, 0.04),
    0 3px 10px rgba(27, 58, 107, 0.06);
  transition:
    box-shadow 220ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 220ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
    border-color 180ms ease;
  will-change: transform;
}

.insurance-logo-card:hover {
  box-shadow:
    0 4px 10px rgba(27, 58, 107, 0.09),
    0 12px 28px rgba(27, 58, 107, 0.12);
  transform: translateY(-4px);
  border-color: rgba(13, 148, 136, 0.40);
}

.insurance-logo-card:active {
  transform: translateY(-1px);
  box-shadow:
    0 2px 6px rgba(27, 58, 107, 0.07),
    0 6px 16px rgba(27, 58, 107, 0.09);
}

.insurance-logo-card__visual {
  width: 100%;
  height: 56px;
  border-radius: 12px;
  background: var(--color-soft-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-navy);
  letter-spacing: -0.02em;
}

.insurance-logo-card__visual--blue   { background: #DBEAFE; color: #1E40AF; }
.insurance-logo-card__visual--dark   { background: #1F2937; color: #F9FAFB; }
.insurance-logo-card__visual--green  { background: #D1FAE5; color: #065F46; }
.insurance-logo-card__visual--purple { background: #EDE9FE; color: #5B21B6; }
.insurance-logo-card__visual--orange { background: #FEF3C7; color: #92400E; }
.insurance-logo-card__visual--teal   { background: #CCFBF1; color: #0F766E; }

/* ✓ In-Network pill — subtle, not competing with the card title */
.insurance-logo-card .badge--teal {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(13, 148, 136, 0.07);
  color: #0D9488;
  border: 1px solid rgba(13, 148, 136, 0.22);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 50px;
}

.insurance-logo-card .badge--teal::before {
  content: "✓";
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

/* ── OON toggle ── */
.insurance-oon {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}

.insurance-oon__header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.insurance-oon__header h3 {
  flex: 1;
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-navy);
}

.insurance-oon__header svg { color: var(--color-teal); flex-shrink: 0; }

.insurance-oon__toggle {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-circle);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-navy);
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.insurance-oon__toggle[aria-expanded="true"] .accordion-icon { transform: rotate(180deg); }

.insurance-oon__body { padding-top: var(--space-4); font-size: var(--text-sm); color: var(--color-text-secondary); line-height: 1.6; }

/* ── Insurance verify CTA ── */
.insurance-verify-cta {
  text-align: center;
  padding: var(--space-5);
  background: var(--color-soft-blue);
  border-radius: var(--radius-xl);
}

.insurance-verify-cta p { margin-bottom: var(--space-3); color: var(--color-text-secondary); }

/* ── Pricing tabs (new .pricing-tabs wrapper) ── */
.pricing-tabs {
  display: flex;
  overflow-x: auto;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: var(--space-6);
  gap: 0;
  scrollbar-width: none;
}
.pricing-tabs::-webkit-scrollbar { display: none; }

/* ── Price column ── */
.pricing-table td.price {
  font-weight: var(--weight-semibold);
  color: var(--color-navy);
  white-space: nowrap;
}

/* ── Pricing disclaimer ── */
.pricing-disclaimer {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  border-left: 3px solid var(--color-accent-gold);
  padding: var(--space-3) var(--space-4);
  background: var(--color-warm-neutral);
  border-radius: var(--radius-md);
  line-height: 1.6;
  margin-top: var(--space-5);
}

/* ── Plan Cards (new structure) ── */
.plan-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  align-items: stretch;
  margin-top: var(--space-6);
}

.plan-card__header { margin-bottom: var(--space-4); }

.plan-card__badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-teal);
  color: white;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  padding: 4px 16px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.plan-card__amount {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  color: var(--color-navy);
  line-height: 1;
}

.plan-card--featured .plan-card__amount { color: white; }

.plan-card__period {
  font-size: var(--text-base);
  color: var(--color-text-muted);
}

.plan-card--featured .plan-card__period { color: rgba(255,255,255,0.6); }

.plan-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-top: var(--space-1);
}

.plan-card--featured .plan-card__desc { color: rgba(255,255,255,0.7); }

.plan-card__features li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.plan-card--featured .plan-card__features li { color: rgba(255,255,255,0.85); }

.plan-card__features li svg { color: var(--color-teal); flex-shrink: 0; margin-top: 2px; }
.plan-card--featured .plan-card__features li svg { color: #5EEAD4; }

.plan-card__footer { margin-top: auto; padding-top: var(--space-4); border-top: 1px solid var(--color-border); }
.plan-card--featured .plan-card__footer { border-top-color: rgba(255,255,255,0.15); }

.plan-card__billing {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-align: center;
  margin-top: var(--space-2);
}
.plan-card--featured .plan-card__billing { color: rgba(255,255,255,0.5); }

/* ── Financing cards (new) ── */
.financing-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.financing-card__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: 48px;
  padding: 0 var(--space-3);
  background: var(--color-soft-blue);
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: #2563EB;
  margin-bottom: var(--space-4);
  width: fit-content;
}

.financing-card__logo--navy { background: var(--color-navy); color: white; }

.financing-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--color-navy);
  margin-bottom: var(--space-2);
}

.financing-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
  line-height: 1.6;
}

/* ── Billing accordion ── */
.billing-accordion { max-width: 720px; margin: 0 auto; }

.financing-faq__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--color-navy);
  margin-bottom: var(--space-4);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .insurance-logos-grid { grid-template-columns: repeat(4, 1fr); }
  .plan-cards { grid-template-columns: 1fr; max-width: 440px; margin-inline: auto; }
  .membership-grid { grid-template-columns: 1fr; max-width: 440px; margin-inline: auto; }
}

@media (max-width: 768px) {
  .financing-options {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-4);
  }
  .insurance-logos-grid { grid-template-columns: repeat(2, 1fr); }

  .financing-card {
    padding: var(--space-4);
  }

  .financing-card__logo {
    height: 40px;
    font-size: var(--text-sm);
    padding: 0 var(--space-2);
    margin-bottom: var(--space-3);
  }

  .financing-card__title {
    font-size: var(--text-lg);
  }

  .financing-card .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .pricing-tabs { gap: 0; }
  .pricing-tab-btn { padding: var(--space-2); font-size: var(--text-xs); }
}

/* ── Pricing Table → Card Layout (mobile) ── */
@media (max-width: 640px) {

  /* Remove the TABLE element from layout — its intrinsic content-based
     width can't be reliably overridden with width:100%. display:contents
     removes the TABLE box entirely so TBODY sizes against the panel. */
  .pricing-table {
    display: contents;
  }

  /* Hide desktop header row */
  .pricing-table thead {
    display: none;
  }

  /* TBODY becomes the real flex container, 100% of .pricing-panel */
  .pricing-table tbody {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
  }

  /* Each TR = a card, constrained by the flex parent width */
  .pricing-table tr {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #dde8f5;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 4px rgba(27, 58, 107, 0.06);
  }

  /* Remove zebra stripe — cards have their own background */
  .pricing-table tr:nth-child(even) td {
    background: transparent;
  }

  /* Service name = full-width navy card header, no label grid */
  .pricing-table td:first-child {
    display: block;
    background: var(--color-navy);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    padding: 14px 16px 12px;
    border-bottom: none;
    line-height: 1.4;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  /* All labeled cells: CSS Grid label | value
     1fr value column always fits within the card width */
  .pricing-table td[data-label] {
    display: grid;
    grid-template-columns: 84px 1fr;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 14px;
    border-bottom: 1px solid #eef2f8;
    color: var(--color-text-secondary);
    box-sizing: border-box;
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .pricing-table tr td:last-child {
    border-bottom: none;
  }

  /* Label via ::before — sits in the fixed 84px grid column */
  .pricing-table td[data-label]::before {
    content: attr(data-label);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    line-height: 1.3;
    align-self: center;
  }

  /* Price: override base white-space:nowrap and add teal colour */
  .pricing-table td.price {
    white-space: normal;
    font-size: 15px;
    font-weight: 700;
    color: var(--color-teal);
  }

  /* Notes: italic, muted, top-aligned label */
  .pricing-table td[data-label="Notes"] {
    align-items: start;
    font-style: italic;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
  }

  .pricing-table td[data-label="Notes"]::before {
    padding-top: 2px;
  }
}
