/* Overlay: scroll-da boşluq yaranmasın — fixed, document flow-dan çıxır */
.overlay.fixed-block,
.overlay[data-overlay] {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
    margin: 0 !important;
    padding: 20px 0 !important;
}

/* Login modal açıq olanda overlay və modal görünsün (style.css-də .overlay üçün opacity: 0 qalır) */
.overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    background: rgba(28, 27, 31, 0.7) !important;
}
.overlay.active .login-modal.active,
.overlay.active [data-popup="login"].active {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Dil dəyişməsi: desktopda header-mobile blokunu gizlətmək */
@media (min-width: 1025px) {
    .header .lang-box--header-mobile {
        display: none !important;
    }
}

/* Mobil: header sətirində dil düyməsi (burger yanında) həmişə görünsün */
@media (max-width: 1024px) {
    .header .lang-box--header-mobile {
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: relative;
        z-index: 50;
        margin-right: 16px;
    }

    .header .lang-box--header-mobile .menu-button {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        /* background: rgba(42, 42, 61, 0.38); */
        transition: background 0.3s;
        border: none;
        cursor: pointer;
    }

    .header .lang-box--header-mobile .menu-button:hover,
    .header .lang-box--header-mobile .menu-button:focus {
        /* background: rgba(73, 69, 79, 0.08); */
        outline: none;
    }

    .header .lang-box--header-mobile .menu-button svg {
        fill: #1a1918;
        width: 20px;
        height: 20px;
    }

    .header .lang-box--header-mobile .sub-menu {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        left: auto;
        transform: none;
        visibility: hidden;
        opacity: 0;
        display: flex;
        flex-direction: column;
        padding: 11px 11px;
        border-radius: 8px;
        background: rgba(var(--bg-a), 1);
        border: 1px solid rgba(62, 62, 77, 0.6);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        z-index: 100;
        transition: opacity 0.2s, visibility 0.2s;
    }

    .header .lang-box--header-mobile:focus-within .sub-menu,
    .header .lang-box--header-mobile.is-open .sub-menu {
        visibility: visible;
        opacity: 1;
    }

    .header .lang-box--header-mobile .sub-menu a {
        font-family: var(--font-family);
        font-weight: 600;
        font-size: 14px;
        line-height: 150%;
        padding: 6px 8px;
        margin-bottom: 8px;
        color: rgba(var(--cl-b), 1);
        transition: color 0.3s;
        text-align: center;
        text-decoration: none;
    }

    .header .lang-box--header-mobile .sub-menu li:last-of-type a {
        margin-bottom: 0;
    }

    .header .lang-box--header-mobile .sub-menu a:hover {
        color: rgba(var(--cl-c), 1);
    }

    /* Mobil menyu içindəki dil blokunu gizlət */
    .mobile .lang-box {
        display: none !important;
    }

    /* Mobil: burger menyu açıb bağlayanda overlay (fixed-block) scroll/padding problemi olmasın */
    .overlay.fixed-block,
    .overlay[data-overlay] {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}
