/* ==========================================================================
   GIGW (Guidelines for Indian Government Websites 3.0) & WCAG 2.1 AA Styles
   Jagrata Portal - District Administration, South Tripura
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Skip to Main Content Link (WCAG 2.4.1)
   -------------------------------------------------------------------------- */
.gigw-skip-link {
    position: absolute;
    top: -100px;
    left: 15px;
    background: #000;
    color: #ffeb3b;
    padding: 10px 18px;
    z-index: 99999;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 6px 6px;
    border: 2px solid #ffeb3b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: top 0.2s ease;
}

.gigw-skip-link:focus {
    top: 0;
    outline: 3px solid #ff9800;
}

/* --------------------------------------------------------------------------
   2. Accessibility Top Utility Bar
   -------------------------------------------------------------------------- */
.gigw-topbar {
    background: #1a1a2e;
    color: #f1f1f1;
    font-size: 12px;
    line-height: 1.3;
    border-bottom: 2px solid #FF4A05;
    padding: 4px 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    position: relative;
    width: 100%;
    z-index: 10;
}

.gigw-topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.gigw-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.gigw-govt-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #e2e8f0;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.gigw-govt-title strong {
    color: #ffffff;
    font-weight: 700;
}

.gigw-flag-strip {
    display: inline-flex;
    height: 12px;
    width: 18px;
    border-radius: 2px;
    overflow: hidden;
    flex-direction: column;
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.4);
}

.gigw-flag-strip span:nth-child(1) {
    background: #FF9933;
    height: 4px;
}

.gigw-flag-strip span:nth-child(2) {
    background: #FFFFFF;
    height: 4px;
}

.gigw-flag-strip span:nth-child(3) {
    background: #138808;
    height: 4px;
}

.gigw-topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.gigw-action-link {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.15s ease;
}

.gigw-action-link:hover,
.gigw-action-link:focus {
    color: #ff9800;
    text-decoration: underline;
}

.gigw-divider {
    color: #475569;
    font-size: 12px;
    user-select: none;
}

/* Font Size Resizer Controls */
.gigw-font-controls {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 1px 3px;
    gap: 2px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.gigw-font-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    font-weight: 700;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 3px;
    cursor: pointer;
    line-height: 1.4;
    transition: all 0.15s ease;
}

.gigw-font-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffb74d;
}

.gigw-font-btn.active {
    background: #FF4A05;
    color: #ffffff;
}

/* Contrast Controls */
.gigw-contrast-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 11.5px;
    padding: 2px 9px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
    font-weight: 500;
}

.gigw-contrast-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #ffeb3b;
}

/* --------------------------------------------------------------------------
   3. Font Scaling Levels (GIGW Compliant Text Resizing)
   -------------------------------------------------------------------------- */
html.font-size-sm,
body.font-size-sm {
    zoom: 0.9 !important;
}

html.font-size-md,
body.font-size-md {
    zoom: 1 !important;
}

html.font-size-lg,
body.font-size-lg {
    zoom: 1.15 !important;
}

/* Fallback for environments without native zoom */
@supports not (zoom: 1) {

    html.font-size-lg p,
    html.font-size-lg h1,
    html.font-size-lg h2,
    html.font-size-lg h3,
    html.font-size-lg h4,
    html.font-size-lg h5,
    html.font-size-lg h6,
    html.font-size-lg a:not(.gigw-action-link, .gigw-font-btn, .gigw-contrast-btn),
    html.font-size-lg li,
    html.font-size-lg td,
    html.font-size-lg th,
    html.font-size-lg label,
    html.font-size-lg input,
    html.font-size-lg select,
    html.font-size-lg textarea {
        font-size: 115% !important;
    }

    html.font-size-sm p,
    html.font-size-sm h1,
    html.font-size-sm h2,
    html.font-size-sm h3,
    html.font-size-sm h4,
    html.font-size-sm h5,
    html.font-size-sm h6,
    html.font-size-sm a:not(.gigw-action-link, .gigw-font-btn, .gigw-contrast-btn),
    html.font-size-sm li,
    html.font-size-sm td,
    html.font-size-sm th,
    html.font-size-sm label,
    html.font-size-sm input,
    html.font-size-sm select,
    html.font-size-sm textarea {
        font-size: 88% !important;
    }
}

