/* ============================================================
   CHERI SMS - Toast Notification Styles
   Created: February 19, 2026
   Only loads when UI_DesignTheme = "modern"
   ============================================================ */

/* Toast container - fixed position */
.toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: var(--z-toast, 600);
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    max-width: 400px;
}

/* Individual toast */
.toast-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: var(--radius-md, 10px);
    box-shadow: var(--shadow-lg);
    pointer-events: auto;
    transform: translateX(120%);
    opacity: 0;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 300px;
    max-width: 400px;
    position: relative;
    overflow: hidden;
}

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

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

/* Toast icon */
.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full, 9999px);
    font-size: 14px;
}

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

.toast-title {
    font-weight: var(--font-semibold, 600);
    font-size: var(--text-sm, 0.875rem);
    color: var(--text-primary, #1e293b);
    margin-bottom: 2px;
}

.toast-message {
    font-size: var(--text-sm, 0.875rem);
    color: var(--text-secondary, #64748b);
    line-height: 1.4;
}

/* Toast close button */
.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
    padding: 2px;
    font-size: 16px;
    line-height: 1;
    transition: color var(--transition-fast, 150ms);
}

.toast-close:hover {
    color: var(--text-primary, #1e293b);
}

/* Toast progress bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 var(--radius-md, 10px) var(--radius-md, 10px);
    transition: width linear;
}

/* Toast variants */
.toast-item.toast-success {
    border-left: 4px solid var(--success-color, #10b981);
}
.toast-item.toast-success .toast-icon {
    background: var(--success-light, #ecfdf5);
    color: var(--success-color, #10b981);
}
.toast-item.toast-success .toast-progress {
    background: var(--success-color, #10b981);
}

.toast-item.toast-error {
    border-left: 4px solid var(--danger-color, #ef4444);
}
.toast-item.toast-error .toast-icon {
    background: var(--danger-light, #fef2f2);
    color: var(--danger-color, #ef4444);
}
.toast-item.toast-error .toast-progress {
    background: var(--danger-color, #ef4444);
}

.toast-item.toast-warning {
    border-left: 4px solid var(--warning-color, #f59e0b);
}
.toast-item.toast-warning .toast-icon {
    background: var(--warning-light, #fffbeb);
    color: var(--warning-color, #f59e0b);
}
.toast-item.toast-warning .toast-progress {
    background: var(--warning-color, #f59e0b);
}

.toast-item.toast-info {
    border-left: 4px solid var(--info-color, #06b6d4);
}
.toast-item.toast-info .toast-icon {
    background: var(--info-light, #ecfeff);
    color: var(--info-color, #06b6d4);
}
.toast-item.toast-info .toast-progress {
    background: var(--info-color, #06b6d4);
}

/* Dark mode */
[data-theme="dark"] .toast-item {
    background: var(--bg-card, #1e293b);
    border-color: var(--border-color, #334155);
}

[data-theme="dark"] .toast-title {
    color: var(--text-primary, #f1f5f9);
}

[data-theme="dark"] .toast-message {
    color: var(--text-secondary, #cbd5e1);
}

[data-theme="dark"] .toast-close:hover {
    color: var(--text-primary, #f1f5f9);
}

/* Mobile responsive */
@media (max-width: 480px) {
    .toast-container {
        left: 8px;
        right: 8px;
        max-width: none;
    }

    .toast-item {
        min-width: auto;
    }
}
