/* =========================================================
   DYNAMIC CAREER
   UNIVERSAL LANGUAGE SWITCHER
   File: /includes/language_assets/language-switcher.css

   Modern • Responsive • Adjustable Height
   Desktop + Tablet + Mobile
========================================================= */


/* =========================================================
   RESET
========================================================= */

.dc-lang,
.dc-lang *,
.dc-lang *::before,
.dc-lang *::after {
    box-sizing: border-box;
}

.dc-lang button,
.dc-lang input {
    font-family: inherit;
}


/* =========================================================
   ROOT / GLOBAL VARIABLES
========================================================= */

.dc-lang {
    /* COLORS */
    --dc-primary: #2563eb;
    --dc-primary-dark: #1d4ed8;
    --dc-primary-soft: #eff6ff;

    --dc-text: #172033;
    --dc-text-soft: #64748b;
    --dc-muted: #94a3b8;

    --dc-border: #e2e8f0;
    --dc-bg: #ffffff;
    --dc-bg-soft: #f8fafc;

    /* POPUP SIZE */
    --dc-popup-width: 340px;

    /*
     * Default fallback height.
     * JavaScript slider এই variable override করবে।
     */
    --dc-popup-height: 470px;
    --dc-user-popup-height: 470px;

    /* POPUP LIMIT */
    --dc-popup-min-height: 280px;
    --dc-popup-max-height: 650px;

    /* TRIGGER */
    --dc-trigger-height: 46px;

    /* RADIUS */
    --dc-popup-radius: 22px;
    --dc-item-radius: 13px;

    /* SHADOW */
    --dc-shadow:
        0 22px 55px
        rgba(15, 23, 42, 0.17);

    position: fixed !important;

    z-index: 2147483000 !important;

    font-family:
        "Hind Siliguri",
        "Noto Sans Bengali",
        Arial,
        sans-serif;

    font-size: 14px;
    line-height: 1.4;

    /*
     * isolation:isolate বাদ দেওয়া হয়েছে।
     * এতে unnecessary stacking context তৈরি হবে না।
     */
    isolation: auto !important;
}


/* =========================================================
   FLOATING TRIGGER POSITION
========================================================= */

.dc-lang--bottom-right {
    right: 18px;
    bottom: 18px;
}

.dc-lang--bottom-left {
    left: 18px;
    bottom: 18px;
}

.dc-lang--top-right {
    right: 18px;
    top: 86px;
}

.dc-lang--top-left {
    left: 18px;
    top: 86px;
}


/* =========================================================
   LANGUAGE TRIGGER BUTTON
========================================================= */

.dc-lang-trigger {
    position: relative;

    z-index: 2147483002 !important;

    min-height:
        var(--dc-trigger-height);

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 7px 12px;

    border:
        1px solid
        rgba(203, 213, 225, 0.95);

    border-radius: 15px;

    background:
        rgba(255, 255, 255, 0.98);

    color:
        var(--dc-text);

    box-shadow:
        0 10px 30px
        rgba(15, 23, 42, 0.13);

    cursor: pointer;

    font-size: 12px;
    font-weight: 700;
    line-height: 1;

    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background-color 0.18s ease;
}

.dc-lang-trigger:hover {
    transform:
        translateY(-2px);

    border-color:
        #93c5fd;

    background:
        #ffffff;

    box-shadow:
        0 16px 38px
        rgba(15, 23, 42, 0.18);
}

.dc-lang-trigger:active {
    transform:
        translateY(0);
}

.dc-lang-trigger:focus {
    outline: none;
}

.dc-lang-trigger:focus-visible {
    outline:
        3px solid
        rgba(37, 99, 235, 0.15);

    outline-offset: 2px;
}


/* =========================================================
   TRIGGER ICONS
========================================================= */

.dc-lang-globe,
.dc-lang-current-flag {
    flex-shrink: 0;

    line-height: 1;
}

.dc-lang-globe {
    font-size: 16px;
}

.dc-lang-current-flag {
    font-size: 18px;
}

