/**
 * Custom Color Select Component Styles
 */

.custom-color-select {
    position: relative;
    width: 100%;
    font-family: inherit;
    user-select: none;
}

/* Selected display */
.custom-color-select__selected {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 46px;
}

.custom-color-select__selected:hover {
    border-color: #9ca3af;
}

.custom-color-select__selected--open {
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Color dot */
.custom-color-select__dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-right: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Text */
.custom-color-select__text {
    flex-grow: 1;
    color: #1f2937;
    font-size: 15px;
}

.custom-color-select__text--placeholder {
    color: #9ca3af;
}

/* Arrow */
.custom-color-select__arrow {
    margin-left: 10px;
    color: #6b7280;
    font-size: 10px;
    transition: transform 0.2s ease;
}

.custom-color-select--open .custom-color-select__arrow {
    transform: rotate(180deg);
}

/* Dropdown */
.custom-color-select__dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.custom-color-select--open .custom-color-select__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dropdown scrollbar styling */
.custom-color-select__dropdown::-webkit-scrollbar {
    width: 8px;
}

.custom-color-select__dropdown::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.custom-color-select__dropdown::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.custom-color-select__dropdown::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Dropdown option */
.custom-color-select__option {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.custom-color-select__option:hover {
    background-color: #f3f4f6;
}

.custom-color-select__option--selected {
    background-color: #eff6ff;
}

.custom-color-select__option--selected:hover {
    background-color: #dbeafe;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .custom-color-select__selected {
        padding: 10px 12px;
        min-height: 42px;
    }

    .custom-color-select__text {
        font-size: 14px;
    }

    .custom-color-select__dropdown {
        max-height: 250px;
    }
}

/* Focus styles for accessibility */
.custom-color-select:focus-within .custom-color-select__selected {
    outline: 2px solid #2563EB;
    outline-offset: 2px;
}

/* Animation for smooth opening */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-color-select--open .custom-color-select__dropdown {
    animation: slideDown 0.2s ease;
}

/* Ensure dropdown stays above other elements */
.custom-color-select {
    z-index: 1;
}

.custom-color-select--open {
    z-index: 1001;
}
