/* Carregado pelos layouts sem depender de uma nova publicação do build. */
/*
|--------------------------------------------------------------------------
| Selects do sistema
|--------------------------------------------------------------------------
| Preserva o <select> real (formulários Blade, React e Alpine). O picker
| personalizável só é ativado em navegadores compatíveis no desktop; os
| demais e dispositivos de toque usam o menu nativo com o mesmo campo
| fechado. Listas múltiplas mantêm sua interação nativa.
*/
:root {
    --gti-select-bg: #f8fafc;
    --gti-select-text: #1b2648;
    --gti-select-border: #cbd5e1;
    --gti-select-menu: #ffffff;
    --gti-select-hover: #f0f6f6;
    --gti-select-selected: #e8f7f4;
    --gti-select-accent: #078b80;
    --gti-select-ring: rgba(88, 196, 187, .24);
    --gti-select-muted: #64748b;
}

.dark {
    --gti-select-bg: #202d48;
    --gti-select-text: #f8fafc;
    --gti-select-border: #354564;
    --gti-select-menu: #17213f;
    --gti-select-hover: #263b4c;
    --gti-select-selected: #174346;
    --gti-select-accent: #58c4bb;
    --gti-select-ring: rgba(88, 196, 187, .27);
    --gti-select-muted: #a8b3c7;
}

select:not(.sem-seta) {
    border-color: var(--gti-select-border);
    border-radius: .875rem;
    background-color: var(--gti-select-bg);
    color: var(--gti-select-text);
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

select:not(.sem-seta):hover:not(:disabled) {
    border-color: var(--gti-select-accent);
}

select:not(.sem-seta):focus-visible {
    border-color: var(--gti-select-accent);
    box-shadow: 0 0 0 3px var(--gti-select-ring);
}

html.dark #mainContent select:not(.sem-seta) {
    border-color: var(--gti-select-border) !important;
    background-color: var(--gti-select-bg) !important;
    color: var(--gti-select-text) !important;
}

html.dark #mainContent select:not(.sem-seta):hover:not(:disabled),
html.dark #mainContent select:not(.sem-seta):focus-visible {
    border-color: var(--gti-select-accent) !important;
}

select:not(.sem-seta):disabled {
    cursor: not-allowed;
    opacity: .6;
}

@supports (appearance: base-select) {
  @media (hover: hover) and (pointer: fine) {
    select:not([multiple]):not([size]):not(.sem-seta),
    select:not([multiple]):not([size]):not(.sem-seta)::picker(select) {
        appearance: base-select;
    }

    select:not([multiple]):not([size]):not(.sem-seta) {
        background-image: none;
    }

    select:not([multiple]):not([size]):not(.sem-seta):open {
        border-color: var(--gti-select-accent);
        box-shadow: 0 0 0 3px var(--gti-select-ring);
    }

    html.dark #mainContent select:not([multiple]):not([size]):not(.sem-seta):open {
        border-color: var(--gti-select-accent) !important;
    }

    select:not([multiple]):not([size]):not(.sem-seta)::picker-icon {
        color: var(--gti-select-muted);
        transition: transform .15s ease;
    }

    select:not([multiple]):not([size]):not(.sem-seta):open::picker-icon {
        transform: rotate(180deg);
    }

    select:not([multiple]):not([size]):not(.sem-seta):open::picker(select) {
        box-sizing: border-box;
        min-inline-size: anchor-size(width);
        max-inline-size: min(90vw, 36rem);
        max-block-size: min(22rem, 60vh);
        margin-block-start: .375rem;
        padding: .375rem;
        overflow-y: auto;
        overscroll-behavior: contain;
        border: 1px solid var(--gti-select-border);
        border-radius: 1rem;
        background: var(--gti-select-menu);
        color: var(--gti-select-text);
        box-shadow: 0 16px 34px rgba(11, 16, 36, .18);
    }

    select:not([multiple]):not([size]):not(.sem-seta) option {
        display: flex;
        align-items: center;
        gap: .625rem;
        min-block-size: 2.625rem;
        padding: .625rem .75rem;
        border-radius: .625rem;
        background: var(--gti-select-menu);
        color: var(--gti-select-text);
        white-space: normal;
    }

    select:not([multiple]):not([size]):not(.sem-seta) option[hidden] {
        display: none;
    }

    select:not([multiple]):not([size]):not(.sem-seta) option::before {
        content: "";
        flex: none;
        inline-size: .5rem;
        block-size: .5rem;
        border-radius: 50%;
        background: var(--gti-select-muted);
    }

    select:not([multiple]):not([size]):not(.sem-seta) option:checked::before {
        background: var(--gti-select-accent);
    }

    select:not([multiple]):not([size]):not(.sem-seta) option:hover,
    select:not([multiple]):not([size]):not(.sem-seta) option:focus-visible {
        background: var(--gti-select-hover);
    }

    select:not([multiple]):not([size]):not(.sem-seta) option:checked,
    select:not([multiple]):not([size]):not(.sem-seta) option:checked:hover {
        background: var(--gti-select-selected);
        color: var(--gti-select-accent);
    }

    select:not([multiple]):not([size]):not(.sem-seta) option::checkmark {
        order: 2;
        margin-inline-start: auto;
        color: var(--gti-select-accent);
    }

    select:not([multiple]):not([size]):not(.sem-seta) option:disabled {
        opacity: .55;
    }

    html.dark #mainContent select:not([multiple]):not([size]):not(.sem-seta) option {
        background: var(--gti-select-menu);
        color: var(--gti-select-text);
    }

    html.dark #mainContent select:not([multiple]):not([size]):not(.sem-seta) option:hover,
    html.dark #mainContent select:not([multiple]):not([size]):not(.sem-seta) option:focus-visible {
        background: var(--gti-select-hover);
    }

    html.dark #mainContent select:not([multiple]):not([size]):not(.sem-seta) option:checked {
        background: var(--gti-select-selected);
        color: var(--gti-select-accent);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
    select:not(.sem-seta),
    select:not(.sem-seta)::picker-icon {
        transition: none;
    }
}