.dc-lang-current {
    max-width: 110px;

    overflow: hidden;

    white-space: nowrap;
    text-overflow: ellipsis;

    font-size: 12px;

    font-weight: 700;
}

.dc-lang-chevron {
    width: 14px;
    height: 14px;

    flex-shrink: 0;

    color:
        var(--dc-text-soft);

    transition:
        transform 0.18s ease;
}

.dc-lang.dc-lang-open
.dc-lang-chevron {
    transform:
        rotate(180deg);
}


/* =========================================================
   MAIN POPUP
========================================================= */

.dc-lang-panel {
    position: fixed !important;

    z-index: 2147483001 !important;

    width:
        var(--dc-popup-width);

    max-width:
        calc(100vw - 32px);

    /*
     * JavaScript slider শুধু এই variable পরিবর্তন করবে।
     */
    height:
        var(
            --dc-user-popup-height,
            var(--dc-popup-height)
        ) !important;

    /*
     * User যত বড় height নির্বাচন করুক,
     * viewport-এর বাইরে যাবে না।
     */
    min-height:
        var(--dc-popup-min-height);

    max-height:
        min(
            var(--dc-popup-max-height),
            calc(100vh - 95px)
        );

    overflow: hidden;

    display: flex;
    flex-direction: column;

    border:
        1px solid
        var(--dc-border);

    border-radius:
        var(--dc-popup-radius);

    background:
        rgba(255, 255, 255, 0.99);

    box-shadow:
        var(--dc-shadow);

    animation:
        dcLangPopupOpen
        0.20s ease;

    transform-origin:
        bottom right;
}

.dc-lang-panel[hidden] {
    display:
        none !important;
}


/* =========================================================
   DESKTOP POPUP POSITION
========================================================= */

.dc-lang--bottom-right
.dc-lang-panel {
    right: 18px !important;
    bottom: 76px !important;

    left: auto !important;
    top: auto !important;
}

.dc-lang--bottom-left
.dc-lang-panel {
    left: 18px !important;
    bottom: 76px !important;

    right: auto !important;
    top: auto !important;
}

.dc-lang--top-right
.dc-lang-panel {
    right: 18px !important;
    top: 145px !important;

    left: auto !important;
    bottom: auto !important;
}

.dc-lang--top-left
.dc-lang-panel {
    left: 18px !important;
    top: 145px !important;

    right: auto !important;
    bottom: auto !important;
}


/* =========================================================
   POPUP ANIMATION
========================================================= */

@keyframes dcLangPopupOpen {
    from {
        opacity: 0;

        transform:
            translateY(8px)
            scale(0.98);
    }

    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }
}


/* =========================================================
   POPUP HEADER
========================================================= */

.dc-lang-head {
    flex:
        0 0 auto;

    min-height:
        58px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        12px;

    padding:
        12px 14px
        9px;

    border-bottom:
        1px solid
        rgba(226, 232, 240, 0.75);

    background:
        linear-gradient(
            180deg,
            #ffffff,
            #fbfdff
        );
}

.dc-lang-head strong {
    display:
        block;

    margin:
        0;

    color:
        var(--dc-text);

    font-size:
        13px;

    line-height:
        1.3;

    font-weight:
        800;
}

.dc-lang-head small {
    display:
        block;

    margin-top:
        2px;

    color:
        var(--dc-text-soft);

    font-size:
        9px;
}


/* =========================================================
   CLOSE BUTTON
========================================================= */

.dc-lang-close {
    width:
        32px;

    height:
        32px;

    flex-shrink:
        0;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    padding:
        0;

    border:
        0;

    border-radius:
        10px;

    background:
        #f1f5f9;

    color:
        #64748b;

    cursor:
        pointer;

    font-family:
        Arial,
        sans-serif;

    font-size:
        20px;

    line-height:
        1;

    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        transform 0.15s ease;
}

.dc-lang-close:hover {
    color:
        #0f172a;

    background:
        #e2e8f0;

    transform:
        rotate(4deg);
}

