.eapp-select {
    --select-accent: var(--primary, var(--primary-color, #0284c7));
    position: relative;
    width: 100%;
}

/* Keep the original select for form submission and native constraint validation. */
.eapp-select > .eapp-select__native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.eapp-select__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    min-height: 56px;
    padding: 15px 20px;
    border: 1px solid #dce3ec;
    border-radius: 12px;
    background: #fff;
    color: #1e293b;
    font: inherit;
    font-size: 1rem;
    line-height: 1.5;
    text-align: left;
    box-shadow: 0 1px 2px rgb(15 23 42 / 3%);
    cursor: pointer;
    transition: border-color .18s, box-shadow .18s;
}

.eapp-select__trigger::after {
    content: '';
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    margin: -4px 2px 0 0;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(45deg);
    transition: transform .18s;
}

.eapp-select__trigger.is-placeholder { color: #64748b; }
.eapp-select__trigger:hover { border-color: #94a3b8; }
.eapp-select__trigger:focus-visible,
.eapp-select__trigger[aria-expanded="true"] {
    outline: 2px solid var(--select-accent);
    outline-offset: 2px;
    border-color: var(--select-accent);
}
.eapp-select__trigger[aria-expanded="true"]::after { transform: translateY(4px) rotate(225deg); }
.eapp-select__trigger[aria-invalid="true"] { border-color: #dc2626; }
.eapp-select__trigger:disabled { cursor: not-allowed; background: #f1f5f9; opacity: .65; }
.eapp-select__error { display: block; margin-top: 8px; color: #b91c1c; font-size: .875rem; }
.eapp-select__error[hidden], .eapp-select__menu[hidden] { display: none; }

.eapp-select__menu {
    position: fixed;
    z-index: 1200;
    box-sizing: border-box;
    margin: 0;
    padding: 6px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    color: #334155;
    box-shadow: 0 16px 48px rgb(15 23 42 / 14%), 0 2px 8px rgb(15 23 42 / 5%);
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.eapp-select__option {
    position: relative;
    padding: 12px 38px 12px 14px;
    border-radius: 8px;
    font-size: .95rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
    cursor: pointer;
}
.eapp-select__option.is-active { background: #f1f5f9; outline: 1px solid #e2e8f0; outline-offset: -1px; }
.eapp-select__option[aria-selected="true"] { background: #eff6ff; color: #075985; font-weight: 600; }
.eapp-select__option[aria-selected="true"]::after { content: '✓'; position: absolute; right: 14px; top: 12px; }
.eapp-select__option[aria-disabled="true"] { color: #94a3b8; cursor: not-allowed; }

@media (prefers-reduced-motion: reduce) {
    .eapp-select__trigger, .eapp-select__trigger::after { transition: none; }
}
