/*
 * PLAN-PAGE-1A — Public Plans page stylesheet.
 *
 * Self-contained: defines its own copies of the AskPerTask V2 colour/
 * spacing/radius tokens (matching wp-content/themes/askpertask-child/
 * assets/css/homepage-v2.css) scoped under .apt-plans-page, rather than
 * depending on homepage-v2.css being enqueued — /plans/ is not currently
 * covered by apt_uses_new_header(), so that stylesheet is not loaded here.
 * This keeps the change self-contained to this one page/module, matching
 * the precedent set by apt-marketplace.css and apt-badge-contract.css.
 *
 * Only enqueued on the /plans/ page itself (see class-apt-plans-page.php).
 */

.apt-plans-page {
  --apt-plans-green: #1FA34A;
  --apt-plans-green-dark: #168238;
  --apt-plans-green-light: #EAF7EE;
  --apt-plans-blue: #2D6CDF;
  --apt-plans-blue-light: #EAF1FD;
  --apt-plans-navy: #1A2E52;
  --apt-plans-orange: #F2884B;
  --apt-plans-amber: #D97706;
  --apt-plans-amber-light: #FFFBEB;
  --apt-plans-text: #1A1A1A;
  --apt-plans-text-muted: #6B7280;
  --apt-plans-bg-soft: #F7F8F7;
  --apt-plans-border: #E5E7EB;
  --apt-plans-radius-md: 12px;
  --apt-plans-radius-lg: 16px;
  --apt-plans-radius-pill: 999px;
  --apt-plans-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --apt-plans-shadow-md: 0 4px 12px rgba(16, 24, 40, 0.06);

  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 64px;
  color: var(--apt-plans-text);
  font-family: inherit;
  box-sizing: border-box;
}

.apt-plans-page *,
.apt-plans-page *::before,
.apt-plans-page *::after {
  box-sizing: border-box;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */

.apt-plans-hero {
  text-align: center;
  padding: 56px 0 32px;
}

.apt-plans-hero__title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--apt-plans-navy);
}

.apt-plans-hero__subtitle {
  font-size: 1.05rem;
  color: var(--apt-plans-text-muted);
  max-width: 640px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

/* ── Launch Access status banner (LAUNCH-ACCESS-1B) ─────────────────────── */

.apt-plans-launch-access {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 720px;
  margin: 0 auto 32px;
  padding: 14px 20px;
  background: var(--apt-plans-green-light);
  border: 1px solid var(--apt-plans-green);
  border-radius: var(--apt-plans-radius-md);
  text-align: left;
}

.apt-plans-launch-access__badge {
  flex-shrink: 0;
  padding: 4px 12px;
  background: var(--apt-plans-green);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--apt-plans-radius-pill);
}

.apt-plans-launch-access__text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.apt-plans-launch-access__body {
  margin: 0;
  color: var(--apt-plans-green-dark);
  font-size: 0.9rem;
  line-height: 1.5;
}