.dc-lang-close:focus-visible {
    outline:
        3px solid
        rgba(37, 99, 235, 0.13);

    outline-offset:
        2px;
}


/* =========================================================
   SEARCH AREA
========================================================= */

.dc-lang-search-wrap {
    position:
        relative;

    flex:
        0 0 auto;

    display:
        flex;

    align-items:
        center;

    margin:
        7px 9px
        6px;
}

.dc-lang-search-icon {
    position:
        absolute;

    left:
        12px;

    top:
        50%;

    z-index:
        2;

    transform:
        translateY(-50%);

    color:
        #94a3b8;

    pointer-events:
        none;

    font-size:
        15px;
}

.dc-lang-search {
    width:
        100%;

    height:
        36px;

    padding:
        0 12px
        0 37px;

    border:
        1px solid
        var(--dc-border);

    border-radius:
        11px;

    outline:
        none;

    background:
        var(--dc-bg-soft);

    color:
        var(--dc-text);

    font-size:
        11px;

    -webkit-appearance:
        none;

    appearance:
        none;

    transition:
        border-color 0.15s ease,
        background-color 0.15s ease,
        box-shadow 0.15s ease;
}

.dc-lang-search::placeholder {
    color:
        #94a3b8;
}

.dc-lang-search:focus {
    border-color:
        #93c5fd;

    background:
        #ffffff;

    box-shadow:
        0 0 0 3px
        rgba(37, 99, 235, 0.07);
}


/* =========================================================
   LANGUAGE LIST
========================================================= */

.dc-lang-list {
    flex:
        1 1 auto;

    min-height:
        0 !important;

    overflow-x:
        hidden;

    overflow-y:
        auto;

    padding:
        2px 8px
        8px;

    overscroll-behavior:
        contain;

    -webkit-overflow-scrolling:
        touch;

    scrollbar-width:
        thin;

    scrollbar-color:
        #cbd5e1
        transparent;
}

.dc-lang-list::-webkit-scrollbar {
    width:
        5px;
}

.dc-lang-list::-webkit-scrollbar-track {
    background:
        transparent;
}

.dc-lang-list::-webkit-scrollbar-thumb {
    background:
        #cbd5e1;

    border-radius:
        999px;
}

.dc-lang-list::-webkit-scrollbar-thumb:hover {
    background:
        #94a3b8;
}


/* =========================================================
   LANGUAGE ROW
========================================================= */

.dc-lang-option {
    width:
        100%;

    min-height:
        42px;

    display:
        flex;

    align-items:
        center;

    gap:
        9px;

    margin:
        1px 0;

    padding:
        5px 8px;

    border:
        0;

    border-radius:
        var(--dc-item-radius);

    background:
        transparent;

    color:
        var(--dc-text);

    cursor:
        pointer;

    text-align:
        left;

    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        transform 0.15s ease;
}

.dc-lang-option:hover {
    color:
        var(--dc-primary);

    background:
        var(--dc-primary-soft);

    transform:
        translateX(2px);
}

.dc-lang-option:focus-visible {
    outline:
        3px solid
        rgba(37, 99, 235, 0.11);

    outline-offset:
        1px;
}

.dc-lang-option.dc-lang-selected {
    color:
        var(--dc-primary);

    background:
        linear-gradient(
            135deg,
            #edf4ff,
            #eaf2ff
        );
}

.dc-lang-option[hidden] {
    display:
        none !important;
}


/* =========================================================
   LANGUAGE FLAG
========================================================= */

.dc-lang-option-flag {
    width:
        31px;

    height:
        31px;

    flex-shrink:
        0;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    border-radius:
        10px;

    background:
        linear-gradient(
            145deg,
            #ffffff,
            #f5f7fa
        );

    box-shadow:
        0 2px 7px
        rgba(15, 23, 42, 0.04);

    font-size:
        18px;

    line-height:
        1;
}


/* =========================================================
   LANGUAGE NAME
========================================================= */

