﻿/* Search container: input and button side by side */
#searchBox {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    width: 220px;
    max-width: 100%;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    background: transparent;
    border: none;
    box-shadow: none;
}

/* Search input */
#keyword {
    flex: 1;
    min-width: 0;
    width: 100%;
    height: 23px;
    padding: 2px 8px;
    box-sizing: border-box;
    background: #fff;
    color: #222;
    border: 1px solid #0072bc;
    border-radius: 4px;
    outline: none;
    font-size: 13px;
}

    #keyword:focus {
        border-color: #005a96;
        box-shadow: 0 0 4px rgba(0, 114, 188, 0.3);
    }

/* Magnifying glass beside the input */
#findBtn {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 23px;
    height: 23px;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    background: #fff;
    color: #0072bc;
    border: 1px solid #0072bc;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

    #findBtn:hover {
        background: #0072bc;
        color: #fff;
        border-color: #005a96;
    }

/* Hide search count and status messages */
#searchStatus {
    display: none !important;
}

/* Highlight matching text */
mark.search-highlight,
mark.search-highlight.current-match {
    background: #ffeb3b !important;
    color: #111 !important;
    outline: none !important;
}


.accessibility-wrap {
    position: relative;
    display: inline-block;
}
/* Accessibility menu - centered on all screens */
* Accessibility menu - centered, not fixed */
.accessibility-wrap {
    position: relative;
}

