/* ==========================================================================
   MULTILIGAS DARK CUSTOM DROPDOWN COMPONENT (PREMIUM UI/UX)
   Theme: Dark Navy, Cyan Electric (#0284c7 / #38bdf8), Trophy Gold (#f59e0b)
   ========================================================================== */

.custom-dropdown-wrapper {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    font-family: 'Outfit', 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    user-select: none;
    -webkit-user-select: none;
    box-sizing: border-box;
}

.custom-dropdown-wrapper * {
    box-sizing: border-box;
}

/* TRIGGER BUTTON */
.custom-dropdown-trigger {
    background: #091322 !important;
    color: #f8fafc !important;
    border: 1.5px solid rgba(56, 189, 248, 0.35) !important;
    border-radius: 12px !important;
    padding: 10px 16px !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    min-width: 220px !important;
    max-width: 100% !important;
    height: 44px !important;
    cursor: pointer !important;
    outline: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.45) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-align: left !important;
}

.custom-dropdown-trigger:hover {
    border-color: #38bdf8 !important;
    background: #0f1a36 !important;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.35), 0 4px 18px rgba(0, 0, 0, 0.5) !important;
}

.custom-dropdown-wrapper.is-open .custom-dropdown-trigger {
    border-color: #38bdf8 !important;
    background: #0f1d3d !important;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.5), 0 6px 20px rgba(0, 0, 0, 0.6) !important;
}

.custom-dropdown-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    color: #ffffff;
    letter-spacing: 0.3px;
}

.custom-dropdown-caret {
    font-size: 11px;
    color: #38bdf8;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.custom-dropdown-wrapper.is-open .custom-dropdown-caret {
    transform: rotate(180deg);
}

/* POPUP MENU PANEL */
.custom-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 100%;
    width: max-content;
    max-width: min(380px, 92vw);
    background: #091322 !important;
    border: 1px solid rgba(56, 189, 248, 0.45) !important;
    border-radius: 14px !important;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.9), 0 0 25px rgba(2, 132, 199, 0.25) !important;
    padding: 6px 0 !important;
    max-height: 310px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 10500 !important;
    display: none;
    animation: customDropdownFadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.custom-dropdown-wrapper.is-open .custom-dropdown-menu {
    display: block;
}

.custom-dropdown-wrapper.dropup .custom-dropdown-menu {
    top: auto;
    bottom: calc(100% + 6px);
}

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

/* CUSTOM SCROLLBAR */
.custom-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.custom-dropdown-menu::-webkit-scrollbar-track {
    background: #060b14;
    border-radius: 4px;
}

.custom-dropdown-menu::-webkit-scrollbar-thumb {
    background: #0284c7;
    border-radius: 4px;
}

.custom-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #38bdf8;
}

/* SECTION HEADERS (OPTGROUP LABELS) */
.custom-dropdown-section-title {
    padding: 8px 14px 7px 14px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0 2px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.custom-dropdown-section:first-child .custom-dropdown-section-title {
    border-top: none;
    margin-top: 0;
}

.custom-dropdown-section-title.section-fase-final {
    color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.08) !important;
    border-bottom: 1px solid rgba(245, 158, 11, 0.2) !important;
}

.custom-dropdown-section-title.section-fase-regular {
    color: #38bdf8 !important;
    background: rgba(56, 189, 248, 0.08) !important;
    border-bottom: 1px solid rgba(56, 189, 248, 0.2) !important;
}

.custom-dropdown-section-title.section-fase-copa {
    color: #fbbf24 !important;
    background: rgba(251, 191, 36, 0.08) !important;
    border-bottom: 1px solid rgba(251, 191, 36, 0.2) !important;
}

.custom-dropdown-section-title.section-default {
    color: #94a3b8 !important;
    background: rgba(148, 163, 184, 0.08) !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15) !important;
}

/* OPTION ITEMS */
.custom-dropdown-item {
    padding: 9px 14px;
    margin: 2px 6px;
    border-radius: 8px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: left;
    white-space: nowrap;
}

.custom-dropdown-item:hover,
.custom-dropdown-item.is-focused {
    background: rgba(56, 189, 248, 0.15);
    color: #ffffff;
    padding-left: 17px;
}

.custom-dropdown-item.is-selected {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.4) 0%, rgba(14, 165, 233, 0.25) 100%) !important;
    border: 1px solid rgba(56, 189, 248, 0.5) !important;
    color: #38bdf8 !important;
    font-weight: 800 !important;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.2) !important;
}

.custom-dropdown-check {
    font-size: 13px;
    font-weight: 900;
    color: #38bdf8;
    margin-left: 10px;
    flex-shrink: 0;
}

/* RESPONSIVE FULL WIDTH ON SMALL SCREENS */
@media (max-width: 767px) {
    .custom-dropdown-wrapper {
        width: 100% !important;
    }
    .custom-dropdown-trigger {
        width: 100% !important;
        min-width: 100% !important;
    }
    .custom-dropdown-menu {
        width: 100% !important;
        max-width: 100% !important;
    }
}
