/**
 * URM Checkout — pseudo-checkout component styles.
 *
 * Self-contained: every rule is scoped under `#checkout-wrapper.urm-checkout`
 * so it styles only the plugin's own markup (inc/class-urm-checkout-renderer.php)
 * and cannot leak into the host theme. No Tailwind utilities are assumed to be
 * present — the renderer emits semantic classes only.
 *
 * Visual target (magenta-on-dark): the original NTM checkout layout — a payment-
 * method row (Credit Card / PayPal), then the Monthly + Annual options as two
 * side-by-side bordered cards with the price copy INSIDE each, then the JOIN
 * button. The wrapper is TRANSPARENT — the host landing page supplies the dark
 * background; the plugin paints none of its own. Cards are #1E1E1E with a thin
 * border (selected #FF0066, unselected #C4C4C4), Bakbak One titles in
 * css-uppercase, Roboto price lines in normal case, and a magenta JOIN button.
 * In the nested (two-tier) layout the tier is the card and its options read as
 * rows inside it.
 *
 * Title-case rule: every text node the renderer emits is title case; the
 * all-caps appearance is `text-transform: uppercase` here, never in the markup.
 *
 * Selected-state contract toggled by js/checkout-wc.js (do not rename):
 *   .selected            chosen option / tier / payment-method
 *   .border-urm-magenta  added alongside .selected on the chosen tier + option
 *   .hidden              hide an element (wrapper pre-reveal, annual in PayPal
 *                        mode, the inactive description, the check-icon path)
 *   .block               shown check-icon path (JS swaps it with .hidden)
 */

@import url("https://fonts.googleapis.com/css2?family=Bakbak+One&family=Roboto:wght@400;500;700&display=swap");

/* Brand palette. */
#checkout-wrapper.urm-checkout {
  --urm-magenta: #e63875;
  --urm-magenta-light: #f04d8a;
  --urm-border-selected: #ff0066;
  --urm-border: #c4c4c4;
  /* Selected fill for the tier/option circle indicator. No exact URM gray token
     matches #D9D9D9 (the theme grays are #E5E5E5 / #C4C4C4); this is the design's
     specified value for the filled selected circle. */
  --urm-circle-fill-selected: #d9d9d9;
  --urm-card: #1e1e1e;
  --urm-text: #ffffff;
  --urm-font-display: "Bakbak One", "Helvetica Neue", Arial, sans-serif;
  --urm-font-body: "Roboto", "Helvetica Neue", Arial, sans-serif;
}

/* ------------------------------------------------------------------ */
/* Visibility contract                                                 */
/* ------------------------------------------------------------------ */

/* Wrapper is rendered `hidden`; JS removes the class to reveal it. */
#checkout-wrapper.urm-checkout.hidden {
  display: none;
}

/* Any descendant carrying `hidden` is hidden. `!important` is safe here:
   the check-icon path and `.hidden` are mutually exclusive (JS swaps
   `.hidden` <-> `.block`), so this never fights the selected-check rules. */
#checkout-wrapper.urm-checkout .hidden {
  display: none !important;
}

/* ------------------------------------------------------------------ */
/* Section shell                                                       */
/* ------------------------------------------------------------------ */

/* TRANSPARENT — no background of its own. The landing page already supplies
   the dark backdrop; the plugin paints no fill, image, texture, or scanline. */
#checkout-wrapper.urm-checkout {
  box-sizing: border-box;
  max-width: 960px;
  margin: 0 auto;
  /* 16px top so the lp-section flex `gap` above the checkout doesn't stack into
     an oversized first gap (Tarik: only the first gap is problematic). */
  padding: 16px 48px 24px;
  text-align: center;
  color: var(--urm-text);
  font-family: var(--urm-font-body);
  background: transparent;
}

#checkout-wrapper.urm-checkout *,
#checkout-wrapper.urm-checkout *::before,
#checkout-wrapper.urm-checkout *::after {
  box-sizing: border-box;
}

