/* ============================================================
   HIGHWINNEW TOASTV3 DYNAMIC THEME NOTIFICATION SYSTEM
   ============================================================ */

.toast-panel {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    width: calc(100% - 48px);
    pointer-events: none;
}

.toast-item {
    pointer-events: all;
    animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastSlideIn {
    from { 
        opacity: 0; 
        transform: translateY(-12px) translateX(24px) scale(0.96); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) translateX(0) scale(1); 
    }
}

/* Base Toast (Default Light Theme) */
.toast {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    padding: 16px 20px 16px 22px;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Light Theme Variables */
:root,
[data-theme="light"] .toast {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.28);
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Dark Theme Variables */
[data-theme="dark"] .toast {
    background: rgba(11, 15, 25, 0.94);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.65), 0 0 25px rgba(99, 102, 241, 0.12);
}

/* Left Accent Indicator Bar */
.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4.5px;
    height: 100%;
    border-radius: 4px 0 0 4px;
}

.toast.success::before { background: linear-gradient(180deg, #10b981 0%, #059669 100%); }
.toast.error::before   { background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%); }
.toast.warning::before { background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%); }
.toast.help::before,
.toast.info::before    { background: linear-gradient(180deg, #6366f1 0%, #4f46e5 100%); }

/* Headings */
.toast h3 {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 4px 0;
    padding-right: 20px;
    letter-spacing: -0.2px;
}

:root .toast h3,
[data-theme="light"] .toast h3 {
    color: #0f172a;
}

[data-theme="dark"] .toast h3 {
    color: #f8fafc;
}

.toast.success h3 { color: #059669 !important; }
[data-theme="dark"] .toast.success h3 { color: #34d399 !important; }

.toast.error h3 { color: #dc2626 !important; }
[data-theme="dark"] .toast.error h3 { color: #f87171 !important; }

.toast.warning h3 { color: #d97706 !important; }
[data-theme="dark"] .toast.warning h3 { color: #fbbf24 !important; }

.toast.help h3,
.toast.info h3 { color: #4f46e5 !important; }
[data-theme="dark"] .toast.help h3,
[data-theme="dark"] .toast.info h3 { color: #818cf8 !important; }

/* Paragraph Body */
.toast p {
    font-size: 13px;
    margin: 0;
    line-height: 1.5;
    font-weight: 500;
}

:root .toast p,
[data-theme="light"] .toast p {
    color: #475569;
}

[data-theme="dark"] .toast p {
    color: #94a3b8;
}

/* Close Button */
.toast .close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.2s, transform 0.2s;
    user-select: none;
}

.toast .close::before {
    content: '✕';
    font-size: 12px;
    font-weight: 700;
    transition: color 0.2s;
}

:root .toast .close::before,
[data-theme="light"] .toast .close::before {
    color: #94a3b8;
}

[data-theme="dark"] .toast .close::before {
    color: #64748b;
}

:root .toast .close:hover,
[data-theme="light"] .toast .close:hover {
    background: rgba(15, 23, 42, 0.06);
}

:root .toast .close:hover::before,
[data-theme="light"] .toast .close:hover::before {
    color: #0f172a;
}

[data-theme="dark"] .toast .close:hover {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .toast .close:hover::before {
    color: #f8fafc;
}

@media (max-width: 480px) {
    .toast-panel {
        top: 12px;
        right: 12px;
        left: 12px;
        width: auto;
        max-width: none;
    }
}
