.custom-dropdown-menu {
    position: relative;
    display: inline-flex;
}

    .custom-dropdown-menu ul {
        margin: 0;
        padding: 0;
    }


.custom-dropdown-menu-button {
    background-color: transparent;
    color: #000;
    border: 1px solid #000;
    padding: 10px 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    text-align: center;
    transition: background-color 0.2s ease;
}

[data-theme="dark"] .custom-dropdown-menu-button {
    color: #fff;
    border: 1px solid #fff;
}

.custom-dropdown-menu-button:hover {
    color: #000;
    background-color: #eee;
    border: 1px solid #000;
}

[data-theme="dark"] .custom-dropdown-menu-button:hover {
    color: #fff;
    background-color: #272f3a;
    border: 1px solid #fff;
}

.custom-dropdown-menu-button img {
    display: inline-flex;
    width: 30px;
    border-radius: 50%;
    outline: 1px solid #666;
}

[data-theme="dark"] .custom-dropdown-menu-button img {
    border: 1px solid #000;
    outline: 1px solid #eee;
}

.custom-dropdown-menu-list {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    border: 1px solid #272f3a;
    border-radius: 8px;
    display: none;
    z-index: 10;
    width: 100%;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    margin-top: 2px;
}

[dir="rtl"] .custom-dropdown-menu-list {
    left: auto;
    right: 0;
}

[data-theme="dark"] .custom-dropdown-menu-list {
    background-color: #272f3a;
    border: 1px solid #fff;
}

.custom-dropdown-menu-list li {
    width: 100%;
    overflow: hidden;
    list-style: none;
    border-bottom: 1px solid #000;
}

[data-theme="dark"] .custom-dropdown-menu-list li {
    border-bottom: 1px solid #fff;
}

.custom-dropdown-menu-list li:last-child {
    border-bottom: none;
}

.custom-dropdown-menu-list a {
    display: block;
    text-decoration: none;
    cursor: pointer;
    padding: 12px;
}

.custom-dropdown-menu-list a,
.custom-dropdown-menu-list span,
.custom-dropdown-menu-list i {
    color: #333;
    transition: color 0.2s ease;
}

    .custom-dropdown-menu-list a:hover,
    .custom-dropdown-menu-list span:hover,
    .custom-dropdown-menu-list i:hover {
        color: #000;
        font-weight: bold;
    }

[data-theme="dark"] .custom-dropdown-menu-list a,
[data-theme="dark"] .custom-dropdown-menu-list span,
[data-theme="dark"] .custom-dropdown-menu-list i {
    color: #ccc;
}

    [data-theme="dark"] .custom-dropdown-menu-list a:hover,
    [data-theme="dark"] .custom-dropdown-menu-list span:hover,
    [data-theme="dark"] .custom-dropdown-menu-list i:hover {
        color: #fff;
    }

.custom-dropdown-menu-list.is-open {
    display: block;
}

.custom-dropdown-menu .mobile-only {
    display: none !important;
}

.custom-dropdown-menu .desktop-only {
    display: block !important;
}

@media (max-width: 767.9px) {
    .custom-dropdown-menu .mobile-only {
        display: block !important;
    }

    .custom-dropdown-menu .desktop-only {
        display: none !important;
    }

    .custom-dropdown-menu .desktop-content {
        display: none !important;
    }

    .custom-dropdown-menu-mobile-bottom-nav {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        border-top-left-radius: 10px;
        border-top-right-radius: 10px;
        background-color: #fff;
        box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.9);
        z-index: 1000;
        padding: 2px 0;
    }

    [data-theme="dark"] .custom-dropdown-menu-mobile-bottom-nav {
        background-color: #272f3a;
        box-shadow: 0px 5px 15px rgba(255, 255, 255, 0.9);
    }

    .custom-dropdown-menu-mobile-bottom-nav ul {
        display: flex;
        justify-content: space-around;
        align-items: center;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .custom-dropdown-menu-mobile-bottom-nav li {
        flex: 1;
        text-align: center;
        border-bottom: none !important;
    }

    .custom-dropdown-menu-mobile-bottom-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        padding: 8px 4px;
        color: #333;
        font-size: 12px;
        transition: color 0.2s ease;
    }

    [data-theme="dark"] .custom-dropdown-menu-mobile-bottom-nav a {
        color: #ccc;
    }

    .custom-dropdown-menu-mobile-bottom-nav a:hover {
        color: #000;
        font-weight: bold;
    }

    [data-theme="dark"] .custom-dropdown-menu-mobile-bottom-nav a:hover {
        color: #fff;
    }

    .custom-dropdown-menu-mobile-bottom-nav i {
        font-size: 20px;
        margin-bottom: 4px;
        font-style: normal;
    }

    .custom-dropdown-menu-mobile-bottom-nav span {
        display: block;
    }

    .custom-dropdown-menu-more-menu-button {
        cursor: pointer;
    }

    .custom-dropdown-menu-mobile-extra-menu {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background-color: #fff;
        border-top: 1px solid #272f3a;
        border-radius: 16px 16px 0 0;
        box-shadow: 0px -4px 12px rgba(0, 0, 0, 0.15);
        z-index: 1001;
        transform: translateY(100%);
        transition: transform 0.3s ease;
        max-height: 70vh;
        overflow-y: auto;
    }

    [data-theme="dark"] .custom-dropdown-menu-mobile-extra-menu {
        background-color: #272f3a;
        border-top: 1px solid #fff;
    }

    .custom-dropdown-menu-mobile-extra-menu.is-open {
        transform: translateY(0);
    }

    .custom-dropdown-menu-mobile-extra-menu ul {
        margin: 0;
        padding: 16px;
        list-style: none;
    }

    .custom-dropdown-menu-mobile-extra-menu li {
        border-bottom: 1px solid #eee;
    }

    [data-theme="dark"] .custom-dropdown-menu-mobile-extra-menu li {
        border-bottom: 1px solid #444;
    }

    .custom-dropdown-menu-mobile-extra-menu li:last-child {
        border-bottom: none;
    }

    .custom-dropdown-menu-mobile-extra-menu a {
        display: block;
        padding: 16px;
        text-decoration: none;
        color: #333;
    }

    [data-theme="dark"] .custom-dropdown-menu-mobile-extra-menu a {
        color: #ccc;
    }

    .custom-dropdown-menu-mobile-extra-menu .close-extra-menu {
        display: block;
        text-align: center;
        padding: 16px;
        background-color: #ddd;
        color: #333;
        font-weight: bold;
        cursor: pointer;
        border-radius: 8px;
        margin-top: 8px;
    }

    [data-theme="dark"] .custom-dropdown-menu-mobile-extra-menu .close-extra-menu {
        background-color: #666;
        color: #fff;
    }

    .custom-dropdown-menu-mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

        .custom-dropdown-menu-mobile-overlay.active {
            display: block;
            opacity: 1;
        }

    body.custom-dropdown-menu-active {
        padding-bottom: 70px;
    }
}

@media (min-width: 768px) {
    .custom-dropdown-menu .mobile-only {
        display: none !important;
    }

    .custom-dropdown-menu .desktop-only {
        display: block !important;
    }

    .custom-dropdown-menu .desktop-content {
        display: block !important;
    }

    .custom-dropdown-menu-mobile-bottom-nav,
    .custom-dropdown-menu-mobile-extra-menu,
    .custom-dropdown-menu-mobile-overlay {
        display: none !important;
    }
}
