/* ============================================================================
 * notificacoes.css — Estilos do módulo centralizado de notificações
 * ============================================================================
 * Tipos: Toast, Confirm, Alert, Inline
 * Design: brand GERIR (#2d4d36), cards arredondados, sombras suaves
 * ========================================================================== */

/* ══════════════════════════════════════════════════════════════════════════
   CONTAINER DE TOASTS — canto superior direito
   ══════════════════════════════════════════════════════════════════════════ */
#notif-toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
    width: calc(100% - 32px);
    pointer-events: none;
}

@media (max-width: 640px) {
    #notif-toast-container {
        top: 12px;
        right: 12px;
        left: 12px;
        max-width: none;
        width: auto;
    }
}

/* ══════════════════════════════════════════════════════════════════════════
   TOAST INDIVIDUAL
   ══════════════════════════════════════════════════════════════════════════ */
.notif-toast {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #64748b;
    border-radius: 16px;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.15), 0 4px 12px -4px rgba(0, 0, 0, 0.08);
    pointer-events: auto;
    opacity: 0;
    transform: translateX(120%);
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    font-family: 'Inter', sans-serif;
}

.notif-toast.notif-show {
    opacity: 1;
    transform: translateX(0);
}

.notif-toast.notif-hide {
    opacity: 0;
    transform: translateX(120%);
}

/* Ícone */
.notif-toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
    font-size: 22px;
}

.notif-toast-icon .material-symbols-outlined {
    font-size: 22px;
    font-variation-settings: 'FILL' 1, 'wght' 500;
}

/* Conteúdo */
.notif-toast-body {
    flex: 1;
    min-width: 0;
    padding-top: 2px;
}

.notif-toast-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 3px 0;
    line-height: 1.3;
}

.notif-toast-message {
    font-size: 13px;
    color: #475569;
    line-height: 1.4;
    margin: 0;
    word-wrap: break-word;
}

/* Botão fechar */
.notif-toast-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
    padding: 0;
}

.notif-toast-close:hover {
    background: #f1f5f9;
    color: #475569;
}

.notif-toast-close .material-symbols-outlined {
    font-size: 18px;
}

/* Progress bar (auto-dismiss) */
.notif-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.4;
    transition: width linear;
    border-radius: 0 0 0 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   VARIAÇÕES POR TIPO
   ══════════════════════════════════════════════════════════════════════════ */
.notif-toast.notif-success { border-left-color: #16a34a; }
.notif-toast.notif-success .notif-toast-icon { background: #dcfce7; color: #16a34a; }
.notif-toast.notif-success .notif-toast-progress { color: #16a34a; }

.notif-toast.notif-error { border-left-color: #dc2626; }
.notif-toast.notif-error .notif-toast-icon { background: #fee2e2; color: #dc2626; }
.notif-toast.notif-error .notif-toast-progress { color: #dc2626; }

.notif-toast.notif-warning { border-left-color: #d97706; }
.notif-toast.notif-warning .notif-toast-icon { background: #fef3c7; color: #d97706; }
.notif-toast.notif-warning .notif-toast-progress { color: #d97706; }

.notif-toast.notif-info { border-left-color: #2563eb; }
.notif-toast.notif-info .notif-toast-icon { background: #dbeafe; color: #2563eb; }
.notif-toast.notif-info .notif-toast-progress { color: #2563eb; }

/* ══════════════════════════════════════════════════════════════════════════
   MODAL (Confirm / Alert)
   ══════════════════════════════════════════════════════════════════════════ */
#notif-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.25s ease;
    font-family: 'Inter', sans-serif;
}

#notif-modal-overlay.notif-show {
    opacity: 1;
}

.notif-modal {
    background: #ffffff;
    border-radius: 24px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 60px -15px rgba(0, 0, 0, 0.3);
    transform: scale(0.92) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

#notif-modal-overlay.notif-show .notif-modal {
    transform: scale(1) translateY(0);
}

.notif-modal-header {
    padding: 24px 24px 16px 24px;
    text-align: center;
}

.notif-modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin-bottom: 16px;
}

.notif-modal-icon .material-symbols-outlined {
    font-size: 34px;
    font-variation-settings: 'FILL' 1, 'wght' 500;
}

.notif-modal-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.notif-modal-message {
    font-size: 14px;
    color: #475569;
    line-height: 1.55;
    margin: 0;
    padding: 0 8px;
    word-wrap: break-word;
}

.notif-modal-footer {
    display: flex;
    gap: 10px;
    padding: 20px 24px 24px 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.notif-modal-footer button {
    flex: 1;
    min-width: 120px;
    padding: 12px 20px;
    border-radius: 14px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
    outline: none;
}

.notif-modal-footer button:active {
    transform: scale(0.97);
}

.notif-btn-cancel {
    background: #f1f5f9;
    color: #475569;
}

.notif-btn-cancel:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.notif-btn-ok {
    background: #2d4d36;
    color: #ffffff;
    box-shadow: 0 4px 12px -2px rgba(45, 77, 54, 0.35);
}

.notif-btn-ok:hover {
    background: #243e2b;
}

/* Variações de cor do botão OK */
.notif-btn-ok.notif-ok-danger {
    background: #dc2626;
    box-shadow: 0 4px 12px -2px rgba(220, 38, 38, 0.35);
}
.notif-btn-ok.notif-ok-danger:hover {
    background: #b91c1c;
}

.notif-btn-ok.notif-ok-warning {
    background: #d97706;
    box-shadow: 0 4px 12px -2px rgba(217, 119, 6, 0.35);
}
.notif-btn-ok.notif-ok-warning:hover {
    background: #b45309;
}

/* Variações do ícone do modal */
.notif-modal-icon.notif-icon-success { background: #dcfce7; color: #16a34a; }
.notif-modal-icon.notif-icon-error   { background: #fee2e2; color: #dc2626; }
.notif-modal-icon.notif-icon-warning { background: #fef3c7; color: #d97706; }
.notif-modal-icon.notif-icon-info    { background: #dbeafe; color: #2563eb; }
.notif-modal-icon.notif-icon-confirm { background: #f2f6f3; color: #2d4d36; }
.notif-modal-icon.notif-icon-danger  { background: #fee2e2; color: #dc2626; }

/* ══════════════════════════════════════════════════════════════════════════
   INLINE (erro em campo)
   ══════════════════════════════════════════════════════════════════════════ */
.notif-inline-erro {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #dc2626;
    margin-top: 6px;
    padding-left: 4px;
    animation: notifInlineIn 0.25s ease;
}

@keyframes notifInlineIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.notif-inline-input-erro {
    border-color: #dc2626 !important;
    background: #fef2f2 !important;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1) !important;
}

/* ══════════════════════════════════════════════════════════════════════════
   UTILITÁRIOS
   ══════════════════════════════════════════════════════════════════════════ */
.notif-hidden {
    display: none !important;
}

/* ══════════════════════════════════════════════════════════════════════════
   DARK MODE (opcional)
   ══════════════════════════════════════════════════════════════════════════ */
@media (prefers-color-scheme: dark) {
    /* Descomentar se o sistema tiver dark mode */
    /*
    .notif-toast { background: #1e293b; border-color: #334155; }
    .notif-toast-title { color: #f1f5f9; }
    .notif-toast-message { color: #cbd5e1; }
    .notif-modal { background: #1e293b; }
    .notif-modal-title { color: #f1f5f9; }
    .notif-modal-message { color: #cbd5e1; }
    */
}