/* ---------------------------------------------------------------------------
   Pricing, checkout and subscription pages.
   Loaded after style.css, so it inherits the site's CSS custom properties
   (--accent, --text-1, --card, --border-md …) and works in both themes.
   --------------------------------------------------------------------------- */

/* ---------- Headline stats ---------- */

.pricing-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
  margin: 0 auto 40px;
  max-width: 760px;
  text-align: center;
}
.pricing-stat__num {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--accent, #1b5b8e) 0%, var(--accent-3, #0E7C7B) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.pricing-stat__label { font-size: 13px; color: var(--text-2); margin-top: 4px; }

/* ---------- Billing period / currency switches ---------- */

.pricing-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 0 auto 44px;
}

.billing-toggle,
.currency-toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.billing-toggle__btn,
.currency-toggle__btn {
  border: 1px solid var(--border-md, rgba(27,91,142,0.2));
  background: transparent;
  color: var(--text-2);
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
  font-family: inherit;
}

.billing-toggle__btn { padding: 9px 20px; font-size: 14px; }
.currency-toggle__btn { padding: 6px 15px; font-size: 13px; }

.billing-toggle__btn.is-active,
.currency-toggle__btn.is-active {
  background: var(--accent, #1b5b8e);
  color: #fff;
  border-color: var(--accent, #1b5b8e);
}

.billing-toggle__btn:focus-visible,
.currency-toggle__btn:focus-visible {
  outline: 2px solid var(--accent, #1b5b8e);
  outline-offset: 2px;
}

.billing-toggle__save {
  font-size: 11.5px;
  font-weight: 700;
  color: #0E7C7B;
  background: rgba(14,124,123,0.12);
  padding: 3px 9px;
  border-radius: 999px;
}

/* ---------- Tier cards ---------- */

.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 12px;
}
@media (max-width: 940px) {
  .tier-grid { grid-template-columns: 1fr; max-width: 460px; margin-left: auto; margin-right: auto; }
}

.tier {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--card, #fff);
  border: 1px solid var(--border-md, rgba(27,91,142,0.18));
  border-radius: var(--r-xl, 20px);
  padding: 32px 28px;
}
.tier--featured {
  border-color: var(--accent, #1b5b8e);
  border-width: 2px;
  box-shadow: 0 16px 48px rgba(27,91,142,0.13);
}
.tier__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent, #1b5b8e);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.tier__name { font-size: 21px; font-weight: 700; color: var(--text-1); margin: 0 0 6px; }
.tier__tagline { font-size: 13.5px; color: var(--text-2); margin: 0 0 22px; min-height: 38px; line-height: 1.5; }
.tier__price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.tier__amount { font-size: 38px; font-weight: 800; color: var(--text-1); line-height: 1; }
.tier__period { font-size: 14px; color: var(--text-2); }
.tier__note { font-size: 12.5px; color: var(--text-2); margin: 8px 0 0; min-height: 18px; }
.tier__trial {
  font-size: 12.5px;
  font-weight: 600;
  color: #0E7C7B;
  margin: 10px 0 0;
}
.tier__inherit { font-size: 13px; font-weight: 600; color: var(--text-1); margin: 24px 0 12px; }
.tier__features { list-style: none; padding: 0; margin: 20px 0 28px; flex-grow: 1; }
.tier__features li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
  padding: 7px 0;
}
.tier__check { color: #0E7C7B; font-weight: 700; flex-shrink: 0; }
.tier__btn {
  display: block;
  text-align: center;
  text-decoration: none;
  padding: 13px 20px;
  border-radius: var(--r-md, 12px);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--accent, #1b5b8e);
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
  transition: opacity .15s ease;
}
.tier__btn--solid { background: var(--accent, #1b5b8e); color: #fff; }
.tier__btn--ghost { background: transparent; color: var(--accent, #1b5b8e); }
.tier__btn:hover { opacity: .88; }

/* ---------- Compare Plans ---------- */

.compare {
  max-width: 100%;
  margin: 36px auto 0;
  border: 1px solid var(--border-md, rgba(27,91,142,0.18));
  border-radius: var(--r-xl, 20px);
  background: var(--card, #fff);
  overflow: hidden;
}

.compare__summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 24px;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent, #1b5b8e);
  text-align: center;
  user-select: none;
}
.compare__summary::-webkit-details-marker { display: none; }
.compare__summary::after {
  content: ' ▾';
  font-size: 12px;
}
.compare[open] .compare__summary::after { content: ' ▴'; }
.compare__summary:focus-visible {
  outline: 2px solid var(--accent, #1b5b8e);
  outline-offset: -2px;
}

/* The table is the one thing on this page allowed to scroll sideways —
   the page body itself must never do so. */
.compare__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-top: 1px solid var(--border-md, rgba(27,91,142,0.14));
}

.compare__table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 13.5px;
}

.compare__table th,
.compare__table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-md, rgba(27,91,142,0.10));
  vertical-align: middle;
}

.compare__table thead th {
  position: sticky;
  top: 0;
  background: var(--card, #fff);
  color: var(--text-1);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}
.compare__table thead th:not(:first-child),
.compare__table tbody td { text-align: center; }

.compare__table tbody th[scope="row"] {
  font-weight: 500;
  color: var(--text-2);
  min-width: 240px;
}

.compare__table tbody td { color: var(--text-1); font-weight: 600; }

.compare__group th {
  background: rgba(27,91,142,0.05);
  color: var(--text-1);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  text-align: left;
}

.compare__yes { color: #0E7C7B; font-weight: 700; font-size: 16px; }
.compare__no  { color: var(--text-3, #9aa3ad); }

@media (max-width: 620px) {
  .compare__table tbody th[scope="row"] { min-width: 200px; }
  .compare__table th,
  .compare__table td { padding: 10px 12px; }
}

.pricing-foot {
  text-align: center;
  color: var(--text-2);
  font-size: 13px;
  max-width: 660px;
  margin: 24px auto 0;
  line-height: 1.7;
}
.pricing-foot a { color: var(--accent, #1b5b8e); font-weight: 600; }

/* ---------- Checkout page ---------- */

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr);
  gap: 36px;
  align-items: start;
  max-width: 980px;
  margin: 0 auto;
}
@media (max-width: 860px) {
  .checkout-layout { grid-template-columns: 1fr; }
  .checkout-summary { order: -1; }
}

.checkout-panel,
.checkout-summary {
  background: var(--card, #fff);
  border: 1px solid var(--border-md, rgba(27,91,142,0.18));
  border-radius: var(--r-xl, 20px);
  padding: 30px 28px;
}
.checkout-summary { position: sticky; top: 100px; }

.checkout-panel__title,
.checkout-summary__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 4px;
}
.checkout-panel__hint {
  font-size: 13px;
  color: var(--text-2);
  margin: 0 0 24px;
  line-height: 1.6;
}

.checkout-summary__plan {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-1);
  margin: 14px 0 2px;
}
.checkout-summary__price {
  font-size: 15px;
  color: var(--text-2);
  margin: 0 0 18px;
}
.checkout-summary__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  color: var(--text-2);
  padding: 9px 0;
  border-top: 1px solid var(--border-md, rgba(27,91,142,0.14));
}
.checkout-summary__row strong { color: var(--text-1); font-weight: 600; text-align: right; }
.checkout-summary__trial {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--r-md, 12px);
  background: rgba(14,124,123,0.10);
  color: #0E7C7B;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.55;
}
.checkout-summary__change {
  display: inline-block;
  margin-top: 16px;
  font-size: 13px;
  color: var(--accent, #1b5b8e);
  font-weight: 600;
}

.checkout-error {
  display: none;
  margin: 0 0 20px;
  padding: 13px 16px;
  border-radius: var(--r-md, 12px);
  background: rgba(248,113,113,0.12);
  border: 1px solid rgba(248,113,113,0.35);
  color: #b91c1c;
  font-size: 13.5px;
  line-height: 1.6;
}
.checkout-error.is-visible { display: block; }

.form-input.has-error { border-color: rgba(248,113,113,0.8); }

.checkout-submit {
  width: 100%;
  padding: 14px 20px;
  border: 0;
  border-radius: var(--r-md, 12px);
  background: var(--accent, #1b5b8e);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s ease;
}
.checkout-submit:hover { opacity: .9; }
.checkout-submit[disabled] { opacity: .6; cursor: progress; }

.checkout-legal {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.65;
  margin: 16px 0 0;
}
.checkout-legal a { color: var(--accent, #1b5b8e); }

/* iyzico injects its own form markup here. */
.checkout-iyzico { margin-top: 8px; }
.checkout-iyzico:empty { display: none; }

/* ---------- Thank-you page ---------- */

.thanks-card {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
  background: var(--card, #fff);
  border: 1px solid var(--border-md, rgba(27,91,142,0.18));
  border-radius: var(--r-xl, 20px);
  padding: 44px 32px;
}
.thanks-card__icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14,124,123,0.12);
  color: #0E7C7B;
}
.thanks-card__ref {
  display: inline-block;
  margin-top: 18px;
  padding: 8px 14px;
  border-radius: var(--r-md, 12px);
  background: rgba(27,91,142,0.08);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  color: var(--text-1);
  word-break: break-all;
}
