/**
 * CustomSelect Plugin Styles
 *
 * @author Red Ant Technology
 * @version 1.0.0
 */

.native-select {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.custom-select-display {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    background: transparent;
    border: none;
}

.custom-select-value {
    color: #141416;
    font-size: 20px;
    font-weight: 700;
    font-family: var(--font-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-select-arrow {
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M19 9L12 16L5 9' stroke='%23141416' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 24px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

/* Rotate arrow when dropdown is open */
.custom-select-dropdown.open ~ .custom-select-display .custom-select-arrow,
.custom-select-display[aria-expanded="true"] .custom-select-arrow {
    transform: rotate(180deg);
}

.custom-select-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    background-color: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    padding: 8px 0 8px;
    display: none;
    max-height: 65vh;
    overflow-y: auto;
    z-index: 50;
    animation: fadeInDown 0.2s ease;
}

.custom-select-dropdown.open {
    display: block;
}

/* Smooth dropdown appearance */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-select-search {
    padding: 0 16px 8px;
}

.custom-select-search-input {
    width: 100%;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #E5E7EB;
    font-size: 20px;
}

.custom-select-options {
    max-height: 50vh;
    overflow-y: auto;
}

.custom-select-option {
    padding: 10px 16px;
    font-size: 20px;
    cursor: pointer;
    color: #141416;
}

.custom-select-option:hover,
.custom-select-option.active {
    background-color: #E8F5E9;
}

/* Empty state styling - message rendered via JS */
.custom-select-empty-message {
    display: block;
    padding: 16px;
    text-align: center;
    color: #777e90;
    font-size: 14px;
}

/* Responsive Mobile Styles */
@media (max-width: 768px) {
    .custom-select-option {
        padding: 14px 18px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .custom-select-search-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}