.apt-plans-launch-access__disclaimer {
  margin: 0;
  color: var(--apt-plans-text-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

/* ASKPERTASK-PLANS-PAID-LAUNCH-COMMERCIALIZATION-1A: demoted, secondary
   framing — paid plans (role tabs) lead the page; this banner is smaller
   and more muted than the primary plan cards. */
.apt-plans-launch-access--secondary {
  max-width: 640px;
  margin-top: 8px;
  padding: 10px 16px;
  opacity: 0.92;
}

.apt-plans-launch-access--secondary .apt-plans-launch-access__badge {
  background: transparent;
  color: var(--apt-plans-green-dark);
  border: 1px solid var(--apt-plans-green);
  font-size: 0.72rem;
}

/* ── Marketplace acquisition offer (ASKPERTASK-PLANS-FIRST-MONTH-FREE-CLOSURE-1A) ── */

.apt-plans-marketplace-offer {
  max-width: 720px;
  margin: 0 auto 40px;
  padding: 16px 20px;
  background: var(--apt-plans-blue-light, #EAF1FD);
  border: 1px solid #CFE0FF;
  border-radius: var(--apt-plans-radius-md);
  text-align: left;
}

.apt-plans-marketplace-offer__title {
  margin: 0 0 4px;
  font-weight: 700;
  color: var(--apt-plans-navy);
  font-size: 0.98rem;
}

.apt-plans-marketplace-offer__body {
  margin: 0 0 10px;
  color: var(--apt-plans-text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.apt-plans-marketplace-offer__cta {
  display: inline-flex;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--apt-plans-blue);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.apt-plans-marketplace-offer__cta:hover {
  border-bottom-color: var(--apt-plans-blue);
}

/* ── Role tabs (ASKPERTASK-PLANS-AND-HOMEPAGE-MAP-FINALIZATION-1A) ──────── */
/* Pure CSS tabs: a native radio group + :checked sibling selectors. No JS
   enqueue — works with scripting disabled, each label is a real focusable
   control bound to its input via for/id. */

.apt-plans-roles {
  border: 0;
  margin: 0 0 8px;
  padding: 0;
}

.apt-plans-roles__legend {
  padding: 0;
  margin: 0 0 14px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--apt-plans-text-muted);
  text-align: center;
  width: 100%;
}

.apt-plans-roles__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.apt-plans-roles__tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 640px;
  margin: 0 auto 40px;
}

.apt-plans-roles__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: var(--apt-plans-radius-pill);
  border: 1px solid var(--apt-plans-border);
  background: #fff;
  color: var(--apt-plans-text);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.apt-plans-roles__tab:hover {
  border-color: var(--apt-plans-green);
}

.apt-plans-roles__input:focus-visible + .apt-plans-roles__tabs .apt-plans-roles__tab,
.apt-plans-roles__input:focus-visible ~ .apt-plans-roles__tabs .apt-plans-roles__tab {
  outline: none;
}

#apt-plans-role-requester:focus-visible ~ .apt-plans-roles__tabs label[for="apt-plans-role-requester"],
#apt-plans-role-helper:focus-visible ~ .apt-plans-roles__tabs label[for="apt-plans-role-helper"],
#apt-plans-role-professional:focus-visible ~ .apt-plans-roles__tabs label[for="apt-plans-role-professional"],
#apt-plans-role-business:focus-visible ~ .apt-plans-roles__tabs label[for="apt-plans-role-business"] {
  outline: 2px solid var(--apt-plans-blue);
  outline-offset: 2px;
}

#apt-plans-role-requester:checked ~ .apt-plans-roles__tabs label[for="apt-plans-role-requester"],
#apt-plans-role-helper:checked ~ .apt-plans-roles__tabs label[for="apt-plans-role-helper"],
#apt-plans-role-professional:checked ~ .apt-plans-roles__tabs label[for="apt-plans-role-professional"],
#apt-plans-role-business:checked ~ .apt-plans-roles__tabs label[for="apt-plans-role-business"] {
  background: var(--apt-plans-green);
  border-color: var(--apt-plans-green);
  color: #fff;
}

.apt-plans-roles__panel {
  display: none;
}

#apt-plans-role-requester:checked ~ .apt-plans-roles__panels .apt-plans-roles__panel--requester,
#apt-plans-role-helper:checked ~ .apt-plans-roles__panels .apt-plans-roles__panel--helper,
#apt-plans-role-professional:checked ~ .apt-plans-roles__panels .apt-plans-roles__panel--professional,
#apt-plans-role-business:checked ~ .apt-plans-roles__panels .apt-plans-roles__panel--business {
  display: block;
  animation: apt-plans-panel-in 0.15s ease;
}

@keyframes apt-plans-panel-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Panels carry the same top margin .apt-plans-section normally gets from
   page flow; zero it on the first section inside a panel so switching
   tabs doesn't leave a big gap under the tab row. */
.apt-plans-roles__panel > .apt-plans-section {
  margin-top: 0;
}

/* ── Requester "simple card" (not a comparison grid) ─────────────────── */

.apt-plans-simple {
  max-width: 520px;
  margin: 0 auto;
}

.apt-plans-simple__card {
  background: #fff;
  border: 1px solid var(--apt-plans-border);
  border-radius: var(--apt-plans-radius-lg);
  box-shadow: var(--apt-plans-shadow-md);
  padding: 28px;
  text-align: left;
}

.apt-plans-simple__title {
  margin: 0 0 14px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--apt-plans-navy);
}

.apt-plans-simple__list {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.apt-plans-simple__list li {
  font-size: 0.92rem;
  color: var(--apt-plans-text);
  padding-left: 24px;
  position: relative;
}

.apt-plans-simple__list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--apt-plans-green);
  font-weight: 700;
}

.apt-plans-simple__card .apt-plans-btn {
  width: 100%;
}

