/*
 * Overrides de UI registrados via FilamentAsset no AppServiceProvider.
 * Vale para os dois painéis (admin e app).
 *
 * IMPORTANTE: Não usar classes Tailwind arbitrárias em views Blade customizadas
 * — o build do Filament não as compila. Usar classes definidas aqui com seletores
 * .dark explícitos, que respondem ao toggle do Filament no <html>.
 */

/* ── Dashboard: título ───────────────────────────────────────────────────── */
.fi-db-title {
    color: #0f172a;
}
.dark .fi-db-title {
    color: #f9fafb;
}

/* ── Filter: botão trigger ───────────────────────────────────────────────── */
.fi-db-filter-trigger {
    background-color: #ffffff;
    border: 2px solid #e5e7eb;
}
.dark .fi-db-filter-trigger {
    background-color: rgb(var(--gray-900, 17 24 39));
    border-color: rgb(var(--gray-700, 55 65 81));
}

/* ── Filter: painel dropdown ─────────────────────────────────────────────── */
.fi-db-filter-dropdown {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 30px -5px rgba(0,0,0,0.12), 0 4px 10px -5px rgba(0,0,0,0.06);
}
.dark .fi-db-filter-dropdown {
    background-color: rgb(var(--gray-900, 17 24 39));
    border-color: rgb(var(--gray-700, 55 65 81));
}

/* ── Filter: texto principal e subtexto ──────────────────────────────────── */
.fi-db-filter-text {
    color: #111827;
}
.dark .fi-db-filter-text {
    color: #f9fafb;
}
.fi-db-filter-subtext {
    color: #6b7280;
}
.dark .fi-db-filter-subtext {
    color: #9ca3af;
}

/* ── Filter: separador ───────────────────────────────────────────────────── */
.fi-db-filter-divider {
    background-color: #f3f4f6;
}
.dark .fi-db-filter-divider {
    background-color: rgb(var(--gray-700, 55 65 81));
}

/* ── Filter: itens de preset (base e ativo) ──────────────────────────────── */
.fi-db-filter-item {
    color: #374151;
}
.dark .fi-db-filter-item {
    color: #e5e7eb;
}
.fi-db-filter-item.active {
    background-color: rgb(var(--primary-50, 239 246 255));
    color: rgb(var(--primary-700, 29 78 216));
    font-weight: 600;
}
.dark .fi-db-filter-item.active {
    background-color: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
}

/* ── Filter: botão "Personalizado" dashed ────────────────────────────────── */
.fi-db-filter-custom-btn {
    border: 1.5px dashed #d1d5db;
    color: #374151;
}
.dark .fi-db-filter-custom-btn {
    border-color: rgb(var(--gray-600, 75 85 99));
    color: #e5e7eb;
}
.fi-db-filter-custom-btn.active {
    border-color: rgb(var(--primary-400, 96 165 250));
    color: rgb(var(--primary-700, 29 78 216));
    font-weight: 600;
}
.dark .fi-db-filter-custom-btn.active {
    border-color: #93c5fd;
    color: #93c5fd;
}

/* ── Filter: inputs de data ──────────────────────────────────────────────── */
.fi-db-filter-date-input {
    background-color: #ffffff;
    border: 1.5px solid #d1d5db;
    color: #374151;
}
.dark .fi-db-filter-date-input {
    background-color: rgb(var(--gray-800, 31 41 55));
    border-color: rgb(var(--gray-600, 75 85 99));
    color: #f9fafb;
}

/* ── Mobile: largura total do filtro em telas pequenas ───────────────────── */
@media (max-width: 640px) {
    .fi-db-filter {
        width: 100%;
    }
}

/* ── Mobile UX: previne zoom automático em iOS/Android (inputs < 16px) ───── */
@media (max-width: 768px) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
    textarea,
    select,
    .fi-input,
    .fi-select-input,
    .fi-fo-text-input input,
    .fi-fo-textarea textarea,
    .fi-fo-select select,
    .fi-ta-search-field input,
    .choices__input {
        font-size: 16px !important;
    }
}
