/* ─── Custom Select ─── */
.lala-select {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 320px;
}

.lala-select-wide {
    min-width: 200px;
}

.lala-select-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    transition: border-color var(--transition-fast);
    outline: none;
}

.lala-select-trigger:focus,
.lala-select.open .lala-select-trigger {
    border-color: var(--accent);
}

.lala-select.disabled .lala-select-trigger {
    opacity: 0.5;
    cursor: not-allowed;
}

.lala-select-trigger span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.lala-select-arrow {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
}

.lala-select.open .lala-select-arrow {
    transform: rotate(180deg);
}

/* Dropdown rendered as fixed portal via inline style */
.lala-select-dropdown {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    max-height: 220px;
    animation: selectFadeIn 100ms ease-out;
}

@keyframes selectFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.lala-select-option {
    padding: 9px 14px;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background var(--transition-fast);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lala-select-option:hover {
    background: var(--bg-hover);
}

.lala-select-option.selected {
    background: var(--bg-active);
    color: var(--text-accent);
    font-weight: 500;
}
