/**
 * Unified Notification System Styles
 *
 * Popup notification modals with backdrop overlay.
 * Supports success, error, warning, and info types.
 */

/* Overlay backdrop */
.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.notification-overlay.active {
    display: flex;
}

/* Notification box */
.notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    padding: 20px 24px;
    min-width: 400px;
    max-width: 600px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: auto;
}

/* Notification states */
.notification.show {
    opacity: 1;
}

.notification.hide {
    opacity: 0;
    transform: translateX(-50%) translateY(-60%);
}

/* Icon */
.notification-icon {
    font-size: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Message */
.notification-message {
    flex: 1;
    font-size: 15px;
    line-height: 1.5;
    color: #212529;
    word-wrap: break-word;
}

/* Close button */
.notification-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    margin-left: 8px;
}

.notification-close:hover {
    color: #212529;
}

.notification-close:focus {
    outline: 2px solid #313b77;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Success notification */
.notification-success {
    border-left: 6px solid #28a745;
}

.notification-success .notification-icon {
    color: #28a745;
}

/* Error notification */
.notification-error {
    border-left: 6px solid #dc3545;
}

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

/* Warning notification */
.notification-warning {
    border-left: 6px solid #ffc107;
}

.notification-warning .notification-icon {
    color: #ffc107;
}

/* Info notification */
.notification-info {
    border-left: 6px solid #313b77;
}

.notification-info .notification-icon {
    color: #313b77;
}

/* Stacking notifications */
.notification:nth-child(n+2) {
    margin-top: 20px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .notification {
        min-width: 90%;
        max-width: 90%;
        padding: 16px 20px;
        top: 20px;
        transform: translateX(-50%) translateY(0);
    }

    .notification.show {
        transform: translateX(-50%) translateY(0);
    }

    .notification.hide {
        transform: translateX(-50%) translateY(-20px);
    }

    .notification-icon {
        font-size: 20px;
    }

    .notification-message {
        font-size: 14px;
    }

    .notification-close {
        font-size: 24px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .notification,
    .notification-overlay {
        transition: none;
    }
}

/* Focus visible for keyboard navigation */
.notification:focus-visible {
    outline: 3px solid #313b77;
    outline-offset: 4px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .notification {
        border: 2px solid currentColor;
    }

    .notification-overlay {
        background-color: rgba(0, 0, 0, 0.8);
    }
}