.apt-plans-simple__footnote {
  margin: 16px auto 0;
  max-width: 460px;
  font-size: 0.82rem;
  color: var(--apt-plans-text-muted);
  text-align: center;
  line-height: 1.5;
}

/* ── Non-actionable card status tag (replaces repeated "Coming soon") ─── */

.apt-plans-card__tag {
  display: inline-flex;
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: var(--apt-plans-radius-pill);
  background: var(--apt-plans-bg-soft);
  border: 1px solid var(--apt-plans-border);
  color: var(--apt-plans-text-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.apt-plans-card__tag--highlight {
  background: var(--apt-plans-green-light);
  border-color: var(--apt-plans-green);
  color: var(--apt-plans-green-dark);
}

/* ── Section shell ────────────────────────────────────────────────────── */

.apt-plans-section {
  margin-top: 56px;
}

.apt-plans-section__header {
  margin-bottom: 20px;
}

.apt-plans-section__title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--apt-plans-navy);
  margin: 0 0 6px;
}

.apt-plans-section__intro {
  font-size: 0.95rem;
  color: var(--apt-plans-text-muted);
  max-width: 760px;
  line-height: 1.6;
  margin: 0;
}

/* ── Card grid ────────────────────────────────────────────────────────── */

.apt-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

/* ── Card ─────────────────────────────────────────────────────────────── */

.apt-plans-card {
  background: #fff;
  border: 1px solid var(--apt-plans-border);
  border-radius: var(--apt-plans-radius-lg);
  box-shadow: var(--apt-plans-shadow-sm);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.apt-plans-card--addon {
  padding: 18px;
  gap: 8px;
}

.apt-plans-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: var(--apt-plans-text);
}

.apt-plans-card__price {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--apt-plans-green-dark);
}

.apt-plans-card__price-line {
  display: block;
}

.apt-plans-card__price--tbc {
  color: var(--apt-plans-text-muted);
  font-weight: 500;
  font-style: italic;
}

.apt-plans-card__desc {
  font-size: 0.88rem;
  color: var(--apt-plans-text-muted);
  line-height: 1.55;
  margin: 0;
}

.apt-plans-card__note {
  font-size: 0.8rem;
  color: var(--apt-plans-text-muted);
  line-height: 1.5;
  margin: 0;
  padding-top: 6px;
  border-top: 1px dashed var(--apt-plans-border);
}

.apt-plans-card__spacer {
  flex: 1;
}

/* ── CTA buttons ──────────────────────────────────────────────────────── */

.apt-plans-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: var(--apt-plans-radius-md);
  border: 1px solid transparent;
  padding: 10px 16px;
  min-height: 40px;
  text-decoration: none;
  white-space: normal;
  text-align: center;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.apt-plans-btn--primary {
  background: var(--apt-plans-green);
  color: #fff;
}

.apt-plans-btn--primary:hover {
  background: var(--apt-plans-green-dark);
  color: #fff;
}

.apt-plans-btn--ghost {
  background: var(--apt-plans-bg-soft);
  border-color: var(--apt-plans-border);
  color: var(--apt-plans-text);
}

.apt-plans-btn--ghost:hover {
  border-color: var(--apt-plans-blue);
  color: var(--apt-plans-blue);
}

.apt-plans-btn--disabled {
  background: var(--apt-plans-bg-soft);
  border-color: var(--apt-plans-border);
  color: var(--apt-plans-text-muted);
  cursor: default;
}

/* ── Footer safety note ───────────────────────────────────────────────── */

.apt-plans-footer-note {
  margin-top: 56px;
  padding: 20px;
  background: var(--apt-plans-green-light);
  border: 1px solid #C6EBD2;
  border-radius: var(--apt-plans-radius-md);
  font-size: 0.88rem;
  color: #14532d;
  line-height: 1.6;
  text-align: center;
}

/* ── Mobile ───────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .apt-plans-page {
    padding: 0 16px 48px;
  }

  .apt-plans-launch-access {
    flex-direction: column;
    align-items: flex-start;
  }

  .apt-plans-hero {
    padding: 36px 0 24px;
  }

  .apt-plans-grid,
  .apt-plans-grid--addons {
    grid-template-columns: 1fr;
  }

  .apt-plans-roles__tabs {
    gap: 6px;
  }

  .apt-plans-roles__tab {
    padding: 8px 14px;
    font-size: 0.85rem;
  }

  .apt-plans-simple__card {
    padding: 20px;
  }
}
