/*
 * NAS Prototype Design System — Global CSS
 *
 * Purpose:
 *  1. Import NAS-approved web fonts (Arial is system-installed; this file adds
 *     any additional weights via system-font fallback + optional web-font CDN).
 *  2. Provide Kentico-specific resets so prototype styles don't bleed into or
 *     be overridden by Kentico's base stylesheet.
 *  3. Define global layout utilities that can't be expressed as Tailwind classes.
 *
 * Loaded via <link rel="stylesheet" href="global.css"> in index.html.
 */


/* ── 1. Font stack ─────────────────────────────────────────────────────────── */

/* Arial is pre-installed on all platforms; no @font-face import needed.
   If NAS ever licenses a custom web font, add the @font-face rule here:

   @font-face {
     font-family: 'NASCustom';
     src: url('/fonts/NASCustom-Regular.woff2') format('woff2');
     font-weight: 400;
     font-display: swap;
   }
*/

:root {
  /* Design tokens as CSS custom properties (mirrors tailwind.config.js) */
  --color-nas-blue:        #003087;
  --color-nas-blue-mid:    #0067B3;
  --color-nas-blue-light:  #E8F0FA;
  --color-nas-gold:        #FFB81C;
  --color-nas-gold-dark:   #E5A619;
  --color-nas-red:         #C8102E;
  --color-nas-green:       #2D7D4A;
  --color-nas-orange:      #E87722;
  --color-nas-grey:        #58595B;
  --color-nas-grey-mid:    #D1D3D4;
  --color-nas-grey-light:  #F0F0F0;

  --font-sans: Arial, 'Helvetica Neue', Helvetica, sans-serif;

  --radius-card:  0.75rem;
  --shadow-card:  0 2px 8px 0 rgba(0,48,135,0.08);
  --shadow-modal: 0 8px 32px 0 rgba(0,48,135,0.18);

  --transition: 200ms ease;
}


/* ── 2. Kentico-safe resets ────────────────────────────────────────────────── */
/*
 * Kentico injects its own stylesheet which can interfere with prototype markup.
 * The rules below are scoped to .nas-component so they only apply when the
 * snippet is rendered inside its NAS wrapper div in Kentico.
 *
 * In the local dashboard (index.html) the same class is added automatically by
 * the loader, giving consistent results in both environments.
 */

.nas-component,
.nas-component * {
  box-sizing: border-box;
}

.nas-component img {
  max-width: 100%;
  height: auto;
  display: block;
}

.nas-component a {
  color: var(--color-nas-blue-mid);
  text-decoration: underline;
}

.nas-component a:hover {
  color: var(--color-nas-blue);
}

/* Prevent Kentico's global <table> resets from collapsing our table layouts */
.nas-component table {
  border-collapse: collapse;
  width: 100%;
}


/* ── 3. Dashboard-only utilities ───────────────────────────────────────────── */

/* Smooth scrolling for sidebar anchor navigation */
html {
  scroll-behavior: smooth;
}

/* Thin custom scrollbar for the sidebar */
aside::-webkit-scrollbar {
  width: 4px;
}
aside::-webkit-scrollbar-track {
  background: transparent;
}
aside::-webkit-scrollbar-thumb {
  background-color: var(--color-nas-grey-mid);
  border-radius: 9999px;
}

/* Focus-visible outline using NAS gold */
:focus-visible {
  outline: 3px solid var(--color-nas-gold);
  outline-offset: 2px;
}

/* Utility class to visually hide elements while keeping them accessible */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}


/* ── 4. Print styles ───────────────────────────────────────────────────────── */
@media print {
  aside,
  header,
  .copy-btn,
  #copy-toast {
    display: none !important;
  }

  #main-content {
    padding: 0;
  }

  section.bg-white {
    box-shadow: none;
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }
}
