/* LLT custom select ----------------------------------------------------
   Replaces the browser-native popup list while preserving the real <select>
   for Django forms, validation and submissions.
*/
.llt-select {
    position: relative;
    width: 100%;
    min-width: 0;
}

.llt-select__native {
    position: absolute !important;
    inline-size: 1px !important;
    block-size: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.llt-select__button {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-inline: 14px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-strong);
    color: var(--text);
    box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255,255,255,.40);
    cursor: pointer;
    text-align: start;
    font-size: 14px;
    transition:
        border-color 140ms ease,
        background-color 140ms ease,
        box-shadow 140ms ease,
        transform 100ms ease;
}
html[data-theme="dark"] .llt-select__button {
    box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255,255,255,.025);
}
.llt-select__button:hover {
    border-color: var(--border-strong);
    background: var(--surface-2);
}
.llt-select.is-open .llt-select__button,
.llt-select__button:focus-visible {
    outline: none;
    border-color: color-mix(in srgb, var(--gold) 55%, var(--border));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 12%, transparent), var(--shadow-xs);
}
.llt-select__button:active { transform: scale(.995); }
.llt-select__button:disabled { opacity: .58; cursor: not-allowed; }
.llt-select__value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.llt-select__chevron {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    color: var(--muted);
    transition: transform 150ms ease;
}
.llt-select.is-open .llt-select__chevron { transform: rotate(180deg); }

.llt-select__menu {
    position: fixed;
    z-index: 3000;
    min-width: 180px;
    overflow: auto;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-strong);
    color: var(--text);
    box-shadow: 0 18px 50px rgba(15,23,42,.18), 0 5px 16px rgba(15,23,42,.08);
    overscroll-behavior: contain;
    animation: llt-select-in 140ms cubic-bezier(.2,.8,.2,1) both;
}
html[data-theme="dark"] .llt-select__menu {
    box-shadow: 0 22px 58px rgba(0,0,0,.42), 0 6px 18px rgba(0,0,0,.28);
}
.llt-select__menu.opens-up { transform-origin: bottom center; }
.llt-select__menu[hidden] { display: none !important; }

.llt-select__option {
    width: 100%;
    min-height: 42px;
    display: grid;
    grid-template-columns: auto minmax(0,1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text);
    text-align: start;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.35;
    transition: background-color 110ms ease, color 110ms ease;
}
.llt-select__option:hover,
.llt-select__option:focus-visible {
    outline: none;
    background: var(--surface-3);
}
.llt-select__option.is-selected {
    background: color-mix(in srgb, var(--gold) 9%, var(--surface));
    color: var(--text);
    font-weight: 700;
}
.llt-select__option:disabled { opacity: .5; cursor: not-allowed; }
.llt-select__option-label { min-width: 0; overflow-wrap: anywhere; }
.llt-select__check { color: var(--gold-dark); font-size: 13px; font-weight: 800; }

.llt-select__status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
    box-shadow: 0 0 0 4px color-mix(in srgb, #94a3b8 10%, transparent);
}
.llt-select__status-dot--new { background:#3b82f6; box-shadow:0 0 0 4px rgba(59,130,246,.10); }
.llt-select__status-dot--contact { background:#8b5cf6; box-shadow:0 0 0 4px rgba(139,92,246,.10); }
.llt-select__status-dot--follow_up { background:#f97316; box-shadow:0 0 0 4px rgba(249,115,22,.10); }
.llt-select__status-dot--waiting { background:#d6a700; box-shadow:0 0 0 4px rgba(214,167,0,.10); }
.llt-select__status-dot--preparing { background:#06a7c7; box-shadow:0 0 0 4px rgba(6,167,199,.10); }
.llt-select__status-dot--completed { background:#22a95a; box-shadow:0 0 0 4px rgba(34,169,90,.10); }
.llt-select__status-dot--cancelled { background:#df4a54; box-shadow:0 0 0 4px rgba(223,74,84,.10); }

/* Header and quick-status variants stay compact. */
.llt-select--header { width: auto; min-width: 108px; }
.llt-select--header .llt-select__button {
    min-height: 40px;
    height: 40px;
    padding-inline: 11px 9px;
    border-radius: 10px;
    background: var(--surface-2);
    font-size: 12px;
    font-weight: 700;
}

.quick-status-control.is-enhanced-select {
    grid-template-columns: 8px minmax(0,1fr);
    padding-inline-end: 7px;
}
.quick-status-control.is-enhanced-select .quick-status-control__chevron { display:none; }
.quick-status-control .llt-select--quick { min-width: 0; }
.quick-status-control .llt-select--quick .llt-select__button {
    min-height: 30px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    box-shadow: none;
    font-size: 12px;
    font-weight: 720;
}
.quick-status-control--large .llt-select--quick .llt-select__button {
    min-height: 36px;
    font-size: 13px;
}
.quick-status-control .llt-select--quick .llt-select__button:hover,
.quick-status-control .llt-select--quick .llt-select__button:focus-visible {
    background: transparent;
    border: 0;
    box-shadow: none;
}
.quick-status-control .llt-select--quick .llt-select__chevron {
    width: 15px;
    height: 15px;
    color: color-mix(in srgb, var(--quick-status-color) 65%, var(--muted));
}

@keyframes llt-select-in {
    from { opacity: 0; transform: translateY(-4px) scale(.99); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 760px) {
    .llt-select__button { min-height: 48px; font-size: 16px; }
    .llt-select__option { min-height: 46px; font-size: 15px; }
    .llt-select__menu { padding: 7px; border-radius: 13px; }
    .llt-select--header { min-width: 94px; }
    .llt-select--header .llt-select__button { min-height: 40px; height: 40px; font-size: 12px; }
    .quick-status-control .llt-select--quick .llt-select__button { min-height: 32px; font-size: 12px; }
    .quick-status-control--large .llt-select--quick .llt-select__button { min-height: 38px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
    .llt-select__button,
    .llt-select__chevron,
    .llt-select__option { transition-duration: 1ms !important; }
    .llt-select__menu { animation: none; }
}

.llt-select.has-error .llt-select__button,
.llt-select__button[aria-invalid="true"] {
    border-color: color-mix(in srgb, var(--danger) 70%, var(--border));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 10%, transparent);
}
