/* Shared custom select component */
.custom-select {
    position: relative;
    width: 100%;
}

.custom-select-native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    min-height: calc(0.625rem * 2 + 0.9375rem * 1.65);
    padding: 0.625rem 0.875rem;
    font-family: inherit;
    font-size: 0.9375rem;
    text-align: left;
    border: 1px solid #E5E1DC;
    border-radius: 4px;
    background: #FAFAF8;
    color: #1E1E1E;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.custom-select-trigger:hover {
    border-color: #d5d0ca;
}

.custom-select.open .custom-select-trigger,
.custom-select-trigger:focus-visible {
    outline: none;
    border-color: #3D1A24;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(61, 26, 36, 0.08);
}

.custom-select-value.is-placeholder {
    color: #5C5C5C;
}

.custom-select-chevron {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-right: 2px solid #5A3A44;
    border-bottom: 2px solid #5A3A44;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.2s ease;
}

.custom-select.open .custom-select-chevron {
    transform: rotate(225deg) translateY(2px);
}

.custom-select-menu {
    position: absolute;
    z-index: 30;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    margin: 0;
    padding: 0.375rem 0;
    list-style: none;
    background: #FFFFFF;
    border: 1px solid #E5E1DC;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(30, 30, 30, 0.08);
    max-height: 220px;
    overflow-y: auto;
}

.custom-select-menu[hidden] {
    display: none;
}

.custom-select-option {
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    color: #1E1E1E;
    cursor: pointer;
    transition: background 0.2s ease;
}

.custom-select-option:hover,
.custom-select-option:focus {
    background: rgba(255, 214, 89, 0.12);
    outline: none;
}

.custom-select-option.is-selected {
    background: rgba(255, 214, 89, 0.12);
    font-weight: 500;
    color: #3D1A24;
}

.custom-select.is-invalid .custom-select-trigger {
    border-color: #c0392b;
}
