/* Reusable enhanced select control for dark tool surfaces. */

.sch-select-enhanced {
    position: relative;
}

.sch-select-native {
    position: absolute !important;
    inset: auto 0 0 !important;
    width: 100% !important;
    height: 1px !important;
    min-height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.sch-select-control {
    position: relative;
    width: 100%;
}

.sch-select-trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    min-height: 42px;
    padding: 0 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 13px;
    color: var(--text-primary, #f8fafc);
    background:
        radial-gradient(circle at 18% 0%, rgba(69, 244, 255, 0.09), transparent 34%),
        rgba(3, 5, 12, 0.76);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.sch-select-trigger:hover,
.sch-select-open .sch-select-trigger {
    border-color: rgba(69, 244, 255, 0.34);
    background:
        radial-gradient(circle at 18% 0%, rgba(69, 244, 255, 0.14), transparent 36%),
        rgba(7, 12, 20, 0.9);
    box-shadow: 0 0 22px rgba(69, 244, 255, 0.08);
}

.sch-select-trigger:focus-visible {
    border-color: rgba(69, 244, 255, 0.6);
    outline: none;
    box-shadow: 0 0 0 3px rgba(69, 244, 255, 0.14);
}

.sch-select-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sch-select-chevron {
    width: 0.54rem;
    height: 0.54rem;
    flex: 0 0 auto;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    color: var(--accent-secondary-strong, #7defff);
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.2s ease;
}

.sch-select-open .sch-select-chevron {
    transform: rotate(225deg) translate(-2px, -2px);
}

.sch-select-menu {
    position: absolute;
    z-index: 90;
    top: 100%;
    left: 0;
    display: grid;
    gap: 0.15rem;
    width: max(100%, var(--sch-select-menu-width, 12.5rem));
    min-width: 100%;
    max-width: calc(100vw - 2rem);
    max-height: var(--sch-select-menu-max-height, 15rem);
    margin-top: 0.35rem;
    padding: 0.32rem;
    overflow-y: auto;
    border: 1px solid rgba(69, 244, 255, 0.24);
    border-radius: 13px;
    background:
        radial-gradient(circle at 12% 0%, rgba(69, 244, 255, 0.12), transparent 42%),
        linear-gradient(180deg, rgba(19, 23, 34, 0.98), rgba(11, 13, 22, 0.98));
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

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

.sch-select-align-right .sch-select-menu {
    right: 0;
    left: auto;
}

.sch-select-option {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    min-height: 31px;
    padding: 0 0.55rem;
    border: 0;
    border-radius: 9px;
    color: var(--text-secondary, #cbd5e1);
    background: transparent;
    font: inherit;
    font-size: 0.86rem;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
    transition: color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.sch-select-option::before {
    content: "";
    width: 0.47rem;
    height: 0.47rem;
    flex: 0 0 auto;
    border: 1.5px solid rgba(69, 244, 255, 0.45);
    border-radius: 50%;
}

.sch-select-option:hover,
.sch-select-option:focus-visible {
    color: var(--text-primary, #f8fafc);
    background: rgba(69, 244, 255, 0.08);
    outline: none;
    transform: translateX(2px);
}

.sch-select-option-selected {
    color: #071018;
    background: linear-gradient(135deg, var(--accent-secondary, #45f4ff), rgba(255, 255, 255, 0.92));
    font-weight: 850;
}

.sch-select-option-selected::before {
    border-color: #071018;
    border-top-color: transparent;
    border-left-color: transparent;
    border-radius: 0;
    transform: rotate(45deg) translate(-1px, -1px);
}

@media (max-width: 680px) {
    .sch-select-trigger {
        min-height: 38px;
        border-radius: 11px;
        font-size: 0.86rem;
    }

    .sch-select-menu {
        --sch-select-menu-max-height: 11.25rem;
    }

    .sch-select-option {
        min-height: 30px;
        font-size: 0.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sch-select-trigger,
    .sch-select-option,
    .sch-select-chevron {
        transition: none !important;
    }
}