/* ------------------------------------------------------------------ */
/* Heading (template-owned; styled here as a sensible default)          */
/* ------------------------------------------------------------------ */

#checkout-wrapper.urm-checkout .checkout-heading {
  margin: 0 0 28px;
  color: var(--urm-magenta);
  font-family: var(--urm-font-display);
  font-size: clamp(28px, 5vw, 45px);
  line-height: 1.15;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* ------------------------------------------------------------------ */
/* Payment-method toggle                                               */
/* ------------------------------------------------------------------ */

#checkout-wrapper.urm-checkout .checkout-payment-methods {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
}

/* No border, no background: each method is just its radio + brand mark inline,
   mutually exclusive (the NTM CC 2026 design). The magenta selected state is
   carried by the check icon below, not a box. */
#checkout-wrapper.urm-checkout .payment-method {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--urm-text);
  font-family: var(--urm-font-body);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}

/* Brand mark (card-brands / PayPal logo): readable height, intrinsic width. */
#checkout-wrapper.urm-checkout .payment-method-image {
  display: block;
  height: 22px;
  width: auto;
}

#checkout-wrapper.urm-checkout .payment-method-label {
  white-space: nowrap;
}

/* ------------------------------------------------------------------ */
/* Product tiers + options                                             */
/* ------------------------------------------------------------------ */

#checkout-wrapper.urm-checkout .checkout-products {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 24px;
  margin-bottom: 32px;
}

@media (min-width: 640px) {
  #checkout-wrapper.urm-checkout .checkout-products {
    flex-direction: row;
  }
}

/* Tier card. */
#checkout-wrapper.urm-checkout .product {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  gap: 12px;
  padding: 24px 40px 12px;
  border: 1px solid var(--urm-border);
  border-radius: 4px;
  background-color: var(--urm-card);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

/* Selected tier — magenta border (JS adds `selected` + `border-urm-magenta`).
   `!important` here defends the contract color against a host theme that ships
   a `.border-urm-magenta` Tailwind utility with its own `!important` (the
   urm.academy / nailthemix themes do); this scoped, higher-specificity rule
   wins, so the selected border stays the contract's #FF0066. */
#checkout-wrapper.urm-checkout .product.selected,
#checkout-wrapper.urm-checkout .product.border-urm-magenta {
  border-color: var(--urm-border-selected) !important;
}

/* Tier title / single-tier "$1 Trial" label. */
#checkout-wrapper.urm-checkout .product-label {
  margin: 0;
  font-family: var(--urm-font-display);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--urm-text);
}

/* Single-tier "$1 Trial" label rendered as a DIRECT child of .checkout-products
   (no .product tier wrapper). On the desktop row layout it would otherwise sit to
   the LEFT of the lone option card; force it onto its own full-width row above. */
#checkout-wrapper.urm-checkout .checkout-products > .product-label {
  flex: 0 0 100%;
  text-align: center;
}

/* Tier description — sits under the title, above the options. */
#checkout-wrapper.urm-checkout .product-description {
  margin: 0;
  font-family: var(--urm-font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--urm-text);
}

/* Option card (monthly / annual / trial). In the flat (single-tier) layout
   these are the top-level cards `.checkout-products` lays out side by side; the
   price copy lives INSIDE each card. A discrete bordered card: icon + a text
   block (label + price lines), with a clear selected-vs-unselected border. In
   the nested layout they sit inside a tier `.product` and tone down to rows
   (override below). */
#checkout-wrapper.urm-checkout .product-option {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  gap: 16px;
  padding: 24px 28px;
  border: 1px solid var(--urm-border);
  border-radius: 4px;
  background-color: var(--urm-card);
  color: var(--urm-text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

/* Selected option — magenta border (JS adds `selected` + `border-urm-magenta`).
   `!important` defends the contract color against a host theme's own
   `.border-urm-magenta` utility, mirroring the tier rule above. */
#checkout-wrapper.urm-checkout .product-option.selected,
#checkout-wrapper.urm-checkout .product-option.border-urm-magenta {
  border-color: var(--urm-border-selected) !important;
}

