/* ============================================================
   GIGW 3.0 & WCAG 2.1 AA — Accessibility Controls
   APIIP Investment Portal
   Top bar above header — scrolls with page, not fixed
   ============================================================ */

/* ── Hidden Skip Link (keyboard-only, appears on Tab focus) ── */
.gigw-skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: #1a3a6e;
  color: #fff !important;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 0 0 8px 8px;
  z-index: 999999;
  transition: top 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.gigw-skip-link:focus {
  top: 0;
  outline: 3px solid #fe5900;
  outline-offset: 2px;
}

/* ── Accessibility Top Bar (inside <header>) ── */
.gigw-topbar {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  z-index: 1;
  font-family: 'Poppins', 'Google Sans Flex', Arial, sans-serif;
  transition: max-height 0.3s ease, opacity 0.3s ease, border-color 0.3s ease;
  max-height: 50px;
  opacity: 1;
  overflow: hidden;
}

/* Hide topbar when header is scrolled (acts as "not fixed") */
#header.scrolled .gigw-topbar {
  max-height: 0;
  opacity: 0;
  border-bottom-color: transparent;
  padding: 0;
}

.gigw-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  height: 42px;
  padding: 4px 0;
}

/* Right: All controls in one row */
.gigw-topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Skip to Main Content — inline with controls */
.gigw-skip-main {
  color: rgba(255, 255, 255, 0.6);
  font-size: 11.5px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.gigw-skip-main:hover,
.gigw-skip-main:focus {
  color: #fe5900;
}
.gigw-skip-main i {
  font-size: 13px;
}

/* Label text */
.gigw-label {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin-right: 6px;
}

/* Font size button group */
.gigw-font-group {
  display: flex;
  align-items: center;
  gap: 3px;
}

/* Font size buttons */
.gigw-font-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 28px;
  padding: 0 7px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-family: 'Poppins', Arial, sans-serif;
  font-weight: 600;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
  line-height: 1;
}
.gigw-font-btn:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.gigw-font-btn.active {
  background: #fe5900;
  border-color: #fe5900;
  color: #fff;
}
.gigw-font-btn sup {
  font-size: 8px;
  line-height: 0;
  vertical-align: super;
  position: relative;
  top: -1px;
}

/* Visual size differentiation */
.gigw-font-btn[data-size="small"]  { font-size: 11px; min-width: 26px; }
.gigw-font-btn[data-size="normal"] { font-size: 13px; }
.gigw-font-btn[data-size="large"]  { font-size: 15px; }

/* Contrast toggle and Screen Reader link */
.gigw-contrast-btn,
.gigw-sr-link {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  font-weight: 500;
  font-family: 'Poppins', Arial, sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: color 0.2s;
  padding: 6px 10px;
  border-radius: 4px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.gigw-contrast-btn:hover,
.gigw-contrast-btn:focus,
.gigw-sr-link:hover,
.gigw-sr-link:focus {
  color: #fe5900;
}
.gigw-contrast-btn i,
.gigw-sr-link i {
  font-size: 15px;
  line-height: 1;
}

/* ── High Contrast overrides for topbar ── */
body.high-contrast .gigw-topbar {
  background: #000 !important;
  border-bottom-color: #ffff00 !important;
}
body.high-contrast .gigw-font-btn {
  background: #000 !important;
  color: #ffff00 !important;
  border-color: #ffff00 !important;
}
body.high-contrast .gigw-font-btn.active {
  background: #ffff00 !important;
  color: #000 !important;
}
body.high-contrast .gigw-contrast-btn,
body.high-contrast .gigw-sr-link,
body.high-contrast .gigw-skip-main,
body.high-contrast .gigw-label {
  color: #ffff00 !important;
}

/* ── GIGW Footer Bottom Bar ── */
.gigw-footer-bar {
  background: #0d1b38;
  padding: 14px 0 0;
  font-family: 'Poppins', Arial, sans-serif;
}

.gigw-footer-links-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  max-width: 1240px;
  margin: 0 auto;
  padding-left: 15px;
  padding-right: 15px;
}

.gigw-footer-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.gigw-footer-nav li {
  display: flex;
  align-items: center;
}

.gigw-footer-nav li::after {
  content: '|';
  color: rgba(255,255,255,0.3);
  padding: 0 8px;
  font-size: 12px;
}
.gigw-footer-nav li:last-child::after { display: none; }

.gigw-footer-nav a {
  font-size: 12.5px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}
.gigw-footer-nav a:hover,
.gigw-footer-nav a:focus {
  color: #fe5900;
  text-decoration: underline;
  outline: 2px solid #fe5900;
  outline-offset: 2px;
}

/* Right: copyright + last updated */
.gigw-footer-copy {
  text-align: right;
}
.gigw-footer-copy p {
  margin: 0;
  font-size: 12.5px;
  color: rgba(255,255,255,0.75);
  line-height: 1.6;
}
.gigw-footer-copy .copy-year {
  font-weight: 600;
  color: rgba(255,255,255,0.9);
}

/* Compliance declaration */
.gigw-compliance-bar {
  text-align: center;
  padding: 8px 15px;
  background: #091429;
}
.gigw-compliance-bar p {
  margin: 0;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.3px;
}

/* ── High Contrast Mode ── */
body.high-contrast,
body.high-contrast * {
  background-color: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
  text-shadow: none !important;
  box-shadow: none !important;
  -webkit-text-fill-color: #fff !important;
}
body.high-contrast a,
body.high-contrast a:visited {
  color: #ffff00 !important;
  -webkit-text-fill-color: #ffff00 !important;
}
body.high-contrast img { filter: brightness(0.9) contrast(1.2); }

/* ── Screen Reader accessible util ── */
.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;
}

/* ── Global Focus Indicators (WCAG 2.4.7) ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="menuitem"]:focus-visible {
  outline: 3px solid #fe5900;
  outline-offset: 2px;
}

/* ── Keyboard-accessible Dropdown Menus ── */
.menuzord-menu .dropdown:focus-within .sub-menu,
.menuzord-menu .dropdown.kb-open .sub-menu {
  display: block;
}

.menuzord-menu .dropdown > a[aria-expanded="true"] + .sub-menu {
  display: block;
}

.sub-menu li a:focus-visible {
  outline: 2px solid #fe5900;
  outline-offset: -2px;
}

/* ── Reduced motion preference (WCAG 2.3.3) ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Responsive ── */
@media (max-width: 991px) {
  /* Hide entire GIGW topbar on mobile/tablet — keep it clean */
  .gigw-topbar {
    display: none;
  }
}

@media (max-width: 767px) {
  .gigw-footer-links-row {
    flex-direction: column;
  }
  .gigw-footer-copy { text-align: left; }
}