/* --------------------------------------------------------------------------
   4. High Contrast Mode (GIGW / WCAG 2.1 AA Black & Yellow / High Contrast)
   -------------------------------------------------------------------------- */
html.gigw-high-contrast {
    filter: none !important;
}

html.gigw-high-contrast body {
    background: #000000 !important;
    color: #ffffff !important;
}

html.gigw-high-contrast .gigw-topbar {
    background: #000000 !important;
    border-bottom: 2px solid #ffff00 !important;
}

html.gigw-high-contrast .gigw-govt-title,
html.gigw-high-contrast .gigw-govt-title strong,
html.gigw-high-contrast .gigw-action-link {
    color: #ffffff !important;
}

html.gigw-high-contrast .gigw-action-link:hover {
    color: #ffff00 !important;
    text-decoration: underline !important;
}

html.gigw-high-contrast .gigw-font-controls {
    background: #111111 !important;
    border-color: #ffff00 !important;
}

html.gigw-high-contrast .gigw-font-btn {
    color: #ffffff !important;
}

html.gigw-high-contrast .gigw-font-btn.active {
    background: #ffff00 !important;
    color: #000000 !important;
}

html.gigw-high-contrast .gigw-contrast-btn {
    background: #ffff00 !important;
    color: #000000 !important;
    border-color: #ffff00 !important;
    font-weight: 700;
}

html.gigw-high-contrast header,
html.gigw-high-contrast header.conSection {
    background: #0a0a0a !important;
    border-bottom: 2px solid #ffff00 !important;
}

html.gigw-high-contrast .headLeft h6 {
    color: #ffff00 !important;
}

html.gigw-high-contrast .headRight ul a li {
    color: #ffffff !important;
}

html.gigw-high-contrast .headRight ul a li.active,
html.gigw-high-contrast .headRight ul a li:hover {
    color: #ffff00 !important;
    border-bottom-color: #ffff00 !important;
}

html.gigw-high-contrast footer,
html.gigw-high-contrast footer.conSection {
    background: #000000 !important;
    color: #ffffff !important;
    border-top: 3px solid #ffff00 !important;
}

html.gigw-high-contrast footer h5,
html.gigw-high-contrast footer h6,
html.gigw-high-contrast footer p,
html.gigw-high-contrast footer span {
    color: #ffffff !important;
}

html.gigw-high-contrast footer ul a li {
    color: #ffff00 !important;
}

html.gigw-high-contrast footer ul a li:hover {
    color: #ffffff !important;
    text-decoration: underline !important;
}

html.gigw-high-contrast .gigw-footer-compliance {
    background: #050505 !important;
    border-top: 1px solid #333333 !important;
    color: #ffffff !important;
}

html.gigw-high-contrast .gigw-footer-compliance a {
    color: #ffff00 !important;
}

html.gigw-high-contrast .card,
html.gigw-high-contrast .modal-content,
html.gigw-high-contrast .citizen-stat-card,
html.gigw-high-contrast .citizen-card,
html.gigw-high-contrast .sectionTitle,
html.gigw-high-contrast .textCon,
html.gigw-high-contrast .basicSection {
    background: #111111 !important;
    color: #ffffff !important;
    border-color: #ffff00 !important;
}

html.gigw-high-contrast a {
    color: #ffff00 !important;
}

html.gigw-high-contrast h1,
html.gigw-high-contrast h2,
html.gigw-high-contrast h3,
html.gigw-high-contrast h4,
html.gigw-high-contrast h5,
html.gigw-high-contrast h6 {
    color: #ffffff !important;
}

html.gigw-high-contrast .table {
    color: #ffffff !important;
    border-color: #444444 !important;
}

html.gigw-high-contrast .table thead th {
    background: #222222 !important;
    color: #ffff00 !important;
}

html.gigw-high-contrast .table tbody tr td {
    background: #111111 !important;
    color: #ffffff !important;
}

html.gigw-high-contrast .btn-primary,
html.gigw-high-contrast .submitButton,
html.gigw-high-contrast .btn-success {
    background: #ffff00 !important;
    color: #000000 !important;
    border: 2px solid #ffffff !important;
    font-weight: 700 !important;
}

html.gigw-high-contrast input,
html.gigw-high-contrast select,
html.gigw-high-contrast textarea {
    background: #111111 !important;
    color: #ffffff !important;
    border: 2px solid #ffff00 !important;
}

