/* Xtreme HD IPTV — shared design tokens, base elements, site header and
   footer for the customer portal and the checkout. Loaded on Xtreme pages
   only, through nd_theme_head_links(); page styles live in xtreme-shop.css
   (checkout) and assets/css/xtreme-portal.css (portal).

   Identity: white pages with pale-blue bands, navy type, pill-shaped blue
   actions, generous 20px card radii and a thin blue rule under the header.
   No web fonts (the portal CSP only allows 'self'): a system UI stack,
   tightened for headings. */

:root {
  --xt-blue: #0878d1;
  --xt-blue-hover: #0562ad;
  --xt-navy: #0f172a;
  --xt-white: #ffffff;
  --xt-pale: #eff6ff;
  --xt-muted: #52657a;

  --xt-pale-2: #dbeafe;
  --xt-line: #e2e8f0;
  --xt-line-strong: #cbd5e1;
  --xt-navy-2: #1e293b;
  --xt-success: #0f7a4a;
  --xt-success-soft: #e7f6ee;
  --xt-warning: #8a5300;
  --xt-warning-soft: #fff4e0;
  --xt-danger: #b42318;
  --xt-danger-soft: #fdecea;

  --xt-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --xt-mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, "Liberation Mono", monospace;

  --xt-r-sm: 10px;
  --xt-r: 14px;
  --xt-r-lg: 20px;
  --xt-r-xl: 28px;
  --xt-pill: 999px;

  --xt-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --xt-shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.18);
  --xt-shadow-blue: 0 12px 28px -10px rgba(8, 120, 209, 0.45);
  --xt-focus: 0 0 0 3px #ffffff, 0 0 0 5px var(--xt-blue);

  --xt-container: 1200px;
  --xt-header-h: 72px;
  --xt-ease: cubic-bezier(.2, .7, .2, 1);

  --xt-z-header: 1000;
  --xt-z-dialog: 2000;
  --xt-z-toast: 2100;
}

@media (max-width: 960px) {
  :root { --xt-header-h: 64px; }
}

html { scroll-padding-top: calc(var(--xt-header-h) + 16px); -webkit-text-size-adjust: 100%; }
html.xt-menu-open { overflow: hidden; }

body {
  margin: 0;
  font-family: var(--xt-font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--xt-navy);
  background: var(--xt-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--xt-navy); letter-spacing: -0.02em; line-height: 1.2; }
a { color: var(--xt-blue); }
a:hover { color: var(--xt-blue-hover); }
img { max-width: 100%; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: none;
  box-shadow: var(--xt-focus);
  border-radius: var(--xt-r-sm);
}

.xt-container {
  width: 100%;
  max-width: var(--xt-container);
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}
@media (max-width: 600px) { .xt-container { padding: 0 16px; } }

.xt-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- Skip link ---------- */
.xt-skip {
  position: absolute;
  left: 16px; top: -60px;
  z-index: calc(var(--xt-z-header) + 1);
  padding: 10px 16px;
  background: var(--xt-navy);
  color: #fff;
  border-radius: var(--xt-pill);
  font-weight: 700;
  text-decoration: none;
  transition: top .15s ease;
}
.xt-skip:focus { top: 12px; color: #fff; }

/* ---------- Buttons (shared by both apps) ---------- */
.xt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 2px solid transparent;
  border-radius: var(--xt-pill);
  font: 700 15px/1.1 var(--xt-font);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s var(--xt-ease);
  box-sizing: border-box;
}
.xt-btn svg { flex-shrink: 0; }
.xt-btn--primary { background: var(--xt-blue); color: #fff; box-shadow: var(--xt-shadow-blue); }
.xt-btn--primary:hover { background: var(--xt-blue-hover); color: #fff; transform: translateY(-1px); }
.xt-btn--ghost { background: #fff; color: var(--xt-navy); border-color: var(--xt-line-strong); }
.xt-btn--ghost:hover { border-color: var(--xt-blue); color: var(--xt-blue); }
.xt-btn--soft { background: var(--xt-pale); color: var(--xt-blue-hover); }
.xt-btn--soft:hover { background: var(--xt-pale-2); color: var(--xt-blue-hover); }
.xt-btn--block { width: 100%; }
.xt-btn--lg { min-height: 56px; padding: 0 28px; font-size: 16.5px; }
.xt-btn[disabled], .xt-btn[aria-disabled="true"] { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- Header ---------- */
.xt-header {
  position: sticky;
  top: 0;
  z-index: var(--xt-z-header);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--xt-line);
  box-shadow: inset 0 3px 0 var(--xt-blue);
}
@supports ((-webkit-backdrop-filter: blur(8px)) or (backdrop-filter: blur(8px))) {
  .xt-header { background: rgba(255, 255, 255, 0.86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
}
.xt-header__bar {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--xt-header-h);
}

.xt-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--xt-navy);
  text-decoration: none;
}
.xt-logo:hover { color: var(--xt-navy); }
.xt-logo__img { display: block; height: 42px; width: auto; max-width: 190px; object-fit: contain; }
.xt-logo__text { display: none; align-items: center; gap: 8px; font-weight: 800; font-size: 19px; letter-spacing: -0.03em; }
.xt-logo__text.is-shown { display: inline-flex; }
.xt-logo__tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--xt-blue);
  color: #fff;
  font-size: 12px;
  letter-spacing: .08em;
}

