/**
 * Elegant Notification System Styles
 * Beautiful top-positioned notifications with glass-morphism effect
 * CSP-compliant without inline styles
 */

/* Azimut Brand Colors */
:root {
    --notification-dark-blue: #2C3E50;
    --notification-light-turquoise: #A6BCCE;
    --notification-dark-grey: #434548;
    --notification-light-grey: #F8F9FA;
    --notification-success: #10B981;
    --notification-error: #EF4444;
    --notification-warning: #F59E0B;
    --notification-info: #3B82F6;
}

/* Notification Container - Top positioned */
#notification-container,
.notification-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    pointer-events: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    gap: 10px;
}

/* Individual Notification */
.notification {
    pointer-events: auto;
    background: rgba(44, 62, 80, 0.95);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 
                0 2px 10px rgba(0, 0, 0, 0.2),
                0 0 0 1px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateY(-120px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    display: none;
}

/* Show state with beautiful entrance animation */
.notification.show {
    display: block !important;
    transform: translateY(0);
    opacity: 1;
}

/* Hide state for exit animation */
.notification.hide {
    transform: translateY(-120px);
    opacity: 0;
    transition: all 0.3s ease-in;
}

/* Notification Content Layout */
.notification-content {
    display: flex;
    align-items: flex-start;
    padding: 16px 20px;
    gap: 14px;
    position: relative;
}

/* Notification Icon */
.notification-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.notification-icon i {
    font-size: 20px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Notification Message */
.notification-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
    color: #ffffff;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.notification-message strong {
    font-weight: 600;
    color: #ffffff;
}

/* Close Button */
.notification-close {
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
    opacity: 0.7;
    margin-left: 8px;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.15);
    opacity: 1;
    transform: scale(1.1);
}

.notification-close i {
    font-size: 14px;
}

/* Success Notification Styling */
.notification-success,
.notification.notification-success {
    border-left: 4px solid var(--notification-success);
    background: rgba(44, 62, 80, 0.95);
}

.notification-success .notification-icon {
    color: var(--notification-success);
}

.notification-success::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        var(--notification-success) 0%, 
        rgba(16, 185, 129, 0.5) 50%,
        rgba(16, 185, 129, 0) 100%);
}

/* Error Notification Styling */
.notification-error,
.notification.notification-error {
    border-left: 4px solid var(--notification-error);
    background: rgba(44, 62, 80, 0.95);
}

.notification-error .notification-icon {
    color: var(--notification-error);
}

.notification-error::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        var(--notification-error) 0%, 
        rgba(239, 68, 68, 0.5) 50%,
        rgba(239, 68, 68, 0) 100%);
}

/* Warning Notification Styling */
.notification-warning,
.notification.notification-warning {
    border-left: 4px solid var(--notification-warning);
    background: rgba(44, 62, 80, 0.95);
}

.notification-warning .notification-icon {
    color: var(--notification-warning);
}

.notification-warning::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        var(--notification-warning) 0%, 
        rgba(245, 158, 11, 0.5) 50%,
        rgba(245, 158, 11, 0) 100%);
}

/* Info Notification Styling */
.notification-info,
.notification.notification-info {
    border-left: 4px solid var(--notification-info);
    background: rgba(44, 62, 80, 0.95);
}

.notification-info .notification-icon {
    color: var(--notification-info);
}

.notification-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        var(--notification-info) 0%, 
        rgba(59, 130, 246, 0.5) 50%,
        rgba(59, 130, 246, 0) 100%);
}

/* Hover Effects for Enhanced Interactivity */
.notification:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 50px rgba(37, 51, 86, 0.2),
                0 5px 15px rgba(37, 51, 86, 0.1);
}

.notification.show:hover {
    transform: translateY(-2px);
}

/* Duration classes for CSP compliance */
.notification.duration-short::after {
    animation-duration: 3s;
}

.notification.duration-medium::after {
    animation-duration: 5s;
}