/* --------------------------------------------------------------------------
   5. Focus Indicators (WCAG 2.4.7 Focus Visible)
   -------------------------------------------------------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid #FF4A05 !important;
    outline-offset: 2px !important;
}

html.gigw-high-contrast a:focus-visible,
html.gigw-high-contrast button:focus-visible,
html.gigw-high-contrast input:focus-visible,
html.gigw-high-contrast select:focus-visible,
html.gigw-high-contrast textarea:focus-visible {
    outline: 3px solid #ffff00 !important;
    outline-offset: 3px !important;
}

/* --------------------------------------------------------------------------
   6. Header Government Emblem Styling
   -------------------------------------------------------------------------- */
.emblem-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.headLeft .govEmblem {
    height: 42px;
    width: auto;
    object-fit: contain;
    padding-right: 12px;
    border-right: 1px solid #d1d5db;
    margin-right: 4px;
    transition: transform 0.2s ease;
}

.headLeft .govEmblem:hover {
    transform: scale(1.05);
}

@media (max-width: 991px) {
    .headLeft {
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important;
    }

    .headLeft .govEmblem {
        height: 28px;
        padding-right: 8px;
        border-right: 1px solid #e5e7eb;
        margin-right: 0;
    }
}

/* --------------------------------------------------------------------------
   7. GIGW Footer Compliance Block
   -------------------------------------------------------------------------- */
.gigw-footer-compliance {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    text-align: center;
}

.gigw-footer-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 10px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.gigw-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    color: #ffffff;
}

/* --------------------------------------------------------------------------
   8. GIGW External Link Warning Modal
   -------------------------------------------------------------------------- */
.gigw-external-icon {
    font-size: 0.85em;
    margin-left: 3px;
    vertical-align: middle;
    opacity: 0.8;
}

/* --------------------------------------------------------------------------
   9. GIGW Policy & Sitemap Content Pages
   -------------------------------------------------------------------------- */
.gigw-policy-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    margin-bottom: 30px;
    border: 1px solid #eef2f6;
}

.gigw-policy-card h4 {
    color: #1e293b;
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 14px;
    border-bottom: 2px solid #FF4A05;
    padding-bottom: 8px;
    display: inline-block;
}

.gigw-policy-card p,
.gigw-policy-card li {
    color: #475569;
    font-size: 14.5px;
    line-height: 1.7;
}

.gigw-sitemap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.gigw-sitemap-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
}

.gigw-sitemap-box h5 {
    color: #FF4A05;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gigw-sitemap-box ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.gigw-sitemap-box ul li {
    margin-bottom: 8px;
}

.gigw-sitemap-box ul li a {
    color: #334155;
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.15s ease;
}

.gigw-sitemap-box ul li a:hover {
    color: #FF4A05;
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   10. Header Clearing & Offsets for Page Content
   -------------------------------------------------------------------------- */
header {
    z-index: 1000 !important;
    flex-direction: column;
}

.whatsnewSec {
    margin-top: 92px !important;
}

.basicSection {
    margin-top: 92px !important;
}

.loginSec {
    margin-top: 92px !important;
}

@media (max-width: 991px) {
    .headRight {
        top: 90px !important;
    }
}

@media (max-width: 768px) {
    .gigw-topbar {
        font-size: 11px;
        padding: 4px 0;
    }

    .gigw-topbar .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap !important;
        padding: 0 10px;
    }

    .gigw-topbar-left {
        flex-shrink: 1;
        min-width: 0;
        gap: 6px;
        justify-content: flex-start;
    }

    .gigw-govt-title {
        font-size: 10.5px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 175px;
        display: none;
    }

    .gigw-topbar-right {
        flex-shrink: 0;
        gap: 5px;
        flex-wrap: nowrap;
        justify-content: flex-end;
    }

    .gigw-action-link span {
        display: none;
        /* Show only icons on small screens to fit neatly on one line */
    }

    .gigw-contrast-btn span {
        display: none;
    }

    .gigw-contrast-btn {
        padding: 1px 6px;
        font-size: 11px;
    }

    .gigw-font-btn {
        padding: 1px 4px;
        font-size: 10px;
    }

    .gigw-divider {
        margin: 0 1px;
    }

    .whatsnewSec {
        margin-top: 90px !important;
    }

    .basicSection {
        margin-top: 90px !important;
    }

    .gigw-policy-card {
        padding: 20px 16px;
    }
}