/*
 * BIP – style specyficzne dla strony Biuletynu Informacji Publicznej
 * (ładowany dodatkowo obok głównego style.css, które dostarcza @font-face i resetę)
 */
    /* ═══════════════════════════════════════════
       WCAG 2.1 AA – SKIP LINK
    ═══════════════════════════════════════════ */
    .skip-link {
      position: absolute;
      top: -100%;
      left: 1rem;
      z-index: 10000;
      /* #0C2340 on #fff = 12.6:1 – spełnia WCAG 1.4.3 AA */
      background: #0C2340;
      color: #fff;
      padding: 0.6rem 1.2rem;
      border-radius: 0 0 0.5rem 0.5rem;
      font-weight: 700;
      font-size: 0.9rem;
      text-decoration: none;
      transition: top 0.2s ease;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .skip-link:focus {
      top: 0;
    }

    /* ═══════════════════════════════════════════
       WCAG 2.1 AA – HIGH CONTRAST MODE
    ═══════════════════════════════════════════ */
    body.contrast-mode,
    body.contrast-mode * {
      background-color: #000 !important;
      color: #FFE600 !important;
      border-color: #FFE600 !important;
      text-shadow: none !important;
      box-shadow: none !important;
    }

    body.contrast-mode a,
    body.contrast-mode a * {
      color: #00FFFF !important;
    }

    body.contrast-mode button,
    body.contrast-mode [role="button"] {
      background-color: #000 !important;
      border: 2px solid #FFE600 !important;
      color: #FFE600 !important;
    }

    body.contrast-mode img {
      filter: grayscale(1) contrast(2) brightness(0.8) !important;
    }

    body.contrast-mode input,
    body.contrast-mode select,
    body.contrast-mode textarea {
      background-color: #000 !important;
      color: #FFE600 !important;
      border: 2px solid #FFE600 !important;
    }

    body.contrast-mode .bip-nav-item.active {
      color: #00FFFF !important;
    }

    /* ═══════════════════════════════════════════
       WCAG 2.1 AA – FONT SIZE LEVELS
    ═══════════════════════════════════════════ */
    html.font-large {
      font-size: 112.5%;
    }

    html.font-xlarge {
      font-size: 125%;
    }

    /* ═══════════════════════════════════════════
       FOCUS INDICATOR
    ═══════════════════════════════════════════ */
    *:focus-visible {
      outline: 3px solid #0099DD;
      outline-offset: 3px;
    }

    /* BIP official header bar */
    .bip-header-bar {
      background: linear-gradient(135deg, #0C2340 0%, #1B365D 100%);
    }

    /* BIP logo badge (official red/white polish standard) */
    .bip-logo-badge {
      background: #E31E24;
    }

    /* Sidebar nav item hover */
    .bip-nav-item {
      transition: background 0.15s, border-color 0.15s, color 0.15s;
      border-left: 3px solid transparent;
    }

    .bip-nav-item:hover {
      background: #EBF5FB;
      border-left-color: #0099DD;
      color: #0099DD;
    }

    .bip-nav-item.active {
      background: #EBF5FB;
      border-left-color: #27AE60;
      color: #27AE60;
      font-weight: 600;
    }

    /* Section reveal animation */
    .bip-section {
      display: none;
    }

    .bip-section.active {
      display: block;
    }

    /* Change log table */
    .bip-table thead {
      background: #0C2340;
      color: white;
    }

    .bip-table tbody tr:nth-child(even) {
      background: #F4F7FA;
    }

    .bip-table tbody tr:hover {
      background: #EBF5FB;
    }

    /* Responsive tables: horizontal scroll on mobile */
    .table-responsive {
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }

    /* Mobile sidebar drawer */
    #mobile-sidebar {
      transform: translateX(-100%);
      transition: transform 0.3s ease;
    }

    #mobile-sidebar.open {
      transform: translateX(0);
    }

    #mobile-sidebar-overlay {
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s ease;
    }

    #mobile-sidebar-overlay.open {
      opacity: 1;
      pointer-events: all;
    }

    /* Print styles */
    @media print {
      .no-print {
        display: none !important;
      }

      .bip-section {
        display: block !important;
      }

      body {
        font-size: 12pt;
      }
    }

    /* Smooth scroll */
    html {
      scroll-behavior: smooth;
    }

    /* On mobile add bottom padding for the sticky nav bar */
    @media (max-width: 767px) {
      body {
        padding-bottom: 64px;
      }
    }

    /* Accessibility controls */
    .a11y-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.3rem;
      padding: 0.3rem 0.55rem;
      border: 1.5px solid rgba(255, 255, 255, 0.35);
      border-radius: 0.4rem;
      font-size: 0.7rem;
      font-weight: 700;
      color: rgba(255, 255, 255, 0.85);
      background: transparent;
      cursor: pointer;
      transition: border-color 0.2s, background 0.2s, color 0.2s;
      white-space: nowrap;
    }

    .a11y-btn:hover {
      border-color: rgba(255, 255, 255, 0.7);
      background: rgba(255, 255, 255, 0.1);
      color: #fff;
    }

    .a11y-btn.active-contrast {
      background: #FFE600;
      border-color: #FFE600;
      color: #000;
    }

    .font-size-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 1.7rem;
      height: 1.7rem;
      border: 1.5px solid rgba(255, 255, 255, 0.35);
      border-radius: 0.35rem;
      font-weight: 700;
      color: rgba(255, 255, 255, 0.85);
      background: transparent;
      cursor: pointer;
      transition: border-color 0.2s, background 0.2s, color 0.2s;
      line-height: 1;
    }

    .font-size-btn:hover {
      border-color: rgba(255, 255, 255, 0.7);
      background: rgba(255, 255, 255, 0.1);
      color: #fff;
    }

    .font-size-btn.active {
      /* #0C2340 on #fff = 12.6:1; white on #0C2340 = 12.6:1 – spełnia WCAG 1.4.3 AA */
      background: #0C2340;
      border-color: #0C2340;
      color: #fff;
    }

    /* Accessible muted text: #3D5166 na #FFFFFF = 7.1:1 – spełnia WCAG 1.4.3 AA */
    /* Stosowane zamiast .text-ltp-muted (#5F738C = 4.1:1) w domyślnym widoku na białym tle */
    .text-ltp-muted-accessible {
      color: #3D5166;
    }
