/* =============================================================================
   plan-selector.css — chalkboard two-plan trial selector for GoFunTools.com
   Every rule is scoped to #nat-plan-selector so the host stylesheet (style.css,
   html.ft rules on /free-trial, etc.) cannot resize or restyle the cards.
   Palette, fonts and hooks match the live site:
     .tcard[data-trial]  .buy[data-plan]  .soon  .tag
   ============================================================================= */

#nat-plan-selector{
  /* Site palette (identical values to style.css) */
  --ps-board:#1c2a22;
  --ps-board2:#243429;
  --ps-chalk:#f1ede3;
  --ps-dim:#c9c4b8;
  --ps-yellow:#e2b94c;
  --ps-yellow-shadow:#a9862f;
  --ps-blue:#7593bd;
  --ps-coral:#e88f7d;
  --ps-paper:#ece6da;
  --ps-paper-edge:#ddd5c6;
  --ps-footer:#6c6457;

  /* One type unit. Never below 13px, so no text in the component can go under
     13px at any viewport (every child size is >= 1em of this). */
  --ps-u:clamp(13px, 3.4vw, 16px);

  display:block;
  width:100%;
  max-width:47em;
  margin:0 auto;
  font-size:var(--ps-u);
  line-height:1.2;
  color:var(--ps-chalk);
  font-family:'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing:antialiased;
  text-align:left;
}

#nat-plan-selector *,
#nat-plan-selector *::before,
#nat-plan-selector *::after{ box-sizing:border-box; }

/* ---------- radio group wrapper ---------- */
#nat-plan-selector .ps-set{
  border:0;
  margin:0;
  padding:0;
  min-inline-size:0;
}
#nat-plan-selector .ps-legend{
  position:absolute;
  width:1px;height:1px;
  margin:-1px;padding:0;
  overflow:hidden;
  clip:rect(0 0 0 0);
  clip-path:inset(50%);
  white-space:nowrap;
  border:0;
}

/* ---------- the two cards: always a 2-column grid, always equal ---------- */
#nat-plan-selector .ps-cards{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  align-items:stretch;          /* equal height regardless of content */
  gap:.7em;
  margin:0;
  padding:.8em 0 0;             /* room for the .tag that pokes above the border */
}

#nat-plan-selector .tcard{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:.28em;
  min-width:0;                  /* lets 1fr columns shrink instead of overflowing */
  width:auto;
  height:100%;                  /* rows stretch: both cards finish level */
  margin:0;
  padding:.85em .8em .6em;
  /* Constant 3px border in both states: selecting a card can never resize it. */
  border:3px solid rgba(201,196,184,.45);
  border-radius:16px 13px 17px 12px / 13px 17px 12px 16px;
  background:rgba(0,0,0,.14);
  color:var(--ps-chalk);
  font-size:1em;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  transition:border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

/* Selected: thick chalk outline + dashed inner line + the "✓ Selected" word.
   Three cues, only one of which is colour. */
#nat-plan-selector .tcard[data-selected="true"]{
  border-color:var(--ps-yellow);
  background:rgba(226,185,76,.10);
  box-shadow:0 0 0 3px rgba(226,185,76,.14);
}
#nat-plan-selector .tcard[data-selected="true"]::after{
  content:"";
  position:absolute;
  inset:3px;
  border:2px dashed rgba(226,185,76,.5);
  border-radius:inherit;
  pointer-events:none;
}

@media (hover:hover){
  #nat-plan-selector .tcard:not([data-selected="true"]):hover{
    border-color:rgba(241,237,227,.7);
    background:rgba(255,255,255,.05);
  }
}

/* Keyboard focus ring (mouse clicks stay quiet in browsers with :has support) */
#nat-plan-selector .tcard:focus-within{
  outline:3px solid var(--ps-blue);
  outline-offset:3px;
}
@supports selector(:has(*)){
  #nat-plan-selector .tcard:focus-within{ outline:none; }
  #nat-plan-selector .tcard:has(.ps-input:focus-visible){
    outline:3px solid var(--ps-blue);
    outline-offset:3px;
  }
}

/* ---------- card contents ---------- */
#nat-plan-selector .tcard .tag{
  position:absolute;
  top:-.72em;
  right:.6em;
  z-index:2;
  margin:0;
  padding:.02em .55em;
  font-family:'Patrick Hand', cursive;
  font-size:1em;
  font-weight:400;
  line-height:1.2;
  white-space:nowrap;
  color:#1c2a22;
  background:var(--ps-yellow);
  border-radius:999px;
  transform:rotate(2.5deg);
}
#nat-plan-selector .tcard .tag.ps-tag-quiet{
  background:var(--ps-board2);
  color:var(--ps-chalk);
  border:2px solid var(--ps-blue);
}

#nat-plan-selector .ps-head{
  display:flex;
  align-items:center;
  gap:.35em;
  min-width:0;
}

#nat-plan-selector .ps-input{
  flex:0 0 auto;
  width:1.15em;
  height:1.15em;
  margin:0;
  padding:0;
  -webkit-appearance:none;
  appearance:none;
  border:2px solid rgba(201,196,184,.85);
  border-radius:50%;
  background:rgba(0,0,0,.3);
  cursor:pointer;
}
#nat-plan-selector .ps-input:checked{
  border-color:var(--ps-yellow);
  box-shadow:inset 0 0 0 .26em rgba(226,185,76,.95);
}
#nat-plan-selector .ps-input:focus-visible{
  outline:none;                 /* the whole card carries the focus ring */
}

