/* site.css — Componentes e utilitários complementares */

/* ── Toggle switch (Lembrar-me / Selecionar Todos) ────────── */

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 22px;
}

.slider::before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

input:checked + .slider {
    background-color: #004080;
}

input:checked + .slider::before {
    transform: translateX(18px);
}

/* ── Paginação ────────────────────────────────────────────── */

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pager-container {
    margin-top: auto;
    padding: 12px 0 4px;
}

/* ── Cards ────────────────────────────────────────────────── */

.card-header {
    text-transform: uppercase;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.05em;
    color: #64748b;
}

/* ── Botões de grid (ações em tabelas) ────────────────────── */

.btn-grid {
    padding: 3px 7px;
    font-size: 13px;
    line-height: 1.4;
}

/* ── Validação de formulários ─────────────────────────────── */

.input-validation-error {
    border: 1.5px solid #dc3545 !important;
    background-color: #fff5f5;
}

.input-validation-error:focus {
    outline: none;
    border-color: #b91c1c !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

.field-validation-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 3px;
    display: block;
}

/* ── Links desabilitados ──────────────────────────────────── */

a.disabled {
    pointer-events: none;
    opacity: 0.55;
    cursor: not-allowed;
}

/* ── Tabela responsiva — utilitário ───────────────────────── */

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 6px;
    border: 1px solid var(--color-border, #e2e8f0);
}

/* ── Iframe fullscreen ────────────────────────────────────── */

.iframe-container {
    width: 100%;
    height: calc(100vh - 140px);
    display: flex;
}

.iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ── Instrução de página ──────────────────────────────────── */

.page-instruction {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 0.75rem;
}

/* ── Responsividade mobile ────────────────────────────────── */

@media (max-width: 575.98px) {
    .btn {
        font-size: 13px;
    }

    .form-control,
    .form-select {
        font-size: 14px; /* evita zoom automático iOS */
    }
}
