/**
 * Professional Notification Styles
 * Beautiful, friendly error and success messages
 */

/* Notification Containers */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 420px;
    pointer-events: none;
}

.notification-container.success {
    top: auto;
    bottom: 20px;
}

/* Base Notification Styles */
.error-notification,
.success-notification,
.loading-notification {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 16px;
    min-width: 320px;
    max-width: 420px;
    pointer-events: auto;
    transform: translateX(450px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid #e74c3c;
}

.success-notification {
    border-left-color: #27ae60;
}

.loading-notification {
    border-left-color: #3498db;
}

.error-notification.critical {
    border-left-color: #c0392b;
    background: linear-gradient(135deg, #fff 0%, #ffe8e8 100%);
}

/* Show Animation */
.error-notification.show,
.success-notification.show,
.loading-notification.show {
    transform: translateX(0);
    opacity: 1;
}

/* Hide Animation */
.error-notification.slide-out,
.success-notification.slide-out,
.loading-notification.slide-out {
    transform: translateX(450px);
    opacity: 0;
}

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

/* Notification Icon */
.notification-icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 8px;
}

.success-notification .notification-icon {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
    font-weight: bold;
}

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

.error-notification.critical .notification-icon {
    background: rgba(192, 57, 43, 0.15);
    color: #c0392b;
}

/* Large Icon for Critical Errors */
.notification-icon-large {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-down-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px) rotate(-5deg); }
    75% { transform: translateX(5px) rotate(5deg); }
}

/* Notification Body */
.notification-body {
    flex: 1;
    min-width: 0;
}

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

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

/* Close Button */
.notification-close {
    position: absolute;
    top: -4px;
    right: -4px;
    background: transparent;
    border: none;
    color: #95a5a6;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #2c3e50;
}

.notification-close:active {
    transform: scale(0.95);
}

/* Action Button */
.notification-action {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.notification-action-btn {
    width: 100%;
    padding: 8px 16px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notification-action-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.notification-action-btn:active {
    transform: translateY(0);
}

.error-notification.critical .notification-action-btn {
    background: #e74c3c;
}

.error-notification.critical .notification-action-btn:hover {
    background: #c0392b;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* Loading Spinner */
.notification-spinner {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-circle {
    animation: spin 1s linear infinite;
    transform-origin: center;
    color: #3498db;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .notification-container.success {
        bottom: 10px;
    }
    
    .error-notification,
    .success-notification,
    .loading-notification {
        min-width: auto;
        max-width: none;
    }
    
    .notification-title {
        font-size: 14px;
    }
    
    .notification-message {
        font-size: 13px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .error-notification,
    .success-notification,
    .loading-notification {
        background: #2c3e50;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    .error-notification.critical {
        background: linear-gradient(135deg, #2c3e50 0%, #3d2626 100%);
    }
    
    .notification-title {
        color: #ecf0f1;
    }
    
    .notification-message {
        color: #bdc3c7;
    }
    
    .notification-close {
        color: #7f8c8d;
    }
    
    .notification-close:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #ecf0f1;
    }
    
    .notification-action {
        border-top-color: rgba(255, 255, 255, 0.1);
    }
}

/* Accessibility */
.notification-close:focus-visible {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.notification-action-btn:focus-visible {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Print - Hide notifications */
@media print {
    .notification-container {
        display: none !important;
    }
}
