/* Language Switcher & Selection Popup Styles for BoltecPros */

/* Google Fonts for Devanagari typography */
@import url('https://fonts.googleapis.com/css2?family=Mukta:wght@300;400;500;600;700;800&family=Noto+Sans+Devanagari:wght@400;500;600;700&display=swap');

html[lang="mr"],
html[lang="hi"],
body[data-current-lang="mr"],
body[data-current-lang="hi"] {
    font-family: 'Mukta', 'Noto Sans Devanagari', 'Roboto', sans-serif !important;
}

html[lang="mr"] h1, html[lang="mr"] h2, html[lang="mr"] h3, html[lang="mr"] h4, html[lang="mr"] h5, html[lang="mr"] h6,
html[lang="hi"] h1, html[lang="hi"] h2, html[lang="hi"] h3, html[lang="hi"] h4, html[lang="hi"] h5, html[lang="hi"] h6 {
    font-family: 'Mukta', 'Noto Sans Devanagari', 'Roboto', sans-serif !important;
    letter-spacing: 0.01em;
    line-height: 1.35;
}

/* ========================================================
   LANGUAGE SELECTION MODAL
   ======================================================== */
.lang-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 20, 36, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s ease;
    padding: 18px;
}

.lang-modal-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.lang-modal-dialog {
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    max-width: 540px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    transform: scale(0.92) translateY(18px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.lang-modal-backdrop.show .lang-modal-dialog {
    transform: scale(1) translateY(0);
}

.lang-modal-header {
    background: linear-gradient(135deg, #0e1e38 0%, #162c52 100%);
    color: #ffffff;
    padding: 26px 28px 22px;
    position: relative;
    text-align: center;
}

.lang-modal-header .lang-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(254, 184, 0, 0.18);
    color: #feb800;
    border: 1px solid rgba(254, 184, 0, 0.35);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.lang-modal-header h3 {
    margin: 0 0 6px 0;
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.lang-modal-header p {
    margin: 0;
    font-size: 13.5px;
    color: #ccd6e6;
    line-height: 1.45;
}

.lang-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #ffffff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: all 0.2s ease;
}

.lang-modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

.lang-modal-body {
    padding: 24px 28px;
}

.lang-options-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lang-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border: 2px solid #e7ecf3;
    background: #fbfcfe;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    user-select: none;
}

.lang-card:hover {
    border-color: #0e1e38;
    background: #f5f8fd;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(14, 30, 56, 0.06);
}

.lang-card.selected {
    border-color: #feb800;
    background: #fffdf5;
    box-shadow: 0 6px 20px rgba(254, 184, 0, 0.15);
}

.lang-card-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.lang-card-flag {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #edf2f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.lang-card.selected .lang-card-flag {
    background: #fef4d4;
}

.lang-card-info h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #111a29;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-card-info p {
    margin: 2px 0 0 0;
    font-size: 13px;
    color: #637381;
}

.lang-badge-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    background: #edf2f9;
    color: #3b506c;
}

.lang-card.selected .lang-badge-tag {
    background: #feb800;
    color: #111a29;
}

.lang-card-radio {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.lang-card.selected .lang-card-radio {
    border-color: #feb800;
    background: #feb800;
}

.lang-card.selected .lang-card-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff;
}

.lang-modal-footer {
    padding: 12px 28px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    border-top: 1px solid #eef2f7;
}

.lang-remember-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #556987;
    cursor: pointer;
    margin: 0;
    user-select: none;
}

.lang-remember-wrap input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #0e1e38;
    cursor: pointer;
}

.lang-modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-lang-continue {
    background: #0e1e38;
    color: #ffffff !important;
    border: 1px solid #0e1e38;
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-lang-continue:hover {
    background: #feb800;
    border-color: #feb800;
    color: #111a29 !important;
    box-shadow: 0 4px 14px rgba(254, 184, 0, 0.35);
}

.btn-lang-dismiss {
    background: transparent;
    border: 1px solid #d4dce7;
    color: #4b586e;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-lang-dismiss:hover {
    background: #f1f5f9;
    color: #111a29;
}

/* ========================================================
   NAVBAR LANGUAGE SELECTOR
   ======================================================== */
.nav-item.language-switcher {
    display: flex;
    align-items: center;
    margin-left: 8px;
}

.lang-selector-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(14, 30, 56, 0.06);
    border: 1px solid rgba(14, 30, 56, 0.15);
    padding: 7px 14px;
    border-radius: 30px;
    font-size: 13.5px;
    font-weight: 600;
    color: #0e1e38 !important;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.navbar-nav .lang-selector-btn:hover,
.lang-selector-btn:focus {
    background: #feb800;
    border-color: #feb800;
    color: #0e1e38 !important;
    box-shadow: 0 4px 12px rgba(254, 184, 0, 0.25);
}

.lang-selector-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.lang-chevron {
    width: 10px;
    height: 10px;
    transition: transform 0.2s ease;
}

.lang-dropdown-menu {
    border-radius: 14px;
    border: 1px solid #e7ecf3;
    box-shadow: 0 16px 36px rgba(14, 30, 56, 0.12);
    padding: 8px;
    min-width: 210px;
    margin-top: 8px !important;
    animation: fadeInDropdown 0.2s ease forwards;
}

@keyframes fadeInDropdown {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.lang-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    color: #24334a;
    transition: all 0.18s ease;
    text-decoration: none;
}

.lang-dropdown-item:hover {
    background: #f1f5f9;
    color: #0e1e38;
}

.lang-dropdown-item.active {
    background: #fffdf2;
    color: #926900;
    font-weight: 700;
}

.lang-dropdown-item.active::after {
    content: '✓';
    font-weight: 800;
    color: #feb800;
    margin-left: 8px;
}

/* ========================================================
   FLOATING LANGUAGE SWITCHER WIDGET
   ======================================================== */
.floating-lang-pill {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 9998;
    background: rgba(14, 30, 56, 0.92);
    color: #ffffff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    display: inline-flex;
    align-items: center;
    padding: 4px 6px;
    gap: 3px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-lang-pill:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
    transform: translateY(-2px);
    border-color: rgba(254, 184, 0, 0.5);
}

.floating-lang-btn {
    border: none;
    background: transparent;
    color: #cfd9e8;
    padding: 5px 11px;
    border-radius: 30px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.floating-lang-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.floating-lang-btn.active {
    background: #feb800;
    color: #111a29;
    font-weight: 700;
}

.floating-lang-icon {
    margin-right: 2px;
    font-size: 14px;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .lang-modal-dialog {
        border-radius: 16px;
        margin: 10px;
    }
    .lang-modal-header {
        padding: 20px 20px 18px;
    }
    .lang-modal-header h3 {
        font-size: 19px;
    }
    .lang-modal-body {
        padding: 18px 20px;
    }
    .lang-card {
        padding: 12px 14px;
    }
    .lang-modal-footer {
        padding: 10px 20px 20px;
        flex-direction: column;
        align-items: stretch;
    }
    .lang-modal-actions {
        width: 100%;
        display: flex;
        flex-direction: column;
    }
    .btn-lang-continue, .btn-lang-dismiss {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
    .floating-lang-pill {
        bottom: 76px;
        left: 14px;
        padding: 3px 4px;
    }
    .floating-lang-btn {
        padding: 4px 8px;
        font-size: 11.5px;
    }
    .nav-item.language-switcher {
        margin: 10px 0 0 0;
        width: 100%;
    }
    .lang-selector-btn {
        width: 100%;
        justify-content: center;
    }
}
