/**
 * Enhanced Notification System Styles
 * Modern, accessible, and responsive notification styles
 */

/* Notification Container */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    width: 100%;
    pointer-events: none;
}

/* Individual Notification */
.notification {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transform: translateX(450px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
    border-left: 4px solid #007bff;
    pointer-events: auto;
    min-height: 60px;
    max-width: 100%;
}

.notification.show {
    transform: translateX(0);
}

.notification.dismissing {
    transform: translateX(450px);
    opacity: 0;
}

/* Notification Types */
.notification-success {
    border-left-color: #28a745;
}

.notification-error {
    border-left-color: #dc3545;
}

.notification-warning {
    border-left-color: #ffc107;
}

.notification-info {
    border-left-color: #17a2b8;
}

/* Progress Bar */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #0056b3);
    width: 100%;
    animation: progressBar linear forwards;
    transform-origin: left;
}

.notification-success .notification-progress {
    background: linear-gradient(90deg, #28a745, #1e7e34);
}

.notification-error .notification-progress {
    background: linear-gradient(90deg, #dc3545, #c82333);
}

.notification-warning .notification-progress {
    background: linear-gradient(90deg, #ffc107, #e0a800);
}

.notification-info .notification-progress {
    background: linear-gradient(90deg, #17a2b8, #138496);
}

@keyframes progressBar {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* Notification Content */
.notification-content {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    gap: 12px;
    position: relative;
}

/* Notification Icon */
.notification-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-top: 2px;
}

.notification-success .notification-icon {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.notification-error .notification-icon {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.notification-warning .notification-icon {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.notification-info .notification-icon {
    background: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
}

/* Notification Body */
.notification-body {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: #333;
    line-height: 1.3;
}

.notification-message {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    word-wrap: break-word;
}

/* Notification Actions */
.notification-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.notification-action-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.notification-action-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
}

.notification-success .notification-action-btn {
    background: rgba(40, 167, 69, 0.1);
    border-color: rgba(40, 167, 69, 0.3);
    color: #28a745;
}

.notification-error .notification-action-btn {
    background: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.3);
    color: #dc3545;
}

.notification-warning .notification-action-btn {
    background: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

.notification-info .notification-action-btn {
    background: rgba(23, 162, 184, 0.1);
    border-color: rgba(23, 162, 184, 0.3);
    color: #17a2b8;
}

/* Close Button */
.notification-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 16px;
    color: #999;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #666;
}

/* Position Variants */
.notification.top-left {
    transform: translateX(-450px);
}

.notification.top-left.show {
    transform: translateX(0);
}

.notification.top-left.dismissing {
    transform: translateX(-450px);
}

.notification.bottom-right {
    transform: translateY(100px);
}

.notification.bottom-right.show {
    transform: translateY(0);
}

.notification.bottom-right.dismissing {
    transform: translateY(100px);
}

.notification.bottom-left {
    transform: translate(-450px, 100px);
}

.notification.bottom-left.show {
    transform: translate(0, 0);
}

.notification.bottom-left.dismissing {
    transform: translate(-450px, 100px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .notification {
        transform: translateY(-100px);
        border-radius: 8px;
    }
    
    .notification.show {
        transform: translateY(0);
    }
    
    .notification.dismissing {
        transform: translateY(-100px);
    }
    
    .notification-content {
        padding: 12px;
    }
    
    .notification-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .notification-title {
        font-size: 13px;
    }
    
    .notification-message {
        font-size: 12px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .notification {
        background: #2d3748;
        color: #e2e8f0;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    }
    
    .notification-title {
        color: #e2e8f0;
    }
    
    .notification-message {
        color: #a0aec0;
    }
    
    .notification-close {
        color: #a0aec0;
    }
    
    .notification-close:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #e2e8f0;
    }
    
    .notification-action-btn {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .notification-action-btn:hover {
        background: #718096;
        border-color: #a0aec0;
    }
}

/* Accessibility Improvements */
.notification:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.notification-close:focus {
    outline: 2px solid #007bff;
    outline-offset: 1px;
}

.notification-action-btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 1px;
}

/* Animation for multiple notifications */
.notification-container .notification:not(:last-child) {
    margin-bottom: 0;
}

/* Custom scrollbar for notification container */
.notification-container::-webkit-scrollbar {
    width: 4px;
}

.notification-container::-webkit-scrollbar-track {
    background: transparent;
}

.notification-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

.notification-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}
