/**
 * Professional Notification System Styles
 * Enhanced responsive design with beautiful animations
 */

/* Notification Container */
.notification-system-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    width: 100%;
    pointer-events: none;
}

/* Base Notification Styles */
.notification {
    position: relative;
    margin-bottom: 12px;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    cursor: pointer;
    overflow: hidden;
    max-height: 120px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

/* Animation States */
.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.hide {
    opacity: 0;
    transform: translateX(100%);
    max-height: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
}

/* Notification Icon */
.notification-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    margin-top: 2px;
    background: rgba(255, 255, 255, 0.2);
}

/* Notification Content */
.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 15px;
    line-height: 1.3;
}

.notification-message {
    opacity: 0.9;
    word-wrap: break-word;
    line-height: 1.4;
}

/* Close Button */
.notification-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s ease;
    font-weight: bold;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.notification-close:active {
    transform: scale(0.95);
}

/* Progress Bar */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    transition: width linear;
    border-radius: 0 0 12px 12px;
}

/* Notification Types */
.notification-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.notification-success .notification-icon {
    background: rgba(255, 255, 255, 0.2);
}

.notification-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.notification-error .notification-icon {
    background: rgba(255, 255, 255, 0.2);
}

.notification-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.notification-warning .notification-icon {
    background: rgba(255, 255, 255, 0.2);
}

.notification-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.notification-info .notification-icon {
    background: rgba(255, 255, 255, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .notification-system-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .notification {
        padding: 14px 16px;
        font-size: 13px;
        border-radius: 10px;
        margin-bottom: 10px;
    }

    .notification-title {
        font-size: 14px;
    }

    .notification-icon {
        width: 18px;
        height: 18px;
        font-size: 11px;
    }

    .notification-close {
        width: 20px;
        height: 20px;
        font-size: 10px;
        top: 6px;
        right: 6px;
    }
}

@media (max-width: 480px) {
    .notification-system-container {
        top: 8px;
        right: 8px;
        left: 8px;
    }

    .notification {
        padding: 12px 14px;
        font-size: 12px;
        border-radius: 8px;
        margin-bottom: 8px;
    }

    .notification-title {
        font-size: 13px;
    }

    .notification-icon {
        width: 16px;
        height: 16px;
        font-size: 10px;
    }

    .notification-close {
        width: 18px;
        height: 18px;
        font-size: 9px;
        top: 4px;
        right: 4px;
    }
}

/* RTL Support */
[dir="rtl"] .notification-system-container {
    right: auto;
    left: 20px;
}

[dir="rtl"] .notification {
    transform: translateX(-100%);
}

[dir="rtl"] .notification.show {
    transform: translateX(0);
}

[dir="rtl"] .notification.hide {
    transform: translateX(-100%);
}

[dir="rtl"] .notification-close {
    right: auto;
    left: 8px;
}

[dir="rtl"] .notification {
    flex-direction: row-reverse;
}

@media (max-width: 768px) and [dir="rtl"] {
    .notification-system-container {
        left: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) and [dir="rtl"] {
    .notification-system-container {
        left: 8px;
        right: 8px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .notification {
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    }
}

/* Animation keyframes */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

@keyframes pulse {
    0% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.05); 
    }
    100% { 
        transform: scale(1); 
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -8px, 0);
    }
    70% {
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

/* Hover effects */
.notification:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

[dir="rtl"] .notification:hover {
    transform: translateY(-2px) scale(1.02);
}

/* Special animation classes */
.notification.pulse {
    animation: pulse 0.6s ease-in-out;
}

.notification.bounce {
    animation: bounce 1s ease-in-out;
}

/* Accessibility improvements */
.notification:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.notification[aria-live="polite"] {
    /* Screen reader announcements */
}

/* Print styles */
@media print {
    .notification-system-container {
        display: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .notification {
        border: 2px solid currentColor;
        box-shadow: none;
    }
    
    .notification-close {
        background: rgba(255, 255, 255, 0.5);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .notification {
        transition: opacity 0.2s ease;
        transform: none;
    }
    
    .notification.show {
        transform: none;
    }
    
    .notification.hide {
        transform: none;
    }
    
    .notification-progress {
        transition: none;
    }
}
