/* ============================================
   Custom Select Dropdown — Glassmorphism Style
   ============================================ */

.custom-select {
    position: relative;
    width: 100%;
    user-select: none;
}

/* Trigger button */
.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #fff;
    background: rgba(31, 41, 55, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(75, 85, 99, 0.5);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -4px rgba(0, 0, 0, 0.2);
    position: relative;
}

.custom-select-trigger:hover {
    border-color: rgba(59, 130, 246, 0.5);
}

.custom-select-trigger:focus,
.custom-select.open .custom-select-trigger {
    outline: none;
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

/* Glow border effect */
.custom-select .glow-border {
    position: absolute;
    -inset: 0.125rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(6, 182, 212, 0.2));
    filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: -1;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
}

.custom-select:hover .glow-border,
.custom-select.open .glow-border {
    opacity: 1;
}

/* Arrow icon */
.custom-select-arrow {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    color: #9ca3af;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s;
    pointer-events: none;
}

.custom-select.open .custom-select-arrow {
    transform: translateY(-50%) rotate(180deg);
    color: #3b82f6;
}

/* Dropdown options panel */
.custom-select-options {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(75, 85, 99, 0.4);
    border-radius: 0.75rem;
    padding: 0.375rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(59, 130, 246, 0.08);
    max-height: 280px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-select.open .custom-select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Scrollbar */
.custom-select-options::-webkit-scrollbar {
    width: 4px;
}

.custom-select-options::-webkit-scrollbar-track {
    background: transparent;
}

.custom-select-options::-webkit-scrollbar-thumb {
    background: rgba(75, 85, 99, 0.5);
    border-radius: 2px;
}

/* Individual option */
.custom-select-option {
    display: flex;
    align-items: center;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #d1d5db;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

.custom-select-option:hover {
    background: rgba(59, 130, 246, 0.15);
    color: #fff;
}

.custom-select-option.selected {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.custom-select-option.selected::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: #3b82f6;
    border-radius: 0 2px 2px 0;
}

/* App icon dot */
.custom-select-option .app-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
}

/* Dashboard navbar variant */
.custom-select.navbar-variant .custom-select-trigger {
    padding: 0.5rem 2.25rem 0.5rem 0.875rem;
    font-size: 0.875rem;
    border-radius: 0.75rem;
}

.custom-select.navbar-variant .custom-select-options {
    top: calc(100% + 4px);
    min-width: 180px;
    right: 0;
    left: auto;
}

/* Label above */
.custom-select-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    text-align: center;
}
