/* Estilo base que respeta la apariencia del sistema */
.select-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin-bottom: 1rem;
    width: 100%;
    max-width: 300px;
}

.select-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.select-wrapper {
    position: relative;
}

.custom-select {
    display: block;
    width: 100%;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: #111827;
    background-color: #fff;
    background-image: none;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    appearance: none;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Flecha personalizada que se adapta al sistema */
.custom-select::-ms-expand {
    display: none;
}

.select-wrapper::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #6b7280;
    pointer-events: none;
}

/* Estados interactivos */
.custom-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.custom-select:disabled {
    background-color: #f3f4f6;
    opacity: 1;
}

/* Mantener la apariencia nativa en macOS */
@media not all and (min-resolution:.001dpcm) {
    @supports (-webkit-appearance:none) {
        .custom-select {
            -webkit-appearance: menulist;
            padding-right: 1rem;
        }
        .select-wrapper::after {
            display: none;
        }
    }
}