/* Custom Select Component - Volitives Coach Portal */

/* Custom Dropdown Styles */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background-color: white;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    min-height: 50px;
    display: flex;
    align-items: center;
    color: #1F2937;
}

.custom-select-trigger::after {
    content: '';
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    transition: transform 0.2s ease;
}

.custom-select-trigger.open::after {
    transform: translateY(-50%) rotate(180deg);
}

.custom-select-trigger:hover {
    border-color: rgb(0, 187, 193);
}

.custom-select-trigger:focus {
    outline: none;
    border-color: rgb(0, 187, 193);
    box-shadow: 0 0 0 3px rgba(0, 187, 193, 0.15);
}

.custom-select-trigger .placeholder {
    color: #6B7280;
}

.custom-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid rgb(0, 187, 193);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    max-height: 280px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.custom-select-dropdown.open {
    display: block;
    animation: customSelectSlide 0.2s ease;
}

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

.custom-select-option {
    padding: 0.875rem 1rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid #E5E7EB;
    font-size: 0.95rem;
    color: #1F2937;
}

.custom-select-option:last-child {
    border-bottom: none;
}

.custom-select-option:hover {
    background-color: rgba(0, 187, 193, 0.1);
}

.custom-select-option.selected {
    background-color: rgb(0, 187, 193);
    color: white;
    font-weight: 500;
}

.custom-select-option.selected:hover {
    background-color: rgb(12, 141, 146);
}

.custom-select-option.disabled {
    color: #9CA3AF;
    cursor: not-allowed;
    background-color: #F9FAFB;
}

/* Hide native select when custom is active */
select.custom-hidden {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    height: 0;
    width: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .custom-select-dropdown {
        max-height: 240px;
    }

    .custom-select-option {
        padding: 1rem;
    }
}
