/* TENNET — dark theme (25.11.2026). Active when <html data-theme="dark"> (topbar switch, saved in
   localStorage "tn_theme"). Mostly token overrides; the rules below fix the few places where a light
   colour is hard-coded. The logo is never recoloured: it sits on a white plate instead. */
html[data-theme="dark"] {
  color-scheme: dark;
  --tn-red-dark: #ff5c62;      /* red text on dark */
  --tn-red-tint: #2a1517;
  --tn-red-tint-2: #3b1b1e;
  --tn-ink: #f2f3f5;
  --tn-text: #c8cdd5;
  --tn-muted: #9aa2ad;
  --tn-white: #121417;         /* page background */
  --tn-surface: #1b1e23;       /* cards, panels, header */
  --tn-soft: #16191d;
  --tn-soft-2: #23272d;
  --tn-soft-3: #2d3239;
  --tn-border: #2d3239;
  --tn-border-strong: #6b7380;
  --tn-graphite: #0b0c0e;
  --tn-success-text: #4ade80;
  --tn-danger-text: #f87171;
  --tn-shadow-sm: 0 4px 14px rgba(0, 0, 0, .35);
  --tn-shadow: 0 10px 30px rgba(0, 0, 0, .4);
  --tn-shadow-lg: 0 18px 40px rgba(0, 0, 0, .5);
}

/* Buttons: hover stays a deep red behind white text */
html[data-theme="dark"] .tn-btn--primary:hover { background: #c00b13; border-color: #c00b13; }
html[data-theme="dark"] .tn-btn--outline { background: transparent; color: #ff5c62; border-color: #ff5c62; }
html[data-theme="dark"] .tn-btn--outline:hover { background: var(--tn-red); border-color: var(--tn-red); color: #fff; }
html[data-theme="dark"] .tn-btn--white { background: var(--tn-surface); color: #ff5c62; }

/* Logo on a white plate (the artwork has black "NET") */
html[data-theme="dark"] .tn-logo img { padding: 6px 10px; background: #fff; border-radius: 10px; box-sizing: content-box; }

/* Light-tinted alerts and notices keep readable text */
html[data-theme="dark"] .tn-alert--warning { background: #2b2410; border-color: #6b5410; }
html[data-theme="dark"] .tn-alert--success { background: #10261a; border-color: #1f5133; }
html[data-theme="dark"] .tn-alert--error, html[data-theme="dark"] .tn-alert--danger { background: #2a1214; border-color: #6b1f24; }
html[data-theme="dark"] .tn-alert--info { background: #111d2e; border-color: #1f3b63; }
html[data-theme="dark"] .tn-cashier-notice, html[data-theme="dark"] .tn-notice-card { background: var(--tn-surface); border-color: var(--tn-border); }

/* Forms */
html[data-theme="dark"] .tn-input, html[data-theme="dark"] .tn-check input[type="checkbox"],
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea { background-color: #121417; color: var(--tn-ink); }

/* Hero + page headers: darker fade behind the copy */
html[data-theme="dark"] .tn-hero { background: linear-gradient(100deg, #16191d 0%, #121417 62%); }
html[data-theme="dark"] .tn-carousel { background: #121417; }
html[data-theme="dark"] .tn-promo-slide--light .tn-promo-art { opacity: .9; }

/* Product screenshots keep their own (light) UI */
html[data-theme="dark"] .tn-prose img { background: transparent; }

/* Theme switch in the topbar: two small icon buttons (labels kept for screen readers) */
.tn-theme { display: inline-flex; gap: 2px; margin-left: 12px; padding: 2px; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.tn-theme__opt { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: rgba(255, 255, 255, .7); cursor: pointer; }
.tn-theme__opt .tn-icon { width: 15px; height: 15px; }
.tn-theme__opt:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.tn-theme__opt:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.tn-theme__opt[aria-pressed="true"] { background: #fff; color: var(--tn-graphite); }
html[data-theme="dark"] .tn-theme__opt[aria-pressed="true"] { background: var(--tn-red); color: #fff; }
.tn-theme__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Red surfaces keep the deep brand red (the global --tn-red-dark is lightened for text on dark) */
html[data-theme="dark"] :is(.tn-hero-media, .tn-promo-slide__media, .tn-promo-slide--red, .tn-banner-visual, .tn-pbox--red, .tn-btn--primary, .tn-audience__opt, .tn-plan--featured, .tn-promo-slide--red *) { --tn-red-dark: #c00b13; }

/* Remaining light-tinted surfaces */
html[data-theme="dark"] .tn-prose tbody tr:nth-child(even) > td { background: #181b1f; }
html[data-theme="dark"] .tn-cashier-status.is-open { background: #10261a; border-color: #1f5133; }
html[data-theme="dark"] .tn-cashier-hours__tag { background: #3a2f0f; color: #fde68a; }
html[data-theme="dark"] .tn-plan__badge { border-color: var(--tn-surface); }

/* Carousel controls bar and featured plan button */
html[data-theme="dark"] .tn-carousel__bar { background: rgba(27, 30, 35, .96); }
html[data-theme="dark"] .tn-carousel__toggle { border-left-color: var(--tn-border); }
html[data-theme="dark"] .tn-plan--featured .tn-btn { background: #fff; border-color: #fff; color: var(--tn-red); }
html[data-theme="dark"] .tn-plan--featured .tn-btn:hover { background: var(--tn-graphite); border-color: var(--tn-graphite); color: #fff; }

/* Plans banner on the promo slides (white glass card in light mode) */
html[data-theme="dark"] .tn-showcase { background: rgba(27, 30, 35, .96); border-color: rgba(255, 255, 255, .08); box-shadow: 0 24px 60px rgba(0, 0, 0, .55); }
html[data-theme="dark"] .tn-showcase__list li.is-featured { background: rgba(233, 15, 24, .16); }
html[data-theme="dark"] .tn-showcase__list li.is-featured .tn-showcase__name small { color: var(--tn-text); }
html[data-theme="dark"] .tn-cashier-map__overlay { background: rgba(27, 30, 35, .94); }

/* Info callout in page content (light blue in light mode) */
html[data-theme="dark"] .tn-callout, html[data-theme="dark"] .tn-prose .tn-callout { background-color: #111d2e; border-color: #1f3b63; color: var(--tn-text); }
html[data-theme="dark"] .tn-callout a { color: #ff5c62; }

/* Red TEXT on dark surfaces: #E90F18 is ~4:1 on #121417; text uses a lighter red (≥4.5:1, external audit 25.11.2026,
   point 11). Icons, buttons and red surfaces keep the brand red. Red-surface contexts are excluded. */
html[data-theme="dark"] :is(.tn-price__amount, .tn-showcase__price, .tn-showcase__big small, .tn-link-arrow, .tn-service-card a,
  .tn-plan-price, .tn-nav__item.is-current > .tn-nav__link, .tn-nav .tn-nav__link:hover, .tn-hero h1 span, .tn-hero .tn-hero__title span, .tn-error__code,
  .tn-news-row__day, .tn-pbox__price, .tn-sh-service a, .tn-hero-offer__new, .tn-hero-offer__title, .tn-eyebrow, .tn-sh-eyebrow,
  .tn-cookie a, .tn-link, .tn-prose a:not(.tn-btn)):not(.tn-plan--featured *):not(.tn-pbox--red *):not(.tn-promo-slide--red *) { color: #ff5c62; }
html[data-theme="dark"] .tn-plan--featured .tn-plan-price { color: #fff; }
html[data-theme="dark"] { scrollbar-color: #3a3f47 #121417; }
