/* =========================================================
   LAB DNA SYSTEM - Unified Compact Language Switch V8.3
   Same dimensions on every page.
   Arabic mode = green / English mode = blue.
   ========================================================= */

html body .medical-language-switch,
html body.global-medical-ui .medical-language-switch,
html body .page-head .medical-language-switch,
html body .public-head .medical-language-switch,
html body .home-head .medical-language-switch,
html body .login-shell .medical-language-switch,
html body .login-card .medical-language-switch,
html body .doctor-head .medical-language-switch,
html body .clinical-topbar .medical-language-switch,
html body .cl-header .medical-language-switch {
    box-sizing:border-box !important;
    direction:rtl !important;
    width:82px !important;
    min-width:82px !important;
    max-width:82px !important;
    height:30px !important;
    min-height:30px !important;
    max-height:30px !important;
    padding:2px !important;
    margin:0 !important;
    gap:2px !important;
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    align-items:center !important;
    justify-content:stretch !important;
    flex:0 0 82px !important;
    border:1px solid #cbd5df !important;
    border-radius:9px !important;
    background:#f5f7f9 !important;
    box-shadow:0 2px 6px rgba(15,44,71,.10) !important;
    overflow:hidden !important;
}

html body .medical-language-switch button,
html body.global-medical-ui .medical-language-switch button,
html body .page-head .medical-language-switch button,
html body .public-head .medical-language-switch button,
html body .home-head .medical-language-switch button,
html body .doctor-head .medical-language-switch button,
html body .clinical-topbar .medical-language-switch button,
html body .cl-header .medical-language-switch button {
    box-sizing:border-box !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    height:24px !important;
    min-height:24px !important;
    max-height:24px !important;
    margin:0 !important;
    padding:0 3px !important;
    border:1px solid transparent !important;
    border-radius:6px !important;
    background:transparent !important;
    color:#425466 !important;
    font-family:Tahoma,Arial,sans-serif !important;
    font-size:10px !important;
    line-height:22px !important;
    font-weight:800 !important;
    letter-spacing:0 !important;
    text-align:center !important;
    cursor:pointer !important;
    box-shadow:none !important;
    outline:none !important;
    display:block !important;
}

/* Remove old underline/pill decorations coming from earlier themes. */
html body .medical-language-switch button:before,
html body .medical-language-switch button:after {
    content:none !important;
    display:none !important;
}

/* Arabic mode: green frame + green Arabic choice. */
html body.lang-ar .medical-language-switch {
    border-color:#1c8f5d !important;
    background:#eaf7f0 !important;
    box-shadow:0 2px 7px rgba(28,143,93,.16) !important;
}
html body.lang-ar .medical-language-switch button[data-lang="ar"] {
    background:#188956 !important;
    border-color:#188956 !important;
    color:#ffffff !important;
    box-shadow:0 1px 3px rgba(12,92,56,.18) !important;
}
html body.lang-ar .medical-language-switch button[data-lang="en"] {
    background:transparent !important;
    color:#476055 !important;
}

/* English mode: blue frame + blue English choice. */
html body.lang-en .medical-language-switch {
    border-color:#1f6fae !important;
    background:#ebf3fb !important;
    box-shadow:0 2px 7px rgba(31,111,174,.16) !important;
}
html body.lang-en .medical-language-switch button[data-lang="en"] {
    background:#1f6fae !important;
    border-color:#1f6fae !important;
    color:#ffffff !important;
    box-shadow:0 1px 3px rgba(18,77,124,.18) !important;
}
html body.lang-en .medical-language-switch button[data-lang="ar"] {
    background:transparent !important;
    color:#42586d !important;
}

html body .medical-language-switch button:hover {
    filter:brightness(.97) !important;
}
html body .medical-language-switch button:focus-visible {
    outline:2px solid rgba(23,87,132,.28) !important;
    outline-offset:1px !important;
}

/* Keep exactly the same dimensions on mobile/tablet/desktop. */
@media(max-width:900px){
    html body .medical-language-switch,
    html body.global-medical-ui .medical-language-switch {
        width:82px !important;
        min-width:82px !important;
        max-width:82px !important;
        height:30px !important;
        min-height:30px !important;
        max-height:30px !important;
    }
    html body .medical-language-switch button,
    html body.global-medical-ui .medical-language-switch button {
        height:24px !important;
        min-height:24px !important;
        max-height:24px !important;
        font-size:10px !important;
    }
}


/* =========================================================
   V8.3 HARD SIZE OVERRIDE
   This final layer intentionally repeats the compact metrics
   to defeat legacy admin/public header rules that use !important.
   ========================================================= */
html body .medical-language-switch,
html body.global-medical-ui .medical-language-switch,
html body.ingene-medical-ui .medical-language-switch,
html body .page-head > .medical-language-switch,
html body .public-head .medical-language-switch,
html body .home-head .medical-language-switch,
html body .doctor-head .medical-language-switch,
html body .clinical-topbar .medical-language-switch,
html body .cl-header .medical-language-switch {
    box-sizing:border-box !important;
    width:82px !important;
    min-width:82px !important;
    max-width:82px !important;
    height:30px !important;
    min-height:30px !important;
    max-height:30px !important;
    padding:2px !important;
    gap:2px !important;
    border-radius:9px !important;
    flex:0 0 82px !important;
    align-self:center !important;
    line-height:normal !important;
    overflow:hidden !important;
}

html body .medical-language-switch > button,
html body.global-medical-ui .medical-language-switch > button,
html body.ingene-medical-ui .medical-language-switch > button,
html body .page-head > .medical-language-switch > button,
html body .public-head .medical-language-switch > button,
html body .home-head .medical-language-switch > button,
html body .doctor-head .medical-language-switch > button,
html body .clinical-topbar .medical-language-switch > button,
html body .cl-header .medical-language-switch > button {
    box-sizing:border-box !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    height:24px !important;
    min-height:24px !important;
    max-height:24px !important;
    padding:0 3px !important;
    margin:0 !important;
    border-radius:6px !important;
    font-size:10px !important;
    line-height:22px !important;
    font-weight:800 !important;
    transform:none !important;
}