.accessibility-menu {
    position: absolute;
  
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    z-index: 99999;
    width: 330px;
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
    padding: 14px;
    margin: 0;
    background: #fff;
    color: #222;
    border: 1px solid #ccc;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

    .accessibility-menu[hidden] {
        display: none !important;
    }

/* Tablet */
@media (max-width: 768px) {
    .accessibility-menu {
        width: 320px;
        max-width: calc(100vw - 20px);
        padding: 12px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .accessibility-menu {
        width: calc(100vw - 20px);
        max-width: 330px;
        padding: 10px;
    }
}

/* Extra-small mobile */
@media (max-width: 320px) {
    .accessibility-menu {
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
        padding: 8px;
    }
}

/*.accessibility-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 99999;
    width: 330px;
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
    padding: 14px;
    background: #fff;
    color: #222;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}*/

    .accessibility-menu[hidden] {
        display: none !important;
    }

    .accessibility-menu h3 {
        margin: 0 0 14px;
        font-size: 17px;
        text-align: center;
    }

.accessibility-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

    .accessibility-grid button {
        min-width: 0;
        min-height: 88px;
        padding: 10px 4px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 7px;
        text-align: center;
        overflow-wrap: anywhere;
        cursor: pointer;
        color: #222;
        background: #f5f6f7;
        border: 1px solid #d4d4d4;
        border-radius: 5px;
    }

        .accessibility-grid button:hover,
        .accessibility-grid button:focus-visible {
            background: #e5edf5;
            border-color: #0072bc;
            outline-offset: 2px;
        }

.tool-symbol {
    font-size: 24px;
    font-weight: bold;
    line-height: 1.2;
}

.tool-label {
    font-size: 12px;
    line-height: 1.35;
}

.accessibility-footer {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid #ccc;
    text-align: center;
    font-size: 12px;
    line-height: 1.5;
}

    .accessibility-footer p {
        margin: 5px 0 0;
        color: #555;
    }


/* High contrast mode */
body.high-contrast {
    background: #000 !important;
    color: #fff !important;
}

    body.high-contrast * {
        border-color: #ffff00 !important;
    }

    body.high-contrast p,
    body.high-contrast h1,
    body.high-contrast h2,
    body.high-contrast h3,
    body.high-contrast h4,
    body.high-contrast span,
    body.high-contrast li,
    body.high-contrast label,
    body.high-contrast td,
    body.high-contrast th {
        color: #fff !important;
    }

    body.high-contrast a {
        color: #00ffff !important;
        text-decoration: underline !important;
    }

    body.high-contrast button,
    body.high-contrast input,
    body.high-contrast select,
    body.high-contrast textarea {
        background: #000 !important;
        color: #fff !important;
        border: 2px solid #ffff00 !important;
    }

    body.high-contrast :focus-visible {
        outline: 3px solid #ffff00 !important;
        outline-offset: 3px !important;
    }

body.big-cursor,
body.big-cursor * {
    cursor: url("https://cur.cursors-4u.net/cursors/cur-2/cur116.cur"), auto !important;
}
    /* Make interactive elements easy to target */
    body.big-cursor button,
    body.big-cursor a,
    body.big-cursor input,
    body.big-cursor select,
    body.big-cursor textarea,
    body.big-cursor label {
        cursor: pointer !important;
    }

/* Accessibility menu buttons */
.accessibility-grid button {
    cursor: pointer;
}

/* Big cursor mode */
/*body.big-cursor,
body.big-cursor * {
    cursor: url("https://cur.cursors-4u.net/cursors/cur-2/cur116.cur"), auto !important;
}

    body.big-cursor a,
    body.big-cursor button,
    body.big-cursor input,
    body.big-cursor select,
    body.big-cursor textarea,
    body.big-cursor label {
        cursor: pointer !important;
    }*/

    /* Keyboard focus visibility */
    /*body.high-contrast :focus-visible,
    body.big-cursor :focus-visible {
        outline: 3px solid #ffeb00 !important;
        outline-offset: 4px !important;
    }*/



/* Small screens */
@media (max-width: 360px) {
    .accessibility-menu {
        width: 290px;
    }

    .accessibility-grid {
        gap: 5px;
    }

        .accessibility-grid button {
            padding: 8px 2px;
        }

    .tool-label {
        font-size: 11px;
    }
}

/* Accessibility buttons hover effect */
.accessibility-grid button {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

    .accessibility-grid button:hover {
        background-color: #0072bc !important;
        color: #ffffff !important;
        border-color: #005a96 !important;
        cursor: pointer;
        transform: translateY(-2px);
    }

        /* Keep symbols and labels white on hover */
        .accessibility-grid button:hover .tool-symbol,
        .accessibility-grid button:hover .tool-label {
            color: #ffffff !important;
        }

    /* Keyboard accessibility */
    .accessibility-grid button:focus-visible {
        outline: 3px solid #ff9800;
        outline-offset: 2px;
    }

/* Hover for the main accessibility icon */
.accessibility-icon-btn:hover {
    background-color: #0072bc !important;
    color: #ffffff !important;
    border-color: #005a96 !important;
}


.top-right-controls {

    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 6px;
    width: 100%;
    /*padding: 8px 15px;*/
    box-sizing: border-box;
}

/* =========================================
   INDIAN FLAG + GOV OF UP - LEFT SIDE
========================================= */

.gov-top-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-shrink: 0;
    margin-right: auto;
    flex-wrap: nowrap;
}

/* Indian flag */
.gov-tricolor-badge {
    width: 48px;
    height: 23px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid #d4d4d4;
    box-sizing: border-box;
}

/* Three equal horizontal stripes */
.tri-saffron,
.tri-white,
.tri-green {
    flex: 1;
    width: 100%;
    position: relative;
}

.tri-saffron {
    background-color: #FF9933;
}

.tri-white {
    background-color: #FFFFFF;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tri-green {
    background-color: #138808;
}

/* Ashoka Chakra */
.ashoka-chakra {
    width: 9px;
    height: 9px;
    border: 1px solid #000080;
    border-radius: 50%;
    position: relative;
    box-sizing: border-box;
    background-color: #FFFFFF;
    flex-shrink: 0;
}

    /* Chakra center */
    .ashoka-chakra::after {
        content: "";
        position: absolute;
        width: 3px;
        height: 3px;
        background-color: #000080;
        border-radius: 50%;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

/* Text group, if using a wrapper */
.gov-text-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

/* Regional language text */
.gov-regional-text {
    font-size: 0.75rem;
    line-height: 1.3;
    font-weight: 600;
    color: #444;
    white-space: nowrap;
}

/* Vertical separator */
.gov-divider {
    font-size: 0.75rem;
    line-height: 1.3;
    color: #777;
    flex-shrink: 0;
}

/* Government text */
.gov-state-text {
    font-size: 0.75rem;
    line-height: 1.3;
    font-weight: 600;
    color: #222;
    white-space: nowrap;
}

/* =========================================
   TABLET
   Keep flag height and font sizes unchanged
========================================= */

@media (max-width: 768px) {
    .gov-top-left {
        justify-content: center;
        width: 100%;
        margin-right: 0;
        gap: 8px;
        flex-wrap: nowrap;
    }

    .gov-tricolor-badge {
        width: 48px;
        height: 23px;
    }

    .ashoka-chakra {
        width: 9px;
        height: 9px;
    }

    .gov-regional-text,
    .gov-state-text,
    .gov-divider {
        font-size: 0.75rem;
    }
}

/* =========================================
   SMALL MOBILE
   Keep flag height and font sizes unchanged
========================================= */

@media (max-width: 360px) {
    .gov-top-left {
        gap: 5px;
    }

    .gov-tricolor-badge {
        width: 48px;
        height: 23px;
    }

    .gov-regional-text,
    .gov-state-text,
    .gov-divider {
        font-size: 0.75rem;
    }
}

/* =========================================
   SKIP, SCREEN READER AND FEEDBACK BUTTONS
========================================= */

.skip-to-content-btn,
.screen-reader-btn,
.feedback-top-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    font-size: 13px;
    line-height: 1.4;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    flex-shrink: 0;
}

.top-right-controls button {
    cursor: pointer;
}

/* =========================================
   LANGUAGE TOGGLE
========================================= */

.lang-toggle-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
}

    .lang-toggle-top button {
        padding: 5px 7px;
        border: none;
        background: transparent;
        font-size: 13px;
        cursor: pointer;
    }

        .lang-toggle-top button.active {
            font-weight: 700;
            color: #0056b3;
        }

    .lang-toggle-top span {
        color: #888;
    }

/* =========================================
   ZOOM CONTROLS
========================================= */

.zoom-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-shrink: 0;
}

    .zoom-box button {
        min-width: 32px;
        padding: 5px 6px;
        border: 1px solid #ccc;
        border-radius: 3px;
        background-color: #fff;
        color: #222;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
    }

        .zoom-box button:hover {
            background-color: #e9ecef;
        }

