/* ==============================================================
   SUCALI LAB - PREMIUM NEUMORPHIC TOAST NOTIFICATIONS
   High-Contrast & Beautifully Adaptive for Light & Dark Modes
   ============================================================== */

#sucali-toast-container {
    position: fixed;
    top: 28px;
    right: 28px;
    z-index: 9999999;
    display: flex;
    flex-direction: column;
    gap: 14px;
    pointer-events: none;
    max-width: 440px;
    width: calc(100% - 40px);
}

.sucali-toast {
    position: relative;
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    padding: 16px 20px;
    border-radius: 16px;
    background: var(--theme-surface, #151f32);
    box-shadow: 8px 8px 24px var(--theme-shadow-dark, rgba(0, 0, 0, 0.4)),
                -6px -6px 20px var(--theme-shadow-light, rgba(255, 255, 255, 0.05)),
                0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--theme-border, rgba(255, 255, 255, 0.1));
    color: var(--theme-text, #f1f5f9);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow: hidden;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.sucali-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.sucali-toast.hide {
    transform: translateX(120%);
    opacity: 0;
}

.toast-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 14px;
    border: 1px solid transparent;
}

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

.toast-title {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.2px;
    margin-bottom: 4px;
    color: var(--theme-text, #ffffff);
    line-height: 1.3;
}

.toast-message {
    font-size: 0.86rem;
    line-height: 1.5;
    color: var(--theme-text-muted, #94a3b8);
    word-break: break-word;
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--theme-text-muted, rgba(241, 245, 249, 0.5));
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    margin-left: 10px;
    line-height: 1;
    transition: color 0.2s ease, transform 0.2s ease;
    opacity: 0.7;
}

.toast-close:hover {
    color: var(--theme-text, #ffffff);
    opacity: 1;
    transform: scale(1.15);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: rgba(0, 0, 0, 0.08);
}

.toast-progress-bar {
    height: 100%;
    width: 100%;
    transform-origin: left;
}

/* ==============================================================
   DARK THEME PALETTE
   ============================================================== */
.toast-success {
    border-color: rgba(16, 185, 129, 0.35);
}
.toast-success .toast-icon {
    color: #10b981;
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
}
.toast-success .toast-progress-bar {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.toast-error {
    border-color: rgba(239, 68, 68, 0.35);
}
.toast-error .toast-icon {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
}
.toast-error .toast-progress-bar {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.toast-warning {
    border-color: rgba(245, 158, 11, 0.35);
}
.toast-warning .toast-icon {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
}
.toast-warning .toast-progress-bar {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.toast-info {
    border-color: rgba(0, 180, 216, 0.35);
}
.toast-info .toast-icon {
    color: var(--theme-primary, #00b4d8);
    background: rgba(0, 180, 216, 0.15);
    border-color: rgba(0, 180, 216, 0.3);
}
.toast-info .toast-progress-bar {
    background: linear-gradient(90deg, var(--theme-primary, #00b4d8), var(--theme-secondary, #0077b6));
}

/* ==============================================================
   LIGHT MODE HIGH-CONTRAST OVERRIDES
   Ensures 100% legibility on light, white, and pearl backgrounds
   ============================================================== */
[data-color-mode="light"] .sucali-toast,
[data-theme*="light"] .sucali-toast,
body.light-mode .sucali-toast {
    background: #ffffff !important;
    color: #1e293b !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 
                0 8px 10px -6px rgba(0, 0, 0, 0.05),
                0 0 0 1px rgba(0, 0, 0, 0.06) !important;
}

[data-color-mode="light"] .toast-title,
[data-theme*="light"] .toast-title,
body.light-mode .toast-title {
    color: #0f172a !important;
    font-weight: 800 !important;
}

[data-color-mode="light"] .toast-message,
[data-theme*="light"] .toast-message,
body.light-mode .toast-message {
    color: #475569 !important;
    font-weight: 500 !important;
}

[data-color-mode="light"] .toast-close,
[data-theme*="light"] .toast-close,
body.light-mode .toast-close {
    color: #64748b !important;
}
[data-color-mode="light"] .toast-close:hover,
[data-theme*="light"] .toast-close:hover,
body.light-mode .toast-close:hover {
    color: #0f172a !important;
}

/* Light Mode Status Variations */
[data-color-mode="light"] .toast-success,
[data-theme*="light"] .toast-success,
body.light-mode .toast-success {
    border-left: 5px solid #059669 !important;
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%) !important;
}
[data-color-mode="light"] .toast-success .toast-title,
[data-theme*="light"] .toast-success .toast-title,
body.light-mode .toast-success .toast-title {
    color: #065f46 !important;
}
[data-color-mode="light"] .toast-success .toast-icon,
[data-theme*="light"] .toast-success .toast-icon,
body.light-mode .toast-success .toast-icon {
    color: #059669 !important;
    background: #dcfce7 !important;
    border-color: #bbf7d0 !important;
}

[data-color-mode="light"] .toast-error,
[data-theme*="light"] .toast-error,
body.light-mode .toast-error {
    border-left: 5px solid #dc2626 !important;
    background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%) !important;
}
[data-color-mode="light"] .toast-error .toast-title,
[data-theme*="light"] .toast-error .toast-title,
body.light-mode .toast-error .toast-title {
    color: #991b1b !important;
}
[data-color-mode="light"] .toast-error .toast-icon,
[data-theme*="light"] .toast-error .toast-icon,
body.light-mode .toast-error .toast-icon {
    color: #dc2626 !important;
    background: #fee2e2 !important;
    border-color: #fecaca !important;
}

[data-color-mode="light"] .toast-warning,
[data-theme*="light"] .toast-warning,
body.light-mode .toast-warning {
    border-left: 5px solid #d97706 !important;
    background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%) !important;
}
[data-color-mode="light"] .toast-warning .toast-title,
[data-theme*="light"] .toast-warning .toast-title,
body.light-mode .toast-warning .toast-title {
    color: #92400e !important;
}
[data-color-mode="light"] .toast-warning .toast-icon,
[data-theme*="light"] .toast-warning .toast-icon,
body.light-mode .toast-warning .toast-icon {
    color: #d97706 !important;
    background: #fef3c7 !important;
    border-color: #fde68a !important;
}

[data-color-mode="light"] .toast-info,
[data-theme*="light"] .toast-info,
body.light-mode .toast-info {
    border-left: 5px solid #0284c7 !important;
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%) !important;
}
[data-color-mode="light"] .toast-info .toast-title,
[data-theme*="light"] .toast-info .toast-title,
body.light-mode .toast-info .toast-title {
    color: #075985 !important;
}
[data-color-mode="light"] .toast-info .toast-icon,
[data-theme*="light"] .toast-info .toast-icon,
body.light-mode .toast-info .toast-icon {
    color: #0284c7 !important;
    background: #e0f2fe !important;
    border-color: #bae6fd !important;
}

@media (max-width: 576px) {
    #sucali-toast-container {
        top: 16px;
        right: 16px;
        left: 16px;
        width: auto;
    }
}
