/* ===== NOTIFICATIONS STYLES ===== */

/* Base Notification Styles */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    max-width: 400px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    font-size: 0.875rem;
    line-height: 1.4;
    transform: translateX(100%);
    transition: all 0.3s ease-out;
    border-left: 4px solid;
}

.notification.show {
    transform: translateX(0);
}

.notification span {
    flex: 1;
    color: inherit;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    min-width: 1.5rem;
    text-align: center;
}

.notification-close:hover {
    opacity: 1;
}

/* Notification Types */
.notification.info {
    background-color: #eff6ff;
    color: #1e40af;
    border-left-color: #3b82f6;
}

.notification.success {
    background-color: #ecfdf5;
    color: #065f46;
    border-left-color: #10b981;
}

.notification.warning {
    background-color: #fffbeb;
    color: #92400e;
    border-left-color: #f59e0b;
}

.notification.error {
    background-color: #fef2f2;
    color: #991b1b;
    border-left-color: #ef4444;
}

/* Icons for notification types */
.notification.info::before {
    content: "ℹ️";
    font-size: 1.1rem;
    margin-right: 0.5rem;
}

.notification.success::before {
    content: "✅";
    font-size: 1.1rem;
    margin-right: 0.5rem;
}

.notification.warning::before {
    content: "⚠️";
    font-size: 1.1rem;
    margin-right: 0.5rem;
}

.notification.error::before {
    content: "❌";
    font-size: 1.1rem;
    margin-right: 0.5rem;
}

/* Animation for multiple notifications */
.notification:nth-child(1) {
    top: 2rem;
}

.notification:nth-child(2) {
    top: 6rem;
}

.notification:nth-child(3) {
    top: 10rem;
}

.notification:nth-child(4) {
    top: 14rem;
}

.notification:nth-child(n+5) {
    top: 18rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .notification {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
        font-size: 0.8rem;
    }
    
    .notification:nth-child(1) {
        top: 1rem;
    }
    
    .notification:nth-child(2) {
        top: 4.5rem;
    }
    
    .notification:nth-child(3) {
        top: 8rem;
    }
    
    .notification:nth-child(4) {
        top: 11.5rem;
    }
    
    .notification:nth-child(n+5) {
        top: 15rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .notification.info {
        background-color: #1e3a8a;
        color: #bfdbfe;
    }
    
    .notification.success {
        background-color: #064e3b;
        color: #a7f3d0;
    }
    
    .notification.warning {
        background-color: #78350f;
        color: #fed7aa;
    }
    
    .notification.error {
        background-color: #7f1d1d;
        color: #fecaca;
    }
}

/* Toast Container for Better Management */
.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 9999;
    pointer-events: none;
}

.toast-container .notification {
    position: relative;
    top: auto;
    right: auto;
    margin-bottom: 1rem;
    pointer-events: auto;
}

/* Notification Progress Bar */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background-color: currentColor;
    opacity: 0.3;
    transition: width linear;
}

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

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

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

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

/* Slide in animation */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Slide out animation */
@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.notification.entering {
    animation: slideInRight 0.3s ease-out forwards;
}

.notification.exiting {
    animation: slideOutRight 0.3s ease-in forwards;
}

/* Notification with actions */
.notification-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.notification-action {
    padding: 0.25rem 0.75rem;
    border: 1px solid currentColor;
    background: transparent;
    color: inherit;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notification-action:hover {
    background: currentColor;
    color: white;
}

/* Loading notification special styling */
.notification.loading {
    background-color: #f3f4f6;
    color: #374151;
    border-left-color: #6b7280;
}

.notification.loading::before {
    content: "";
    width: 1rem;
    height: 1rem;
    border: 2px solid #e5e7eb;
    border-top-color: #6b7280;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

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

/* High contrast mode */
@media (prefers-contrast: high) {
    .notification {
        border-width: 2px;
        border-style: solid;
    }
    
    .notification.info {
        border-color: #1e40af;
        background-color: white;
        color: #1e40af;
    }
    
    .notification.success {
        border-color: #065f46;
        background-color: white;
        color: #065f46;
    }
    
    .notification.warning {
        border-color: #92400e;
        background-color: white;
        color: #92400e;
    }
    
    .notification.error {
        border-color: #991b1b;
        background-color: white;
        color: #991b1b;
    }
}