.dc-lang-option-copy {
    min-width:
        0;

    flex:
        1;

    display:
        flex;

    flex-direction:
        column;
}

.dc-lang-option-copy strong {
    display:
        block;

    overflow:
        hidden;

    color:
        inherit;

    white-space:
        nowrap;

    text-overflow:
        ellipsis;

    font-size:
        11px;

    line-height:
        1.3;

    font-weight:
        700;
}

.dc-lang-option-copy small {
    display:
        block;

    margin-top:
        1px;

    overflow:
        hidden;

    color:
        var(--dc-text-soft);

    white-space:
        nowrap;

    text-overflow:
        ellipsis;

    font-size:
        8px;
}


/* =========================================================
   SELECT CHECK
========================================================= */

.dc-lang-option-check {
    display:
        none;

    flex-shrink:
        0;

    color:
        var(--dc-primary);

    font-size:
        13px;

    font-weight:
        900;
}

.dc-lang-option.dc-lang-selected
.dc-lang-option-check {
    display:
        inline-block;
}


/* =========================================================
   POPUP HEIGHT EDITOR
========================================================= */

.dc-lang-height-control {
    flex:
        0 0 auto;

    padding:
        8px 10px
        9px;

    border-top:
        1px solid
        #e8edf4;

    background:
        #ffffff;
}

.dc-lang-height-head {
    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        8px;

    margin-bottom:
        7px;

    color:
        var(--dc-text-soft);

    font-size:
        9px;

    line-height:
        1;
}

.dc-lang-height-title {
    display:
        flex;

    align-items:
        center;

    gap:
        5px;

    font-weight:
        700;
}

.dc-lang-height-value {
    min-width:
        48px;

    padding:
        3px 7px;

    border-radius:
        999px;

    background:
        #eff6ff;

    color:
        #2563eb;

    text-align:
        center;

    font-size:
        9px;

    font-weight:
        800;
}

.dc-lang-height-body {
    display:
        flex;

    align-items:
        center;

    gap:
        8px;
}


/* =========================================================
   HEIGHT RANGE SLIDER
========================================================= */

.dc-lang-height-range {
    flex:
        1;

    width:
        100%;

    min-width:
        0;

    height:
        20px;

    margin:
        0;

    cursor:
        pointer;

    accent-color:
        #2563eb;

    -webkit-appearance:
        none;

    appearance:
        none;

    background:
        transparent;
}


/* Chrome / Edge Track */

.dc-lang-height-range::-webkit-slider-runnable-track {
    height:
        5px;

    border-radius:
        999px;

    background:
        #dbe7f8;
}


/* Chrome / Edge Thumb */

.dc-lang-height-range::-webkit-slider-thumb {
    width:
        17px;

    height:
        17px;

    margin-top:
        -6px;

    border:
        0;

    border-radius:
        50%;

    background:
        #2563eb;

    cursor:
        grab;

    -webkit-appearance:
        none;
}

.dc-lang-height-range:active::-webkit-slider-thumb {
    cursor:
        grabbing;
}


/* Firefox Track */

.dc-lang-height-range::-moz-range-track {
    height:
        5px;

    border-radius:
        999px;

    background:
        #dbe7f8;
}


/* Firefox Thumb */

.dc-lang-height-range::-moz-range-thumb {
    width:
        17px;

    height:
        17px;

    border:
        0;

    border-radius:
        50%;

    background:
        #2563eb;

    cursor:
        grab;
}


/* =========================================================
   HEIGHT RESET
========================================================= */

.dc-lang-height-reset {
    width:
        30px;

    height:
        30px;

    flex:
        0 0 30px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    padding:
        0;

    border:
        1px solid
        #e2e8f0;

    border-radius:
        9px;

    background:
        #f8fafc;

    color:
        #64748b;

    cursor:
        pointer;

    font-size:
        12px;
}

.dc-lang-height-reset:hover {
    border-color:
        #93c5fd;

    background:
        #eff6ff;

    color:
        #2563eb;
}


/* =========================================================
   POPUP FOOTER
========================================================= */

