/* Adaptación de CustomComponents/Select de Licencias a los formularios DOM. */
select.neron-input-element option,
select.neron-input-element optgroup {
    color: var(--ui-text);
    background: var(--ui-floating-surface);
}

.neron-select-native { display: none; }
.neron-select-control { overflow: visible; }
.neron-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    width: 100%;
    min-width: 0;
    min-height: inherit;
    padding: .6rem .78rem;
    border: 0;
    border-radius: inherit;
    outline: 0;
    color: var(--ui-text);
    background: transparent;
    font: inherit;
    font-size: .9rem;
    text-align: left;
    cursor: pointer;
    transition: background-color 130ms ease;
}
.neron-select-trigger:hover:not(:disabled) { background: var(--ui-accent-surface); }
.neron-select-trigger:disabled { color: var(--ui-text-disabled); cursor: not-allowed; }
.neron-select-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.neron-select-trigger.is-placeholder { color: var(--ui-text-muted); }
.neron-select-chevron {
    flex: 0 0 auto;
    width: .5rem;
    height: .5rem;
    margin: -.22rem .12rem 0 0;
    border-right: 1.6px solid currentColor;
    border-bottom: 1.6px solid currentColor;
    color: var(--ui-text-muted);
    transform: rotate(45deg);
    transition: transform 130ms ease;
}
.neron-select-trigger[aria-expanded="true"] .neron-select-chevron { transform: translateY(.22rem) rotate(225deg); }
.neron-select-control:has([aria-expanded="true"]) {
    border-color: var(--ui-accent);
    box-shadow: 0 0 0 3px var(--ui-accent-soft);
}
.neron-select-control:has([aria-invalid="true"]) { border-color: var(--ui-danger); }
.neron-select-error { color: var(--ui-danger); font-size: .78rem; }

/* Fuera del panel para que el scroll y los bordes de las tarjetas no recorten el menú. */
.neron-select-menu {
    position: fixed;
    z-index: 1000;
    margin: 0;
    padding: .4rem;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--ui-border-strong) transparent;
    border: 1px solid var(--ui-floating-border);
    border-radius: 12px;
    color: var(--ui-text);
    background: var(--ui-floating-surface);
    box-shadow: var(--ui-shadow-lg);
}
.neron-select-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    min-height: var(--ui-control-height);
    padding: .55rem .65rem;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--ui-text);
    font-size: .9rem;
    line-height: 1.4;
    cursor: pointer;
}
.neron-select-option + .neron-select-option { margin-top: .15rem; }
.neron-select-option-text { min-width: 0; overflow-wrap: anywhere; }
.neron-select-option.is-selected { color: var(--ui-primary-action-foreground); background: var(--ui-primary-action); }
.neron-select-option.is-active { border-color: var(--ui-accent); background: var(--ui-accent-surface-strong); }
.neron-select-option[aria-disabled="true"] { color: var(--ui-text-disabled); cursor: not-allowed; }
.neron-select-check { flex: 0 0 1rem; width: 1rem; font-weight: 700; color: var(--ui-accent); }
.neron-select-empty { padding: .65rem; color: var(--ui-text-muted); font-size: .9rem; }
@media (prefers-reduced-motion: reduce) {
    .neron-select-trigger, .neron-select-chevron { transition: none; }
}
