:root {
    /* --select-menu-bg: #16A34A; */
    /* --select-menu-bg: #1f1f1f; */
    --navbar-link: #0F8459;
    --navbar-text: #ffffff;
    --dropdown-bg: #ffffff;
    --dropdown-border: rgba(15, 132, 89, 0.2);
    --option-text: #333;
    --option-hover-bg: rgba(15, 132, 89, 0.1);
    --option-selected-bg: rgba(15, 132, 89, 0.15);
    --option-selected-text: #0F8459;
    --overlay-bg: rgba(0, 0, 0, 0.5);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --lang-icon-small-color: #1f1f1f;
}

.invert-root {
    /* --select-menu-bg: rgb(0, 177, 44); */
    --navbar-link: #10B981;
    --navbar-text: #e5e7eb;
    --dropdown-bg: #1f2937;
    --dropdown-border: rgba(16, 185, 129, 0.0);
    --option-text: #e5e7eb;
    --option-hover-bg: rgba(16, 185, 129, 0.1);
    --option-selected-bg: rgba(16, 185, 129, 0.15);
    --option-selected-text: #10B981;
    --overlay-bg: rgba(0, 0, 0, 0.7);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --lang-icon-small-color: whitesmoke;
}

/* Стилове за съществуващия елемент */
.nav-language-simple {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--select-menu-bg);
    border-radius: 8px;
    padding: 4px 8px;
    transition: all 0.2s ease;
    min-width: 120px;
    /* border: 1px dashed grey; */
    cursor: pointer;
}

.nav-language-simple:focus {
    outline: none;
}

.language-icon {
    color: var(--navbar-link);
    display: flex;
    align-items: center;
    padding-right: 6px;
}

.language-icon .material-symbols-outlined {
    font-size: 18px;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
    /* color: var(--dropdown-bg); */
}

#dropdown-arrow {
    width: 14px;
    height: 14px;
    margin-left: -8.5px;
    margin-top: 5.25px;
}

/* #dropdown-arrow:[cursor="pointer"] {
    transform: rotate(-180deg);
} */

.invert-root #dropdown-arrow {
    filter: invert(1);
}

.language-select {
    display: none !important;
}


.custom-select-display:not(.lang-letter) {
    /* color: white; */
    /* min-width: 100px; */
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px 6px 16px;
    flex: 1;
    outline: none;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.custom-select-display .lang-letter {
    color: var(--navbar-text);

}

.lang-letter {
    /* background-color: red; */
    font-weight: 700;
    font-size: 10px;
    /* color: black; */
}

.select-arrow {
    color: var(--navbar-link);
    display: flex;
    align-items: center;
    /* transition: transform 0.2s ease; */
}

/* .nav-language-simple.open .select-arrow {
    transform: rotate(180deg);
} */

.select-arrow .material-symbols-outlined {
    font-size: 20px;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
    /* color: var(--dropdown-bg); */
    margin-left: -7.5px;

}

/* Dropdown стилове */
.custom-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--dropdown-bg);
    border-radius: 8px;
    margin-top: 4px;
    box-shadow: 0 4px 12px var(--shadow-color);
    z-index: 1000;
    overflow: hidden;
    border: 1px solid var(--dropdown-border);
    display: none;
}

.nav-language-simple.open .custom-select-dropdown {
    display: block;
}

.custom-select-option {
    padding: 10px 12px;
    color: var(--option-text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-letter {
    font-weight: 600;
}

.flag-icon {
    width: 16px;
    margin-right: 5px;
}

.custom-select-option:hover {
    background: var(--option-hover-bg);
}

.custom-select-option.selected {
    background: var(--option-selected-bg);
    color: var(--option-selected-text);
}

/* Мобилна версия */

@media (max-width: 40000px) {
    .select-arrow {
        margin-left: -4px;
    }
}

@media (max-width: 768px) {
    .nav-language-simple {
        min-width: 100px;
        padding: 3px 6px;
    }

    .language-icon .material-symbols-outlined {
        font-size: 16px;
    }

    .custom-select-display {
        font-size: 13px;
        padding: 4px 6px 4px 2px;
    }

    .select-arrow .material-symbols-outlined {
        font-size: 18px;
    }

    .custom-select-dropdown {
        position: fixed;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 300px;
        max-height: 80vh;
        overflow-y: auto;
        margin-top: 0;
    }

    .custom-select-option {
        padding: 12px 16px;
    }
}


@media (max-width: 500px) {
    .nav-language-simple {
        min-width: auto;
        padding: 6px;
        background: transparent;
        border: none;
        border-radius: 50%;
    }

    .custom-select-display {
        margin-right: -17.5px;
    }

    .select-arrow {
        display: none;
    }

    .language-icon {
        padding: 0;
        margin-right: -7.5px;
    }

    .language-icon .material-symbols-outlined {
        font-size: 22px;
        color: var(--lang-icon-small-color) !important;
    }

    .nav-language-simple:hover {
        background: rgba(255, 255, 255, 0.08);
    }

    .custom-select-dropdown {
        position: fixed;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 320px;
        max-height: 80vh;
        overflow-y: auto;
    }
}




/* Анимация за dropdown */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-select-dropdown {
    animation: fadeIn 0.2s ease;
}

@media (max-width: 768px) {
    .custom-select-dropdown {
        animation: none;
    }
}

/* Utility class за скриване */
.hidden {
    display: none !important;
}

/* Оверлей за мобилна версия */
.dropdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay-bg);
    z-index: 999;
    display: none;
}