.dc-lang-footer {
    flex:
        0 0 auto;

    min-height:
        30px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    gap:
        5px;

    padding:
        5px 10px;

    border-top:
        1px solid
        #eef2f7;

    background:
        #fafcff;

    color:
        var(--dc-muted);

    font-size:
        8px;
}


/* =========================================================
   LOADING BOX
========================================================= */

.dc-lang-loading {
    position:
        fixed !important;

    z-index:
        2147483003 !important;

    left:
        50%;

    bottom:
        78px;

    min-width:
        145px;

    height:
        39px;

    transform:
        translateX(-50%);

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    gap:
        7px;

    padding:
        0 13px;

    border:
        1px solid
        var(--dc-border);

    border-radius:
        12px;

    background:
        rgba(255, 255, 255, 0.98);

    color:
        var(--dc-text-soft);

    box-shadow:
        0 15px 35px
        rgba(15, 23, 42, 0.15);

    font-size:
        10px;

    white-space:
        nowrap;
}

.dc-lang-loading[hidden] {
    display:
        none !important;
}

.dc-lang-spinner {
    width:
        14px;

    height:
        14px;

    flex-shrink:
        0;

    border:
        2px solid
        #dbeafe;

    border-top-color:
        var(--dc-primary);

    border-radius:
        50%;

    animation:
        dcLangSpin
        0.75s
        linear
        infinite;
}

@keyframes dcLangSpin {
    from {
        transform:
            rotate(0deg);
    }

    to {
        transform:
            rotate(360deg);
    }
}


/* =========================================================
   GOOGLE TRANSLATE HIDDEN ELEMENT
========================================================= */

.dc-google-translate-element {
    position:
        fixed !important;

    top:
        -9999px !important;

    left:
        -9999px !important;

    width:
        1px !important;

    height:
        1px !important;

    overflow:
        hidden !important;

    opacity:
        0 !important;

    pointer-events:
        none !important;
}


/* =========================================================
   GOOGLE TRANSLATE UI CLEANUP
========================================================= */

body {
    top:
        0 !important;
}

.goog-te-banner-frame,
iframe.goog-te-banner-frame {
    display:
        none !important;
}

.goog-logo-link,
.goog-te-gadget span {
    display:
        none !important;
}

.goog-te-gadget {
    height:
        0 !important;

    overflow:
        hidden !important;

    color:
        transparent !important;

    font-size:
        0 !important;
}


/* =========================================================
   RTL SUPPORT
========================================================= */

html[dir="rtl"]
.dc-lang-panel {
    direction:
        rtl;
}

html[dir="rtl"]
.dc-lang-option {
    text-align:
        right;
}

html[dir="rtl"]
.dc-lang-option:hover {
    transform:
        translateX(-2px);
}

html[dir="rtl"]
.dc-lang-search-icon {
    right:
        12px;

    left:
        auto;
}

