/* Custom Select Dropdown Component Styles */

.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select {
    position: relative;
    width: 100%;
    cursor: pointer;
    user-select: none;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0.75rem;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    min-height: 38px;
    gap: 0.75rem;
}

.custom-select-trigger:hover {
    border-color: #adb5bd;
}

.custom-select.open .custom-select-trigger {
    border-color: var(--accent-color, #5d57f4);
    box-shadow: 0 0 0 0.25rem rgba(93, 87, 244, 0.15);
}

.custom-select-placeholder {
    color: #adb5bd;
    font-size: 0.9375rem;
    transition: color 0.2s ease;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select.has-value .custom-select-placeholder {
    color: #212529;
}

.custom-select-trigger-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.custom-select-trigger-price {
    font-size: 0.875rem;
    color: var(--accent-color, #5d57f4);
    font-weight: 600;
    white-space: nowrap;
}

.custom-select-arrow {
    font-size: 0.75rem;
    color: #6c757d;
    transition: transform 0.2s ease;
}

.custom-select.open .custom-select-arrow {
    transform: rotate(180deg);
}

.custom-select-options {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    max-height: 400px;
}

.custom-select.open .custom-select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-select-search {
    position: relative;
    padding: 0.75rem;
    border-bottom: 1px solid #e9ecef;
    flex-shrink: 0;
}

.custom-select-search i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%) translateX(0.35rem);
    color: #adb5bd;
    font-size: 0.8125rem;
    pointer-events: none;
    z-index: 1;
    line-height: 1;
}

.custom-select-search-input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 25px;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.custom-select-search-input:focus {
    outline: none;
    border-color: var(--accent-color, #5d57f4);
    box-shadow: 0 0 0 0.2rem rgba(93, 87, 244, 0.1);
}

.custom-select-search-input::placeholder {
    color: #adb5bd;
}

.custom-select-options-list {
    overflow-y: auto;
    flex: 1;
}

.custom-select-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
    border-bottom: 1px solid #f8f9fa;
}

.custom-select-option:last-child {
    border-bottom: none;
}

.custom-select-option:hover {
    background-color: #f8f9fa;
}

.custom-select-option.selected {
    background-color: rgba(93, 87, 244, 0.1);
    color: var(--accent-color, #5d57f4);
}

.custom-select-option.selected:hover {
    background-color: rgba(93, 87, 244, 0.15);
}

.custom-select-option .option-name {
    font-size: 0.9375rem;
    color: inherit;
}

.custom-select-option .option-price {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
    margin-left: 0.5rem;
    white-space: nowrap;
}

.custom-select-option.selected .option-price {
    color: var(--accent-color, #5d57f4);
}

/* Scrollbar styling for dropdown */
.custom-select-options-list::-webkit-scrollbar {
    width: 6px;
}

.custom-select-options-list::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 0.375rem;
}

.custom-select-options-list::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 0.375rem;
}

.custom-select-options-list::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

/* Hide option when filtered out */
.custom-select-option.filtered-out {
    display: none;
}

/* Focus state for accessibility */
.custom-select:focus {
    outline: none;
}

.custom-select:focus .custom-select-trigger {
    border-color: var(--accent-color, #5d57f4);
    box-shadow: 0 0 0 0.25rem rgba(93, 87, 244, 0.15);
}
