/* Toast standalone — usado por templates públicos E admin
   Independe de admin_helpdesk.css / admin_extras.css */

.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
    max-width: 380px;
    width: calc(100vw - 48px);
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(248,250,252,0.92));
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(15,23,42,0.08);
    border-radius: 14px;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.85),
        0 1px 2px rgba(15,23,42,0.06),
        0 6px 14px rgba(15,23,42,0.08),
        0 20px 40px -12px rgba(15,23,42,0.22);
    padding: 12px 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    opacity: 0;
    transform: translateX(28px) scale(0.96);
    transition:
        opacity 0.28s cubic-bezier(0.4,0,0.2,1),
        transform 0.32s cubic-bezier(0.34, 1.32, 0.64, 1);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    font-size: 0.875rem;
    font-family: inherit;
}
.toast.show { opacity: 1 !important; transform: translateX(0) scale(1) !important; }
.toast.hide { opacity: 0 !important; transform: translateX(28px) scale(0.96) !important; }
.toast::before { display: none !important; }

.toast-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.05rem;
    background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
    color: #2563eb;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.85),
        inset 0 -1px 0 rgba(37,99,235,0.18),
        0 0 0 1px rgba(37,99,235,0.18),
        0 4px 10px rgba(37,99,235,0.18);
}
.toast.toast-info .toast-icon {
    background: linear-gradient(180deg, #e0f2fe, #bae6fd);
    color: #0ea5e9;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.85),
        inset 0 -1px 0 rgba(14,165,233,0.18),
        0 0 0 1px rgba(14,165,233,0.20),
        0 4px 10px rgba(14,165,233,0.20);
}
.toast.toast-success .toast-icon {
    background: linear-gradient(180deg, #d1fae5, #a7f3d0);
    color: #10b981;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.85),
        inset 0 -1px 0 rgba(4,120,87,0.18),
        0 0 0 1px rgba(16,185,129,0.20),
        0 4px 10px rgba(16,185,129,0.20);
}
.toast.toast-warning .toast-icon {
    background: linear-gradient(180deg, #fef3c7, #fde68a);
    color: #f59e0b;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.85),
        inset 0 -1px 0 rgba(146,64,14,0.18),
        0 0 0 1px rgba(245,158,11,0.22),
        0 4px 10px rgba(245,158,11,0.20);
}
.toast.toast-danger .toast-icon {
    background: linear-gradient(180deg, #fee2e2, #fecaca);
    color: #ef4444;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.85),
        inset 0 -1px 0 rgba(185,28,28,0.18),
        0 0 0 1px rgba(239,68,68,0.20),
        0 4px 10px rgba(239,68,68,0.20);
}

.toast-body { flex: 1; min-width: 0; padding-top: 1px; }
.toast-title {
    font-weight: 600;
    font-size: 0.92rem;
    color: #0f172a;
    letter-spacing: -0.012em;
    line-height: 1.25;
}
.toast-text {
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.4;
    word-wrap: break-word;
    margin-top: 3px;
}
.toast-close {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    opacity: 0.65;
    font-size: 1rem;
    align-self: flex-start;
    transition: opacity .18s, background .18s;
    padding: 0;
}
.toast-close:hover {
    opacity: 1;
    background: rgba(15,23,42,0.06);
    color: #0f172a;
}

[data-theme="dark"] .toast {
    background: linear-gradient(180deg, rgba(53,57,68,0.92), rgba(44,48,56,0.88));
    border-color: rgba(255,255,255,0.08);
}
[data-theme="dark"] .toast-title { color: #f1f5f9; }
[data-theme="dark"] .toast-text { color: #cbd5e1; }
[data-theme="dark"] .toast-close { color: #94a3b8; }
[data-theme="dark"] .toast-close:hover { background: rgba(255,255,255,0.1); color: #f1f5f9; }

/* Mobile */
@media (max-width: 768px) {
    .toast-container {
        top: auto;
        bottom: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
        width: auto;
    }
    .toast { font-size: 0.83rem; }
    .toast-icon { width: 32px; height: 32px; font-size: .92rem; }
}
