.mau-native-select {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.mau-custom-select {
    position: relative;
    display: inline-block;
    min-width: 0;
    width: 100%;
    color: var(--text, #f5f7fb);
}

.mau-custom-select-button {
    width: 100%;
    min-height: 42px;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) 16px;
    align-items: center;
    gap: 9px;
    padding: 0 11px;
    border: 1px solid var(--line-strong, rgba(255, 255, 255, 0.18));
    border-radius: var(--radius, 12px);
    outline: 0;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
        rgba(255, 255, 255, 0.045);
    color: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.mau-custom-select-button:hover,
.mau-custom-select.open .mau-custom-select-button,
.mau-custom-select-button:focus-visible {
    border-color: color-mix(in srgb, var(--accent-2, #68b8ff) 72%, transparent);
    background:
        radial-gradient(circle at 16% 50%, color-mix(in srgb, var(--accent-2, #68b8ff) 18%, transparent), transparent 45%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035));
    box-shadow:
        0 0 0 3px color-mix(in srgb, var(--accent-2, #68b8ff) 16%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.mau-custom-select-button:active {
    transform: translateY(1px);
}

.mau-custom-select-leading,
.mau-custom-select-option-icon {
    width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    overflow: hidden;
    border-radius: 7px;
    background: color-mix(in srgb, var(--accent-2, #68b8ff) 15%, transparent);
    color: var(--accent-2, #68b8ff);
    flex: 0 0 24px;
}

.mau-custom-select-leading img,
.mau-custom-select-option-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mau-custom-select-leading i,
.mau-custom-select-option-icon i {
    font-size: 12px;
}

.mau-custom-select-label,
.mau-custom-select-option-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mau-custom-select-label {
    font-size: 13px;
    font-weight: 850;
}

.mau-custom-select-chevron {
    color: var(--muted, #8994a2);
    font-size: 11px;
    transition: transform 160ms ease, color 160ms ease;
}

.mau-custom-select.open .mau-custom-select-chevron {
    color: var(--accent, #5ee0a4);
    transform: rotate(180deg);
}

.mau-custom-select-menu {
    position: fixed;
    z-index: 9999;
    display: none;
    min-width: 150px;
    max-height: min(320px, calc(100vh - 22px));
    overflow: auto;
    padding: 6px;
    border: 1px solid color-mix(in srgb, var(--accent-2, #68b8ff) 28%, var(--line-strong, rgba(255, 255, 255, 0.18)));
    border-radius: 12px;
    background:
        radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--accent-2, #68b8ff) 16%, transparent), transparent 42%),
        linear-gradient(145deg, rgba(22, 26, 34, 0.98), rgba(10, 12, 17, 0.98));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(16px);
}

.mau-custom-select-menu.open {
    display: grid;
    gap: 4px;
    animation: mauSelectIn 120ms ease-out;
}

.mau-custom-select-option {
    width: 100%;
    min-height: 38px;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    padding: 7px 9px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: var(--soft, var(--text, #f5f7fb));
    text-align: left;
    cursor: pointer;
}

.mau-custom-select-option:hover,
.mau-custom-select-option.focused {
    border-color: color-mix(in srgb, var(--accent-2, #68b8ff) 24%, transparent);
    background: color-mix(in srgb, var(--accent-2, #68b8ff) 13%, transparent);
    color: var(--text, #f5f7fb);
}

.mau-custom-select-option.selected {
    border-color: color-mix(in srgb, var(--accent, #5ee0a4) 42%, transparent);
    background: color-mix(in srgb, var(--accent, #5ee0a4) 15%, transparent);
    color: var(--text, #f5f7fb);
}

.mau-custom-select-option.selected .mau-custom-select-option-icon {
    background: color-mix(in srgb, var(--accent, #5ee0a4) 19%, transparent);
    color: var(--accent, #5ee0a4);
}

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

@supports not (color: color-mix(in srgb, white, black)) {
    .mau-custom-select-button:hover,
    .mau-custom-select.open .mau-custom-select-button,
    .mau-custom-select-button:focus-visible {
        border-color: rgba(104, 184, 255, 0.72);
        box-shadow: 0 0 0 3px rgba(104, 184, 255, 0.16);
    }

    .mau-custom-select-leading,
    .mau-custom-select-option-icon {
        background: rgba(104, 184, 255, 0.15);
    }

    .mau-custom-select-menu {
        border-color: rgba(104, 184, 255, 0.28);
    }

    .mau-custom-select-option:hover,
    .mau-custom-select-option.focused {
        border-color: rgba(104, 184, 255, 0.24);
        background: rgba(104, 184, 255, 0.13);
    }

    .mau-custom-select-option.selected {
        border-color: rgba(94, 224, 164, 0.42);
        background: rgba(94, 224, 164, 0.15);
    }
}
