/* ============================================================
   subscribe.css — subscribe / renew page
   Pricing cards, intro copy, and the panels subscribe.js toggles.

   Form / response / overlay chrome shared with makePayment.php
   lives in payment.css. Both pages load payment.css AFTER this
   file, so payment.css wins on any overlap.

   Builds on static-pages.css design tokens (--sp-*) so the page
   stays consistent with advertise / contact / about.
   Global tokens (--accent, --muted, --paper …) come from base.css.
   ============================================================ */

/* ── Hero / intro copy (uses .spHero from static-pages.css) ── */

#subscribePanel p,
#renewPanel p {
  color: var(--sp-grey);
  line-height: 1.65;
  margin: 0 0 12px;
  padding-left: 21px;
}

#subscribePanel p:last-child {
  font-weight: 600;
  color: var(--sp-primary);
  padding-left: 30px;
}

#subscribePanel .spSubtitle p{
  font-size: 1.05rem;
  color: #6b6b6b;
  margin: 0;
  padding-left: 0px;
  line-height: 1.6;
}

#renewPanel h3 {
  margin: 0 0 4px 21px;
  color: var(--sp-primary);
  font-size: 1.1rem;
  word-break: break-word;
}

/* ── Subscription choice cards ─────────────────────────────── */

#subscriptionChoicesPanel {
  margin-bottom: 44px;
}

/* Direct child only → targets the pricing row, not the form's
   nested .row input pairs. */
#subscriptionChoicesPanel > .row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
  width: 100%;
  margin: 0;
  align-items: stretch;
}

.subschoice {
  display: flex;
  flex-direction: column;
  text-align: center;
  background: var(--sp-card-bg);
  border: 1px solid var(--sp-border);
  border-top: 4px solid var(--sp-primary);
  border-radius: var(--sp-radius);
  padding: 24px 20px 20px;
  box-shadow: var(--sp-shadow);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    border-color 0.18s ease, opacity 0.25s ease;
}

.subschoice:hover {
  transform: translateY(-4px);
  box-shadow: var(--sp-shadow-hover);
}

/* ── Card header ── */

.choiceHeader {
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--sp-border);
}

.subsType {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sp-primary);
  margin-bottom: 6px;
}

.subsHdr {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--sp-grey);
}

/* ── Card body ── */

.choiceBody {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 0.9rem;
  line-height: 1.7;
  color: #5a5a5a;
}

/* Cards with no price (corporate, spent trial) centre their copy rather
   than reserving an empty price band. */
.choiceBody.noPrice {
  justify-content: center;
}

/* Fixed band height keeps the price line on the same baseline across
   cards regardless of $ vs "Free". */
.price {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 4.25rem;
  line-height: 1.15;
}

.priceAmt {
  display: block;
  font-weight: 700;
  color: var(--sp-grey);
  font-size: 1.4rem;
  font-variant-numeric: lining-nums tabular-nums;
}

.priceVal {
  font-size: 2.6rem;
  letter-spacing: -0.02em;
}

.priceUnit {
  display: block;
  margin-top: 2px;
  font-size: 0.72rem;
  font-variant-numeric: lining-nums tabular-nums;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.priceFree {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--sp-green);
}

/* auto margins top AND bottom: leftover card height is split evenly
   above and below the list instead of collecting in one gap. */
.choiceFeatures {
  margin: auto 0;
  padding: 0;
  list-style: none;
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  line-height: 1.4;
}

.choiceFeatures li {
  position: relative;
  padding-left: 22px;
}

.choiceFeatures li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 0.36em;
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--sp-green);
  border-bottom: 2px solid var(--sp-green);
  transform: rotate(-45deg);
}

/* Prose block for cards that state a status rather than list features. */
.choiceNote {
  margin: auto 0;
  line-height: 1.6;
}

/* ── Select button ── */

.choiceBtn {
  align-self: center;
  margin-top: 20px;
  min-width: 62%;
  padding: 10px 24px;
  border-radius: 999px;
  background: var(--sp-primary);
  color: #fff;
  font-family: var(--font-furniture);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: background 0.15s ease;
}

.subschoice:hover .choiceBtn {
  background: #9e2001;
}

/* ── Card states (toggled by subscribe.js) ── */

.subschoice.disabled {
  opacity: 0.35;
  transform: none;
  box-shadow: var(--sp-shadow);
}

.subschoice.disabled.gone {
  pointer-events: none;
}

.subschoice.locked {
  pointer-events: none;
}

.subschoice.locked .choiceBtn {
  display: none;
}

.subschoice.invalid {
  border-color: var(--sp-border);
  border-top-color: #cfcac4;
  color: #9a938b;
  cursor: default;
}

.subschoice.invalid .subsType,
.subschoice.invalid .subsHdr {
  color: #9a938b;
}