html[dir="rtl"]
.dc-lang-search {
    padding:
        0 37px
        0 12px;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

    .dc-lang {
        --dc-popup-width:
            320px;
    }

    .dc-lang--bottom-right {
        right:
            12px;

        bottom:
            12px;
    }

    .dc-lang--bottom-left {
        left:
            12px;

        bottom:
            12px;
    }

    .dc-lang-panel {
        max-height:
            calc(100vh - 85px);
    }

    .dc-lang--bottom-right
    .dc-lang-panel {
        right:
            12px !important;

        bottom:
            68px !important;
    }

    .dc-lang--bottom-left
    .dc-lang-panel {
        left:
            12px !important;

        bottom:
            68px !important;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .dc-lang--bottom-right,
    .dc-lang--top-right {
        right:
            9px;
    }

    .dc-lang--bottom-left,
    .dc-lang--top-left {
        left:
            9px;
    }

    .dc-lang--bottom-right,
    .dc-lang--bottom-left {
        bottom:
            9px;
    }

    .dc-lang--top-right,
    .dc-lang--top-left {
        top:
            72px;
    }

    .dc-lang-trigger {
        min-height:
            42px;

        padding:
            6px 9px;

        gap:
            5px;

        border-radius:
            13px;
    }

    .dc-lang-globe {
        display:
            none;
    }

    .dc-lang-current {
        max-width:
            78px;

        font-size:
            11px;
    }

    .dc-lang-panel {
        position:
            fixed !important;

        top:
            auto !important;

        right:
            8px !important;

        bottom:
            60px !important;

        left:
            8px !important;

        width:
            auto !important;

        max-width:
            none;

        /*
         * Desktop-এর মতো একই selected height।
         */
        height:
            var(
                --dc-user-popup-height,
                410px
            ) !important;

        min-height:
            240px;

        max-height:
            calc(100vh - 72px);

        border-radius:
            19px;

        transform-origin:
            bottom center;
    }

    .dc-lang-head {
        min-height:
            52px;

        padding:
            10px 11px
            7px;
    }

    .dc-lang-search-wrap {
        margin:
            5px 7px;
    }

    .dc-lang-search {
        height:
            34px;
    }

    .dc-lang-list {
        padding:
            1px 6px
            6px;
    }

    .dc-lang-option {
        min-height:
            39px;

        padding:
            4px 7px;
    }

    .dc-lang-option-flag {
        width:
            29px;

        height:
            29px;

        font-size:
            17px;
    }

    .dc-lang-height-control {
        padding:
            6px 8px
            7px;
    }

    .dc-lang-loading {
        bottom:
            60px;

        max-width:
            calc(100vw - 20px);
    }
}


/* =========================================================
   VERY SMALL MOBILE
========================================================= */

@media (max-width: 390px) {

    .dc-lang-current {
        display:
            none;
    }

    .dc-lang-trigger {
        min-width:
            47px;

        justify-content:
            center;

        padding:
            6px 8px;
    }

    .dc-lang-panel {
        right:
            6px !important;

        left:
            6px !important;

        bottom:
            57px !important;

        min-height:
            220px;

        max-height:
            calc(100vh - 66px);

        border-radius:
            17px;
    }

    .dc-lang-head {
        min-height:
            49px;

        padding:
            9px 9px
            6px;
    }

    .dc-lang-search-wrap {
        margin:
            4px 6px;
    }

    .dc-lang-option {
        min-height:
            37px;

        border-radius:
            10px;
    }
}


/* =========================================================
   SHORT HEIGHT SCREEN
   Slider control সচল থাকবে।
========================================================= */

@media (max-height: 560px) {

    .dc-lang-panel {
        min-height:
            200px;

        max-height:
            calc(100vh - 72px);
    }

    .dc-lang-list {
        flex:
            1 1 auto;

        min-height:
            0;
    }
}


/* =========================================================
   VERY SHORT HEIGHT
========================================================= */

@media (max-height: 430px) {

    .dc-lang-panel {
        min-height:
            180px;

        max-height:
            calc(100vh - 62px);
    }

    .dc-lang-head {
        min-height:
            43px;

        padding:
            6px 9px;
    }

    .dc-lang-head small {
        display:
            none;
    }

    .dc-lang-search-wrap {
        margin:
            3px 6px;
    }

    .dc-lang-search {
        height:
            31px;
    }

    .dc-lang-option {
        min-height:
            34px;
    }

    .dc-lang-option-flag {
        width:
            27px;

        height:
            27px;

        font-size:
            16px;
    }

    .dc-lang-height-control {
        padding:
            4px 7px
            5px;
    }

    .dc-lang-footer {
        min-height:
            24px;

        padding:
            3px 8px;
    }
}


/* =========================================================
   PRINT
========================================================= */

@media print {

    .dc-lang {
        display:
            none !important;
    }
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (
    prefers-reduced-motion: reduce
) {

    .dc-lang-panel,
    .dc-lang-spinner {
        animation:
            none;
    }

    .dc-lang-trigger,
    .dc-lang-option,
    .dc-lang-close,
    .dc-lang-chevron {
        transition:
            none;
    }
}