.xt-menu { display: flex; align-items: center; gap: 20px; flex: 1; justify-content: flex-end; }
.xt-nav ul { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.xt-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--xt-pill);
  color: var(--xt-navy-2);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.xt-nav a:hover { background: var(--xt-pale); color: var(--xt-blue-hover); }
.xt-nav a[aria-current="page"] { background: var(--xt-pale); color: var(--xt-blue-hover); }
.xt-actions { display: flex; align-items: center; gap: 10px; }
.xt-actions .xt-btn { min-height: 42px; padding: 0 18px; font-size: 14.5px; }

.xt-menu-toggle {
  display: none;
  margin-left: auto;
  width: 46px; height: 46px;
  align-items: center; justify-content: center;
  border: 1px solid var(--xt-line-strong);
  border-radius: var(--xt-pill);
  background: #fff;
  color: var(--xt-navy);
  cursor: pointer;
}
.xt-menu-toggle__bars { position: relative; width: 18px; height: 12px; }
.xt-menu-toggle__bars span {
  position: absolute; left: 0; width: 100%; height: 2px;
  background: currentColor; border-radius: 2px;
  transition: transform .2s var(--xt-ease), opacity .2s ease, top .2s var(--xt-ease);
}
.xt-menu-toggle__bars span:nth-child(1) { top: 0; }
.xt-menu-toggle__bars span:nth-child(2) { top: 5px; }
.xt-menu-toggle__bars span:nth-child(3) { top: 10px; }
.xt-menu-toggle[aria-expanded="true"] .xt-menu-toggle__bars span:nth-child(1) { top: 5px; transform: rotate(45deg); }
.xt-menu-toggle[aria-expanded="true"] .xt-menu-toggle__bars span:nth-child(2) { opacity: 0; }
.xt-menu-toggle[aria-expanded="true"] .xt-menu-toggle__bars span:nth-child(3) { top: 5px; transform: rotate(-45deg); }

@media (max-width: 960px) {
  .xt-menu-toggle { display: inline-flex; }
  .xt-menu {
    position: fixed;
    left: 0; right: 0;
    top: var(--xt-header-h);
    bottom: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 18px;
    padding: 20px 16px 32px;
    background: #fff;
    border-top: 1px solid var(--xt-line);
    overflow-y: auto;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s var(--xt-ease), visibility 0s linear .2s;
  }
  .xt-menu.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity .2s ease, transform .2s var(--xt-ease); }
  .xt-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .xt-nav a { min-height: 50px; padding: 0 16px; font-size: 17px; border-radius: var(--xt-r); }
  .xt-actions { flex-direction: column; align-items: stretch; }
  .xt-actions .xt-btn { min-height: 50px; font-size: 16px; }
}
/* No JavaScript: the menu cannot be opened, so it simply stays visible. */
html:not(.xt-js) .xt-menu-toggle { display: none; }
@media (max-width: 960px) {
  html:not(.xt-js) .xt-header__bar { flex-wrap: wrap; padding-bottom: 12px; }
  html:not(.xt-js) .xt-menu { position: static; visibility: visible; opacity: 1; transform: none; padding: 0; border: 0; width: 100%; }
  html:not(.xt-js) .xt-nav ul { flex-direction: row; flex-wrap: wrap; }
  html:not(.xt-js) .xt-nav a { min-height: 40px; font-size: 15px; }
}

/* ---------- Footer ---------- */
.xt-footer {
  margin-top: 72px;
  background: var(--xt-navy);
  color: #cbd5e1;
  font-size: 15px;
}
.xt-footer a { color: #e2e8f0; text-decoration: none; }
.xt-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.xt-footer :where(a):focus-visible { box-shadow: 0 0 0 3px var(--xt-navy), 0 0 0 5px #93c5fd; }
.xt-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  padding-top: 56px;
  padding-bottom: 40px;
}
@media (max-width: 860px) { .xt-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 520px) { .xt-footer__grid { grid-template-columns: 1fr; } }
.xt-footer__brand-name { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 800; font-size: 19px; letter-spacing: -0.03em; }
.xt-footer__brand p { margin: 14px 0 0; max-width: 34ch; color: #94a3b8; }
.xt-footer__title { margin: 0 0 14px; color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.xt-footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.xt-footer__wa {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--xt-pill);
}
.xt-footer__wa:hover { border-color: #fff; text-decoration: none !important; }
.xt-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  padding-bottom: 24px;
  color: #94a3b8;
  font-size: 14px;
}
.xt-footer__bottom p { margin: 0; }

/* ---------- Restrained entrance motion ----------
   CSS only and always ending fully visible, so content never depends on
   JavaScript. Never used on form controls or the order button. */
@keyframes xt-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.xt-rise { animation: xt-rise .5s var(--xt-ease) both; }
.xt-rise-1 { animation-delay: .06s; }
.xt-rise-2 { animation-delay: .12s; }
.xt-rise-3 { animation-delay: .18s; }
.xt-rise-4 { animation-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
