/*
 * Talegates Core — application UI (login, register, account, Bloxma link, features, pricing, contact).
 *
 * Theme-agnostic by design: every colour, font and radius is a CSS custom property with a fallback, so the
 * account system looks correct under ANY theme. The Talegates theme only has to define the --tg-* tokens
 * (see wp-content/themes/talegates/assets/css/tokens.css) to restyle it; nothing here depends on the theme.
 */

.tga {
  --_ink: var(--tg-ink, #0f1115);
  --_text: var(--tg-text, #15181e);
  --_muted: var(--tg-text-muted, #5b616e);
  --_surface: var(--tg-surface, #ffffff);
  --_surface-2: var(--tg-surface-2, #f5f2ec);
  --_line: var(--tg-line, #dcd7cc);
  --_accent: var(--tg-accent, #ff5b2e);
  --_accent-ink: var(--tg-accent-ink, #0f1115);
  --_accent-text: var(--tg-accent-text, #c23a12);
  --_focus: var(--tg-focus, #2f7bff);
  --_ok: var(--tg-ok, #13795b);
  --_warn: var(--tg-warn, #8a5a00);
  --_danger: var(--tg-danger, #b3261e);
  --_radius: var(--tg-radius, 10px);
  --_font: var(--tg-font-body, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  --_display: var(--tg-font-display, var(--_font));
  --_mono: var(--tg-font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);

  box-sizing: border-box;
  max-width: 100%;
  color: var(--_text);
  font-family: var(--_font);
  font-size: 1rem;
  line-height: 1.55;
}
.tga *, .tga *::before, .tga *::after { box-sizing: inherit; }

.tga-auth { max-width: 30rem; margin-inline: auto; }
.tga-account, .tga-pricing, .tga-contact { max-width: 72rem; margin-inline: auto; }
.tga-contact { max-width: 36rem; }

.tga-title { font-family: var(--_display); font-weight: 700; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem); line-height: 1.15; margin: 0 0 .4rem; letter-spacing: -.01em; }
.tga-lede { color: var(--_muted); margin: 0 0 1.25rem; }
.tga-h3 { font-family: var(--_display); font-size: 1.15rem; line-height: 1.25; margin: 0 0 .75rem; }
.tga-h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--_muted); margin: 1.25rem 0 .5rem; font-weight: 600; }
.tga-muted { color: var(--_muted); font-size: .9rem; }
.tga-bigline { font-size: 1.15rem; font-weight: 600; margin: .25rem 0 .75rem; overflow-wrap: anywhere; }
.tga a { color: var(--_accent-text); text-underline-offset: .15em; }
.tga a:hover { text-decoration-thickness: 2px; }
.tga code { font-family: var(--_mono); font-size: .9em; background: var(--_surface-2); padding: .1em .4em; border-radius: 4px; overflow-wrap: anywhere; }
.tga-links { margin-top: 1rem; font-size: .95rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* Honeypot: off-screen, not display:none (naive bots still fill it). */
.tga-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.tga .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- forms ---- */
.tga-form { display: grid; gap: 1rem; }
.tga-inline { display: inline-block; margin: 0; }
.tga-field { display: grid; gap: .3rem; }
.tga-field > span { font-weight: 600; font-size: .9rem; }
.tga-field small { color: var(--_muted); font-size: .85rem; }
.tga input[type="text"], .tga input[type="email"], .tga input[type="password"], .tga input[type="url"], .tga input[type="search"], .tga select, .tga textarea {
  width: 100%; font: inherit; color: var(--_text); background: var(--_surface);
  border: 1.5px solid var(--_line); border-radius: calc(var(--_radius) - 2px); padding: .7rem .8rem; min-height: 2.75rem;
}
.tga textarea { resize: vertical; }
.tga input:focus-visible, .tga select:focus-visible, .tga textarea:focus-visible, .tga-btn:focus-visible, .tga a:focus-visible, .tga summary:focus-visible {
  outline: 3px solid var(--_focus); outline-offset: 2px;
}
.tga-check { display: flex; gap: .6rem; align-items: flex-start; font-size: .95rem; }
.tga-check input { margin-top: .25rem; width: 1.1rem; height: 1.1rem; accent-color: var(--_accent); flex: none; }

.tga-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.75rem; padding: .6rem 1.1rem;
  font: inherit; font-weight: 600; text-decoration: none !important; cursor: pointer;
  color: var(--_text); background: var(--_surface); border: 1.5px solid var(--_text); border-radius: calc(var(--_radius) - 2px);
  transition: background-color .15s, transform .15s, box-shadow .15s;
}
.tga-btn:hover { background: var(--_surface-2); }
.tga-btn:active { transform: translateY(1px); }
.tga-btn--primary { color: var(--_accent-ink) !important; background: var(--_accent); border-color: var(--_accent); }
.tga-btn--primary:hover { background: color-mix(in srgb, var(--_accent) 88%, #fff); }
.tga-btn--small { min-height: 2.25rem; padding: .35rem .8rem; font-size: .9rem; }
.tga-btn--block { display: flex; width: 100%; }
.tga-btn--danger { color: #fff; background: var(--_danger); border-color: var(--_danger); }
.tga-btn.is-disabled, .tga-btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; border-style: dashed; pointer-events: none; }

/* ---- notices ---- */
.tga-notice { padding: .8rem 1rem; border-radius: calc(var(--_radius) - 2px); border: 1.5px solid; margin: 0 0 1.25rem; font-weight: 500; }
.tga-notice--success { color: var(--_ok); border-color: currentColor; background: color-mix(in srgb, var(--_ok) 8%, var(--_surface)); }
.tga-notice--error { color: var(--_danger); border-color: currentColor; background: color-mix(in srgb, var(--_danger) 7%, var(--_surface)); }
.tga-notice--info { color: var(--_text); border-color: var(--_line); background: var(--_surface-2); }
.tga-warn { background: color-mix(in srgb, var(--_warn) 10%, var(--_surface)); border-left: 4px solid var(--_warn); padding: .75rem 1rem; border-radius: 4px; }

/* ---- cards / dashboard ---- */
.tga-card { background: var(--_surface); border: 1.5px solid var(--_line); border-radius: var(--_radius); padding: 1.25rem; }
.tga-card--quiet { background: var(--_surface-2); border-color: transparent; margin-top: 1.5rem; }
.tga-account__head { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: flex-start; margin-bottom: 1.5rem; }
.tga-account__head .tga-lede { margin-bottom: 0; overflow-wrap: anywhere; }
.tga-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); align-items: start; }
.tga-card--wide { grid-column: 1 / -1; }
.tga-dl { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: .75rem 0 1rem; }
.tga-dl dt { color: var(--_muted); font-size: .9rem; }
.tga-dl dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 30rem) { .tga-dl { grid-template-columns: 1fr; gap: 0; } .tga-dl dd { margin-bottom: .6rem; } }
.tga-plan { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: 0 0 .5rem; }
.tga-status--ok { color: var(--_ok); font-weight: 600; display: flex; gap: .4rem; align-items: center; margin: 0 0 .5rem; }
.tga-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.tga details { border-top: 1px solid var(--_line); padding: .75rem 0; }
.tga details:first-of-type { border-top: 0; }
.tga summary { cursor: pointer; font-weight: 600; padding: .25rem 0; }
.tga details[open] > summary { margin-bottom: .75rem; }
.tga-danger summary { color: var(--_danger); }
.tga-sessions { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.tga-sessions li { display: flex; gap: 1rem; justify-content: space-between; align-items: center; flex-wrap: wrap; padding: .75rem; background: var(--_surface-2); border-radius: calc(var(--_radius) - 2px); }

.tga-pill { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; border: 1.5px solid var(--_line); background: var(--_surface-2); color: var(--_text); white-space: nowrap; }
.tga-pill--premium { background: var(--_accent); border-color: var(--_accent); color: var(--_accent-ink); }
.tga-pill--lifetime { background: var(--_ink); border-color: var(--_ink); color: #fff; }
.tga-pill--beta { background: transparent; border-style: dashed; }

.tga-featurelist { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.tga-featurelist li { display: flex; gap: .55rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid var(--_line); }
.tga-featurelist .is-on .tga-icon { color: var(--_ok); }
.tga-featurelist .is-off { color: var(--_muted); }
.tga-featurelist__name { flex: 1; }
.tga-icon { flex: none; }

/* ---- feature grid (marketing) ---- */
.tga-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.tga-features.tga-cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
@media (min-width: 62rem) {
  .tga-features.tga-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .tga-features.tga-cols-4 { grid-template-columns: repeat(4, 1fr); }
  .tga-features.tga-cols-2 { grid-template-columns: repeat(2, 1fr); }
}
.tga-feature { background: var(--_surface); border: 1.5px solid var(--_line); border-radius: var(--_radius); padding: 1.25rem; display: flex; flex-direction: column; gap: .35rem; }
.tga-feature__cat { margin: 0; font-family: var(--_mono); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--_muted); }
.tga-feature__name { margin: 0; font-family: var(--_display); font-size: 1.2rem; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.tga-feature__text { margin: 0; color: var(--_muted); flex: 1; }
.tga-feature__tier { margin: .5rem 0 0; }

/* ---- pricing ---- */
.tga-toggle__input { position: absolute; opacity: 0; pointer-events: none; }
.tga-toggle { display: flex; width: max-content; max-width: 100%; margin: 0 auto 2rem; padding: .25rem; background: var(--_surface-2); border: 1.5px solid var(--_line); border-radius: 999px; }
.tga-toggle label { padding: .45rem 1.25rem; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .95rem; }
.tga-toggle__input:nth-of-type(1):checked ~ .tga-toggle label:nth-child(1),
.tga-toggle__input:nth-of-type(2):checked ~ .tga-toggle label:nth-child(2) { background: var(--_text); color: var(--_surface); }
.tga-toggle__input:focus-visible ~ .tga-toggle { outline: 3px solid var(--_focus); outline-offset: 2px; }
.tga-plans { display: grid; gap: 1.25rem; grid-template-columns: 1fr; max-width: 34rem; margin-inline: auto; align-items: stretch; }
@media (min-width: 62rem) { .tga-plans { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none; } }
.tga-plan-slot { display: none; }
.tga-toggle__input:nth-of-type(1):checked ~ .tga-plans .tga-plan-slot--month,
.tga-toggle__input:nth-of-type(2):checked ~ .tga-plans .tga-plan-slot--year { display: block; }
.tga-plan-slot > .tga-plan-card { height: 100%; }
.tga-plan-card { display: flex; flex-direction: column; gap: 1rem; background: var(--_surface); border: 1.5px solid var(--_line); border-radius: calc(var(--_radius) + 4px); padding: 1.5rem; }
.tga-plan-card--premium { border-color: var(--_accent); box-shadow: 0 0 0 1px var(--_accent) inset; }
.tga-plan-card--lifetime { background: var(--_ink); color: #fff; border-color: var(--_ink); --_muted: #aeb3bf; --_line: #2a2f3a; }
.tga-plan-card--lifetime .tga-check, .tga-plan-card--lifetime .tga-icon { color: var(--_accent); }
.tga-plan-card--lifetime .tga-btn { background: transparent; color: #fff; border-color: #fff; }
.tga-plan-card__name { font-family: var(--_display); font-size: 1.4rem; margin: 0; }
.tga-plan-card__tag { color: var(--_muted); margin: .25rem 0 .75rem; }
.tga-plan-card__price { margin: 0; display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.tga-price { font-family: var(--_display); font-size: 2rem; font-weight: 700; line-height: 1.1; }
.tga-price--soon { font-size: 1.15rem; font-weight: 600; color: var(--_muted); }
.tga-per { color: var(--_muted); font-size: .9rem; }
.tga-plan-card__lead { margin: 0; font-weight: 600; font-size: .9rem; }
.tga-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; flex: 1; }
.tga-checklist li { display: flex; gap: .55rem; align-items: flex-start; }
.tga-checklist .tga-icon { color: var(--_ok); margin-top: .2rem; }

@media (prefers-reduced-motion: reduce) { .tga-btn { transition: none; } }
@media (forced-colors: active) { .tga-btn, .tga-card, .tga-feature, .tga-plan-card { border: 1.5px solid CanvasText; } }