/* =========================================
   TABLET AND SMALL LAPTOP
========================================= */

@media (max-width: 1100px) {
    .top-right-controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
}

/* =========================================
   MOBILE AND SMALL SCREENS
========================================= */

@media (max-width: 768px) {
    .top-right-controls {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        text-align: center;
        gap: 8px;
        padding: 12px 8px;
        width: 100%;
    }

    /* Center the flag and government name */
    .gov-top-left {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        margin: 0;
        gap: 8px;
    }


    /* Center all controls */
    .skip-to-content-btn,
    .screen-reader-btn,
    .feedback-top-btn {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        margin: 0;
        padding: 7px 9px;
        font-size: 12px;
        white-space: normal;
    }

    .lang-toggle-top {
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0;
        gap: 4px;
    }

        .lang-toggle-top button {
            padding: 6px;
            font-size: 12px;
        }

    .zoom-box {
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0;
        gap: 4px;
    }

        .zoom-box button {
            min-width: 30px;
            padding: 5px;
            font-size: 12px;
        }
}

/* =========================================
   EXTRA-SMALL MOBILE SCREENS
========================================= */

@media (max-width: 480px) {
    .top-right-controls {
        gap: 7px;
        padding: 10px 5px;
    }

    .gov-tricolor-badge {
        width: 26px;
        height: 18px;
    }

    .gov-state-text {
        font-size: 13px;
    }

    .skip-to-content-btn,
    .screen-reader-btn,
    .feedback-top-btn {
        padding: 6px 7px;
        font-size: 11px;
    }

    .lang-toggle-top button {
        padding: 5px;
        font-size: 11px;
    }

    .zoom-box button {
        min-width: 27px;
        padding: 4px;
        font-size: 11px;
    }
}


/* ===== Government Website Carousel ===== */
.government-sites,
.government-sites * {
    box-sizing: border-box;
}

.government-sites {
    width: 100%;
    padding: 12px 15px;
    background: #f4f6f8;
}

.government-sites-inner {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.gov-viewport {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.gov-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    width: 100%;
    will-change: transform;
}

.gov-card {
    flex: 0 0 calc((100% - 36px) / 4);
    min-width: 0;
    height: 76px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e0e5eb;
    border-radius: 6px;
    text-decoration: none;
    overflow: hidden;
    transition: border-color .2s ease, box-shadow .2s ease;
}

    .gov-card:hover {
        border-color: #0879bd;
        box-shadow: 0 3px 10px rgba(0, 0, 0, .08);
    }

    .gov-card img {
        display: block;
        max-width: 100%;
        max-height: 54px;
        width: auto;
        height: auto;
        object-fit: contain;
    }

.gov-arrow {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #d5dce4;
    border-radius: 50%;
    background: #fff;
    color: #0879bd;
    font-size: 15px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

    .gov-arrow:hover {
        background: #0879bd;
        color: #fff;
    }

    .gov-arrow:focus-visible,
    .gov-card:focus-visible {
        outline: 2px solid #0879bd;
        outline-offset: 3px;
    }

/* Tablet */
@media (max-width: 768px) {
    .government-sites-inner {
        gap: 8px;
    }

    .gov-track {
        gap: 8px;
    }

    .gov-card {
        flex-basis: calc((100% - 16px) / 3);
        height: 70px;
    }
}

/* Mobile: 2 cards */
@media (max-width: 550px) {
    .government-sites {
        padding: 10px 8px;
    }

    .government-sites-inner {
        gap: 6px;
    }

    .gov-track {
        gap: 8px;
    }

    .gov-card {
        flex-basis: calc((100% - 8px) / 2);
        height: 64px;
        padding: 7px;
    }

        .gov-card img {
            max-height: 46px;
        }

    .gov-arrow {
        flex-basis: 27px;
        width: 27px;
        height: 27px;
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gov-card,
    .gov-arrow {
        transition: none;
    }
}

.gov-state-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.up-gov-logo {
    width: 35px;
    height: 35px;
    object-fit: contain;
    flex-shrink: 0;
}

.gov-state-text {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

@media (max-width: 576px) {
    .up-gov-logo {
        width: 28px;
        height: 28px;
    }

    .gov-state-text {
        font-size: 12px;
    }
}