.subschoice.invalid .choiceFeatures li::before {
  border-color: #b9b2aa;
}

.subschoice.invalid:hover {
  transform: none;
  box-shadow: var(--sp-shadow);
}

/* ── Form fields specific to this page ─────────────────────── */

#poscat {
  margin-top: 1em;
}

.turnstile-widget {
  margin: 18px 0 4px;
}

#userInfoPanel {
  margin-top: 32px;
}

#userInfoPanel.hidden {
  height: 0;
  overflow: hidden;
}

/* Under the form: two short notes, then a separate contact card. */
.subsInfo {
  margin-top: 32px;
}

.subsInfoList {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}

.subsInfoList li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 10px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--sp-grey, #4D4F53);
}

.subsInfoList li:last-child {
  margin-bottom: 0;
}

.subsInfoIcon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: #2b2b2b;
}

.subsInfoIcon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.subsContactCard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 18px 24px;
  background: var(--sp-card-bg, #fff);
  border: 1px solid var(--sp-border, #e4e0dc);
  border-radius: 12px;
}

.subsContactTitle {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #2b2b2b;
}

.subsContactSub {
  margin: 2px 0 0;
  font-size: 0.88rem;
  color: var(--sp-grey, #4D4F53);
}

.subsContactActions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Same pill as the account page's Sign out / Log out buttons. */
.subsContactPill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--sp-border, #e4e0dc);
  border-radius: 999px;
  background: #fff;
  color: var(--masthead-bg, #BD2701);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}

.subsContactPill:hover {
  background: #fbe9e4;
  border-color: var(--masthead-bg, #BD2701);
}

.subsContactPill svg {
  width: 16px;
  height: 16px;
}

#chosenSubscriptionPanel h1 {
  font-size: 1.6rem;
  color: var(--sp-grey);
}

span.validUser {
  color: var(--sp-grey);
  font-size: 1.25em;
}

.pretext {
  font-size: 1.2em;
  font-weight: bold;
}

/* Rewrite: cards are plain divs with data-plan; the selected one gets this. */
.subschoice.selected {
  outline: 3px solid var(--pif-red, #BD2701);
}

/* Needs .formOuter: payment.css hides every .formOuter label that is not .show. */
.formOuter label.coChoice {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
  padding: 12px 14px;
  border: 1px solid var(--sp-border, #e2ded9);
  border-radius: 10px;
  background: #fff;
  color: #2b2b2b;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}

/* Form controls don't inherit the page font, so they rendered in the browser's sans-serif at 17px. */
#subscribeForm .formOuter input,
#subscribeForm .formOuter select {
  font-family: inherit;
  font-size: 0.9rem;
}

/* Field errors sit in the gap above the next row's floating label; kept small so they clear it. */
#subscribeForm .formOuter .row .errMsg {
  box-sizing: border-box;
  min-height: 27px;
  padding-top: 2px;
  font-size: 0.72rem;
  line-height: 1.2;
}

/* Match the text inputs instead of the browser's native control. */
#subscribeForm .formOuter select {
  appearance: none;
  box-sizing: border-box;
  width: 100%;
  height: 34px;
  padding: 0 32px 0 0.5em;
  border: 1px solid #dfe1e5;
  border-radius: 2px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23757575' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 11px center;
  color: #000;
  line-height: normal;
  cursor: pointer;
}

#subscribeForm .formOuter select:has(option[value=""]:checked) {
  color: #757575;
}

#subscribeForm .formOuter select:focus {
  outline: none;
  border-color: var(--sp-primary, #BD2701);
  box-shadow: 0 0 0 2px rgba(189, 39, 1, 0.12);
}

#subscribeForm #companyChoice p,
#subscribeForm .formOuter label.coChoice {
  font-size: 0.9rem;
}

.formOuter label.coChoice:hover {
  border-color: var(--sp-primary, #BD2701);
}

.formOuter label.coChoice:has(input:checked) {
  border-color: var(--sp-primary, #BD2701);
  background: rgba(189, 39, 1, 0.05);
  box-shadow: inset 0 0 0 1px var(--sp-primary, #BD2701);
}

.formOuter label.coChoice input {
  appearance: none;
  flex: none;
  display: grid;
  place-content: center;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: 2px solid #b5b0aa;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.formOuter label.coChoice input::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sp-primary, #BD2701);
  transform: scale(0);
  transition: transform 0.12s;
}

.formOuter label.coChoice input:checked {
  border-color: var(--sp-primary, #BD2701);
}

.formOuter label.coChoice input:checked::before {
  transform: scale(1);
}

.formOuter label.coChoice input:focus {
  box-shadow: none;
}

.formOuter label.coChoice input:focus-visible {
  outline: 2px solid var(--sp-primary, #BD2701);
  outline-offset: 2px;
}