/* The card text block: label on top, the price line(s) below it. */
#checkout-wrapper.urm-checkout .product-option-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
}

#checkout-wrapper.urm-checkout .product-option-label {
  font-family: var(--urm-font-display);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 400;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--urm-text);
}

/* Nested layout: options read as borderless rows inside the tier card (the tier
   card is the card there), not as standalone cards. */
#checkout-wrapper.urm-checkout .product .product-option {
  flex: 0 0 auto;
  gap: 12px;
  padding: 10px 0;
  border: 0;
  background-color: transparent;
  border-radius: 0;
}

#checkout-wrapper.urm-checkout .product .product-option-label {
  font-size: 20px;
}

/* ------------------------------------------------------------------ */
/* Check icon (original NTM design: outlined circle, stroked checkmark      */
/* appears inside on select — NOT a filled disc). The SVG draws its own      */
/* circle + check via stroke=currentColor; color goes magenta when selected. */
/* ------------------------------------------------------------------ */

#checkout-wrapper.urm-checkout .check-icon {
  flex-shrink: 0;
  width: 23px;
  height: 23px;
  color: var(--urm-border);
  background-color: transparent;
  transition: color 0.15s ease;
}

/* Selected-state indicators differ by element type:
   - Payment methods (Credit Card / PayPal): the circle + checkmark stay the
     neutral border color (#C4C4C4) when selected — NOT magenta — and the check
     reveals inside the circle.
   - Tier/option cards (Monthly / Annual): the circle FILLS solid with the
     selected fill (#D9D9D9) and shows NO checkmark. */

/* Payment method selected: keep the neutral color (default #C4C4C4); check reveals. */
#checkout-wrapper.urm-checkout .payment-method.selected .check-icon {
  color: var(--urm-border);
}

/* Tier/option card selected: solid filled circle, no check. */
#checkout-wrapper.urm-checkout .product-option.selected .check-icon circle {
  fill: var(--urm-circle-fill-selected);
  stroke: var(--urm-circle-fill-selected);
}

/* The checkmark path: a stroked check, hidden by default. */
#checkout-wrapper.urm-checkout .check-icon path {
  fill: none;
  stroke: currentColor;
  display: none;
}

/* The check reveals ONLY for a selected payment method (JS toggles `.block`). */
#checkout-wrapper.urm-checkout .payment-method .check-icon path.block,
#checkout-wrapper.urm-checkout .payment-method.selected .check-icon path {
  display: block;
}

/* Tier/option cards never render the checkmark — their selected state is the
   filled circle, so keep the path hidden even when JS toggles `.block`. */
#checkout-wrapper.urm-checkout .product-option .check-icon path {
  display: none !important;
}

/* ------------------------------------------------------------------ */
/* Price copy — the per-card credit-card / PayPal lines                 */
/* ------------------------------------------------------------------ */

/* These live INSIDE each option card (the label's price line). The active
   payment method's line shows; js/checkout-wc.js toggles the `hidden` class on
   the other across every card. Block so they sit on their own line beneath the
   label inside the card's text column. */
#checkout-wrapper.urm-checkout .credit-card-description,
#checkout-wrapper.urm-checkout .paypal-description {
  display: block;
  margin: 0;
  color: var(--urm-text);
  font-family: var(--urm-font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
}

/* ------------------------------------------------------------------ */
/* CTA                                                                 */
/* ------------------------------------------------------------------ */

/* The plugin ships NO #joinButton styling on purpose: the CTA defers to the
   theme's own canonical button class (supplied per-site via the
   `join_button_class` config, e.g. nailthemix's `cta text-2xl p-4`), so it
   inherits the theme's fonts/colors instead of a plugin-invented style. */