#nat-plan-selector .ps-price{
  display:flex;
  align-items:baseline;
  gap:.16em;
  min-width:0;
  font-size:1em;
  line-height:1;
  white-space:nowrap;
}
#nat-plan-selector .ps-amount{
  font-family:'Cabin Sketch', cursive;
  font-weight:700;
  font-size:2.15em;
  line-height:1;
  letter-spacing:.01em;
}
#nat-plan-selector .ps-per{
  font-family:'Patrick Hand', cursive;
  font-size:1.05em;
  color:var(--ps-dim);
}

#nat-plan-selector .ps-trial{
  font-family:'Patrick Hand', cursive;
  font-size:1.2em;
  line-height:1.12;
  color:var(--ps-yellow);
}

#nat-plan-selector .ps-after{
  font-size:1em;
  line-height:1.2;
  color:var(--ps-dim);
}

#nat-plan-selector .ps-list{
  display:block;
  margin:.22em 0 0;
  font-size:1em;
  line-height:1.25;
  color:var(--ps-chalk);
}
#nat-plan-selector .ps-li{
  display:block;
  position:relative;
  padding-left:1.05em;
}
#nat-plan-selector .ps-li::before{
  content:"\2713";
  position:absolute;
  left:0;
  top:0;
  color:var(--ps-blue);
}

/* Selection word. Hidden but space reserved, so selecting cannot change height. */
#nat-plan-selector .ps-mark{
  display:flex;
  align-items:center;
  gap:.25em;
  margin-top:auto;
  padding-top:.3em;
  font-family:'Patrick Hand', cursive;
  font-size:1.05em;
  line-height:1.15;
  color:var(--ps-yellow);
  visibility:hidden;
}
#nat-plan-selector .tcard[data-selected="true"] .ps-mark{ visibility:visible; }

/* ---------- summary + button ---------- */
#nat-plan-selector .ps-foot{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:.45em;
  margin-top:.85em;
  text-align:center;
}

#nat-plan-selector .ps-summary{
  margin:0;
  max-width:40em;
  font-family:'Patrick Hand', cursive;
  font-size:1.05em;
  line-height:1.25;
  color:var(--ps-chalk);
}

#nat-plan-selector .buy{
  width:min(100%, 26em);
  min-height:44px;
  min-width:44px;
  margin:0;
  padding:.55em 1.3em;
  font-family:'Patrick Hand', cursive;
  font-size:1.25em;
  font-weight:700;
  line-height:1.1;
  text-align:center;
  color:#1c2a22;
  background:var(--ps-yellow);
  border:0;
  border-radius:12px;
  box-shadow:0 3px 0 var(--ps-yellow-shadow);
  cursor:pointer;
}
#nat-plan-selector .buy:hover{ background:#e8c25d; }
#nat-plan-selector .buy:active{ transform:translateY(2px); box-shadow:0 1px 0 var(--ps-yellow-shadow); }
#nat-plan-selector .buy:focus-visible{ outline:3px solid var(--ps-chalk); outline-offset:3px; }

/* Inline, non-alarmist "checkout is being set up" note. Empty until a click, but
   one line of space is held so nothing on the page moves when it appears. */
#nat-plan-selector .soon{
  margin:0;
  min-height:1.3em;
  font-family:'Patrick Hand', cursive;
  font-size:1em;
  line-height:1.2;
  color:var(--ps-chalk);
  text-align:center;
}

#nat-plan-selector .ps-fine{
  margin:0;
  max-width:42em;
  font-size:1em;
  line-height:1.25;
  color:var(--ps-dim);
  text-align:center;
}
#nat-plan-selector .ps-fine b{ color:var(--ps-chalk); font-weight:700; }

@media (prefers-reduced-motion:reduce){
  #nat-plan-selector .tcard,
  #nat-plan-selector .buy{ transition:none; }
}

/* ---------- locked state (added for the site integration) ------------------
   The component was built while the trials were always unsellable, so it had no
   disabled styling. /free-trial needs one: while NAT_CONFIG.trialsLive is false
   the two cards and the button must read as unavailable at a glance. Values
   mirror the site's own .go[disabled] / html.ft .tcard .go[disabled] rules. */
#nat-plan-selector .buy[disabled]{
  opacity:.62;
  cursor:default;
  box-shadow:none;
  background:#c8b071;
}
#nat-plan-selector .buy[disabled]:active{ transform:none; }

#nat-plan-selector .tcard[data-locked="true"]{
  opacity:.72;
  cursor:default;
}
@media (hover:hover){
  /* No hover affordance on a card that can't be chosen. */
  #nat-plan-selector .tcard[data-locked="true"]:hover{
    border-color:rgba(201,196,184,.45);
    background:rgba(0,0,0,.14);
  }
  #nat-plan-selector .tcard[data-locked="true"][data-selected="true"]:hover{
    border-color:var(--ps-yellow);
    background:rgba(226,185,76,.10);
  }
}
#nat-plan-selector .tcard[data-locked="true"] .ps-input{ cursor:default; }

/* ---------- mobile: stack the cards (site integration) ---------------------
   The standalone README says the two cards are always side-by-side, but the
   page this replaces stacked its cards under 760px
   (html.ft .cards{grid-template-columns:1fr}) and the integration brief asks
   for a stacked mobile layout. The override lives here, page-scoped to
   #nat-plan-selector, so the component's own grid rule is left intact for any
   other consumer and only /free-trial stacks. */
@media (max-width:760px){
  html.ft #nat-plan-selector .ps-cards{
    grid-template-columns:1fr;
    grid-auto-rows:max-content;
  }
  /* Equal height is meaningless once stacked; let each card size to content. */
  html.ft #nat-plan-selector .tcard{ height:auto; }
}
