/**
 * Error Notifications Styles
 * Beautiful toast notifications for errors, warnings, info, and success messages
 */

/* Container */
.error-notifications-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 420px;
}

/* Notification */
.error-notification {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    pointer-events: auto;
    transform: translateX(calc(100% + 40px));
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 320px;
    max-width: 420px;
}

.error-notification.show {
    transform: translateX(0);
    opacity: 1;
}

/* Content */
.error-notification-content {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    gap: 12px;
    position: relative;
}

/* Icon */
.error-notification-icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
}

/* Text */
.error-notification-text {
    flex: 1;
    min-width: 0;
}

.error-notification-title {
    font-weight: 600;
    font-size: 15px;
    line-height: 1.4;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.error-notification-message {
    font-size: 14px;
    line-height: 1.5;
    color: #6b7280;
    word-wrap: break-word;
}

/* Close button */
.error-notification-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.error-notification-close:hover {
    background: #f3f4f6;
    color: #4b5563;
}

/* Progress bar */
.error-notification-progress {
    height: 3px;
    background: linear-gradient(90deg, transparent, currentColor);
    animation: progress-shrink 5s linear forwards;
    transform-origin: left;
}

@keyframes progress-shrink {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* Type: Error */
.error-notification-error {
    border-left: 4px solid #ef4444;
}

.error-notification-error .error-notification-progress {
    color: #ef4444;
}

.error-notification-error .error-notification-icon {
    color: #ef4444;
}

/* Type: Warning */
.error-notification-warning {
    border-left: 4px solid #f59e0b;
}

.error-notification-warning .error-notification-progress {
    color: #f59e0b;
}

.error-notification-warning .error-notification-icon {
    color: #f59e0b;
}

/* Type: Info */
.error-notification-info {
    border-left: 4px solid #3b82f6;
}

.error-notification-info .error-notification-progress {
    color: #3b82f6;
}

.error-notification-info .error-notification-icon {
    color: #3b82f6;
}

/* Type: Success */
.error-notification-success {
    border-left: 4px solid #10b981;
}

.error-notification-success .error-notification-progress {
    color: #10b981;
}

.error-notification-success .error-notification-icon {
    color: #10b981;
}

/* Mobile responsive */
@media (max-width: 640px) {
    .error-notifications-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .error-notification {
        min-width: auto;
        max-width: none;
    }

    .error-notification-content {
        padding: 14px;
    }

    .error-notification-title {
        font-size: 14px;
    }

    .error-notification-message {
        font-size: 13px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .error-notification {
        background: #1f2937;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    }

    .error-notification-title {
        color: #f9fafb;
    }

    .error-notification-message {
        color: #9ca3af;
    }

    .error-notification-close {
        color: #6b7280;
    }

    .error-notification-close:hover {
        background: #374151;
        color: #9ca3af;
    }
}

/* Animation variants */
.error-notification-slide-up {
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Stacking effect for multiple notifications */
.error-notification:nth-child(2) {
    transform: scale(0.98) translateY(-4px);
}

.error-notification:nth-child(3) {
    transform: scale(0.96) translateY(-8px);
}

.error-notification.show:nth-child(2),
.error-notification.show:nth-child(3) {
    transform: translateX(0);
}
