/* ==============================================================================
   PREMIUM TOAST & DIALOG SYSTEM — ETI ANÍSIO TEIXEIRA
   Design System: Glassmorphism, Micro-borders, Glows & Fluid Animations
   ============================================================================== */

/* Container de Toasts */
#toast-container {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
    max-width: 420px;
    width: calc(100vw - 2.5rem);
}

@media (max-width: 640px) {
    #toast-container {
        top: 0.75rem;
        right: 0.75rem;
        left: 0.75rem;
        width: auto;
        max-width: none;
    }
}

/* Toast Card Individual */
.premium-toast {
    position: relative;
    pointer-events: auto;
    background: rgba(15, 23, 42, 0.94);
    color: #f8fafc;
    border-radius: 14px;
    padding: 1rem 1.15rem 1.15rem 1.15rem;
    box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    overflow: hidden;
    cursor: default;
    transform: translateY(0);
    opacity: 1;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    animation: toastSlideIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.premium-toast.toast-hiding {
    opacity: 0;
    transform: translateX(100px) scale(0.92);
    margin-top: -3.5rem;
    pointer-events: none;
}

@media (max-width: 640px) {
    .premium-toast.toast-hiding {
        transform: translateY(-40px) scale(0.92);
    }
}

/* Tipos de Toasts com Acentos Visuais */
.premium-toast.toast-success {
    border-left: 4px solid #10b981;
    box-shadow: 0 12px 32px -4px rgba(16, 185, 129, 0.2), 0 4px 12px rgba(0, 0, 0, 0.2);
}
.premium-toast.toast-success .toast-icon-wrap {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
}

.premium-toast.toast-error {
    border-left: 4px solid #f43f5e;
    box-shadow: 0 12px 32px -4px rgba(244, 63, 94, 0.22), 0 4px 12px rgba(0, 0, 0, 0.2);
}
.premium-toast.toast-error .toast-icon-wrap {
    background: rgba(244, 63, 94, 0.18);
    color: #fb7185;
}

.premium-toast.toast-warning {
    border-left: 4px solid #f59e0b;
    box-shadow: 0 12px 32px -4px rgba(245, 158, 11, 0.2), 0 4px 12px rgba(0, 0, 0, 0.2);
}
.premium-toast.toast-warning .toast-icon-wrap {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
}

.premium-toast.toast-info {
    border-left: 4px solid #0ea5e9;
    box-shadow: 0 12px 32px -4px rgba(14, 165, 233, 0.2), 0 4px 12px rgba(0, 0, 0, 0.2);
}
.premium-toast.toast-info .toast-icon-wrap {
    background: rgba(14, 165, 233, 0.18);
    color: #38bdf8;
}

/* Ícone do Toast */
.toast-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.15rem;
}

.toast-body {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
    margin-bottom: 0.2rem;
    letter-spacing: -0.01em;
}

.toast-message {
    font-size: 0.82rem;
    color: #cbd5e1;
    line-height: 1.4;
    word-break: break-word;
}

/* Botão Fechar */
.toast-close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.15rem 0.35rem;
    border-radius: 6px;
    transition: all 0.15s ease;
    margin-top: -0.25rem;
    margin-right: -0.25rem;
}

.toast-close-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

/* Barra de Progresso do Toast */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(255,255,255,0.4), rgba(255,255,255,0.8));
    width: 100%;
    transform-origin: left;
    animation: toastProgress linear forwards;
}

.toast-success .toast-progress { background: #34d399; }
.toast-error .toast-progress { background: #fb7185; }
.toast-warning .toast-progress { background: #fbbf24; }
.toast-info .toast-progress { background: #38bdf8; }

@keyframes toastSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-16px) scale(0.96);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastProgress {
    0% {
        transform: scaleX(1);
    }
    100% {
        transform: scaleX(0);
    }
}

/* ==============================================================================
   MODAL DE CONFIRMAÇÃO PREMIUM (SUBSTITUTO ELEGANTE DE CONFIRM)
   ============================================================================== */
.confirm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    z-index: 100000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.confirm-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.confirm-modal-card {
    background: #ffffff;
    border-radius: 20px;
    max-width: 440px;
    width: 100%;
    padding: 1.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.8);
    transform: scale(0.94) translateY(10px);
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
}

.confirm-modal-overlay.active .confirm-modal-card {
    transform: scale(1) translateY(0);
}

.confirm-modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin: 0 auto 1.15rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.confirm-modal-icon.icon-warning {
    background: #fef3c7;
    color: #d97706;
}

.confirm-modal-icon.icon-danger {
    background: #fee2e2;
    color: #ef4444;
}

.confirm-modal-icon.icon-question {
    background: #e0f2fe;
    color: #0284c7;
}

.confirm-modal-title {
    font-size: 1.22rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.confirm-modal-text {
    font-size: 0.92rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    white-space: pre-line;
}

.confirm-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.confirm-modal-btn {
    flex: 1;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.18s ease;
}

.confirm-btn-cancel {
    background: #f1f5f9;
    color: #475569;
    border: 1.5px solid #cbd5e1;
}

.confirm-btn-cancel:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.confirm-btn-confirm {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.confirm-btn-confirm:hover {
    background: #1d4ed8;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
}

.confirm-btn-danger {
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.confirm-btn-danger:hover {
    background: #dc2626;
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.4);
}