.notification.duration-long::after {
    animation-duration: 8s;
}

.notification.duration-extra-long::after {
    animation-duration: 10s;
}

/* Progress Bar Animation for Auto-dismiss */
.notification::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: currentColor;
    opacity: 0.2;
    animation: progress-bar 5s linear forwards;
}

.notification-success.duration-medium::after {
    animation-duration: 5s;
}

.notification-error.duration-long::after {
    animation-duration: 8s;
}

.notification-warning.duration-long::after {
    animation-duration: 6s;
}

.notification-info.duration-medium::after {
    animation-duration: 5s;
}

@keyframes progress-bar {
    0% {
        width: 100%;
    }
    100% {
        width: 0%;
    }
}

/* Flash message container - hidden */
.flash-messages-hidden { 
    display: none !important; 
}

/* Notification alert styles for compatibility */
.notification-alert {
    border: none;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border-left: 4px solid;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.notification-alert.removing {
    display: none;
}

/* Alert compatibility classes */
.alert-success {
    background: linear-gradient(135deg, #f0fdf4 0%, rgba(16, 185, 129, 0.05) 100%);
    color: #166534;
    border-left-color: #10B981;
}

.alert-danger {
    background: linear-gradient(135deg, #fef2f2 0%, rgba(239, 68, 68, 0.05) 100%);
    color: #991b1b;
    border-left-color: #EF4444;
}

.alert-info {
    background: linear-gradient(135deg, #eff6ff 0%, rgba(59, 130, 246, 0.05) 100%);
    color: #1e40af;
    border-left-color: #3B82F6;
}

.alert-warning {
    background: linear-gradient(135deg, #fffbeb 0%, rgba(245, 158, 11, 0.05) 100%);
    color: #92400e;
    border-left-color: #F59E0B;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    #notification-container,
    .notification-container {
        padding: 10px;
    }

    .notification {
        max-width: calc(100% - 20px);
        border-radius: 10px;
    }

    .notification-content {
        padding: 14px 16px;
        gap: 12px;
    }

    .notification-message {
        font-size: 13px;
        line-height: 1.5;
    }

    .notification-icon i {
        font-size: 18px;
    }

    .notification-close i {
        font-size: 12px;
    }
}

/* Accessibility Improvements */
.notification:focus-within {
    outline: 2px solid var(--notification-light-turquoise);
    outline-offset: 2px;
}

.notification-close:focus {
    outline: 2px solid var(--notification-light-turquoise);
    outline-offset: 1px;
    border-radius: 4px;
}

/* Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    .notification {
        transition: opacity 0.3s ease;
        transform: none !important;
    }

    .notification.show {
        transform: none !important;
    }

    .notification.hide {
        transform: none !important;
    }

    .notification:hover {
        transform: none !important;
    }

    .notification::after {
        animation: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .notification {
        background: linear-gradient(135deg, #1F2937 0%, #111827 100%);
        border-color: rgba(166, 188, 206, 0.1);
        color: #F3F4F6;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 
                    0 2px 10px rgba(0, 0, 0, 0.3);
    }

    .notification-message {
        color: #D1D5DB;
    }

    .notification-message strong {
        color: #F3F4F6;
    }

    .notification-close {
        color: #9CA3AF;
    }

    .notification-close:hover {
        background: rgba(156, 163, 175, 0.2);
        color: #F3F4F6;
    }

    .notification-success {
        background: linear-gradient(135deg, #1F2937 0%, rgba(16, 185, 129, 0.1) 100%);
    }

    .notification-error {
        background: linear-gradient(135deg, #1F2937 0%, rgba(239, 68, 68, 0.1) 100%);
    }

    .notification-warning {
        background: linear-gradient(135deg, #1F2937 0%, rgba(245, 158, 11, 0.1) 100%);
    }

    .notification-info {
        background: linear-gradient(135deg, #1F2937 0%, rgba(59, 130, 246, 0.1) 100%);
    }
}