/* ============================================
   PROFESSIONAL NOTIFICATION SYSTEM
   Production-ready with enhanced UX/UI
============================================ */

/* Container */
.notification-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10000;
    max-width: min(28rem, calc(100vw - 3rem));
    display: flex;
    flex-direction: column;
    gap: 1rem;
    pointer-events: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Notification Card */
.notification-message {
    display: flex;
    align-items: flex-start;
    padding: 1.25rem 1rem 1.25rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 
                0 10px 10px -5px rgba(0, 0, 0, 0.04),
                0 0 0 1px rgba(0, 0, 0, 0.02);
    position: relative;
    pointer-events: auto;
    transform: translateX(120%) scale(0.95);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                opacity 0.3s ease-out,
                box-shadow 0.2s ease;
    max-height: 140px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.8);
    animation: float 6s ease-in-out infinite;
}

/* Subtle floating animation */
@keyframes float {
    0%, 100% { transform: translateX(0) scale(1); }
    50% { transform: translateX(0) scale(1.01); }
}

.notification-message.show {
    transform: translateX(0) scale(1);
    opacity: 1;
    animation: float 6s ease-in-out infinite 0.4s;
}

.notification-message.hide {
    transform: translateX(120%) scale(0.95);
    opacity: 0;
}

/* Hover effects */
.notification-message:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15),
                0 0 0 1px rgba(0, 0, 0, 0.03);
    transform: translateX(0) scale(1.02);
}

/* Icon Container */
.notification-icon-container {
    margin-right: 1rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

/* Content Area */
.notification-content {
    flex-grow: 1;
    overflow-wrap: break-word;
    word-break: break-word;
    font-size: 0.9375rem;
    line-height: 1.5;
    padding-right: 0.5rem;
    color: inherit;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notification-text {
    color: rgba(0, 0, 0, 0.7);
    font-size: 0.875rem;
}

/* Close Button */
.notification-close {
    margin-left: 0.75rem;
    font-size: 1.5rem;
    font-weight: 300;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.25rem;
    flex-shrink: 0;
    align-self: flex-start;
    color: inherit;
    opacity: 0.6;
    border-radius: 4px;
    transition: opacity 0.2s ease, background-color 0.2s ease;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.05);
}

.notification-close:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Progress Bar */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
    border-radius: 0 0 0 12px;
    animation: progressBar linear forwards;
}

@keyframes progressBar {
    from { width: 100%; }
    to { width: 0%; }
}

/* ========== NOTIFICATION TYPES ========== */

/* SUCCESS */
.notification-message.success {
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
    color: #047857;
    border-color: #10B981;
}

.notification-message.success .notification-icon-container {
    background: #10B981;
    color: white;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.25);
}

/* ERROR */
.notification-message.error {
    background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%);
    color: #B91C1C;
    border-color: #EF4444;
}

.notification-message.error .notification-icon-container {
    background: #EF4444;
    color: white;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.25);
}

/* WARNING */
.notification-message.warning {
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    color: #B45309;
    border-color: #F59E0B;
}

.notification-message.warning .notification-icon-container {
    background: #F59E0B;
    color: white;
    box-shadow: 0 4px 6px rgba(245, 158, 11, 0.25);
}

/* INFO */
.notification-message.info {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    color: #1E40AF;
    border-color: #3B82F6;
}

.notification-message.info .notification-icon-container {
    background: #3B82F6;
    color: white;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.25);
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 768px) {
    .notification-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
        gap: 0.75rem;
    }
    
    .notification-message {
        padding: 1rem 1rem 1rem 1.25rem;
        border-radius: 10px;
        max-height: none;
    }
    
    .notification-icon-container {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.875rem;
    }
    
    .notification-content {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .notification-container {
        top: 0.75rem;
        right: 0.75rem;
        left: 0.75rem;
    }
    
    .notification-message {
        padding: 0.875rem 0.875rem 0.875rem 1rem;
        border-radius: 8px;
    }
    
    .notification-icon-container {
        margin-right: 0.75rem;
    }
}

/* ========== DARK MODE SUPPORT ========== */
@media (prefers-color-scheme: dark) {
    .notification-message {
        background: rgba(30, 30, 30, 0.95);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .notification-message.success {
        background: linear-gradient(135deg, #064E3B 0%, #047857 100%);
        color: #D1FAE5;
    }
    
    .notification-message.error {
        background: linear-gradient(135deg, #7F1D1D 0%, #B91C1C 100%);
        color: #FEE2E2;
    }
    
    .notification-message.warning {
        background: linear-gradient(135deg, #78350F 0%, #B45309 100%);
        color: #FEF3C7;
    }
    
    .notification-message.info {
        background: linear-gradient(135deg, #1E3A8A 0%, #1E40AF 100%);
        color: #DBEAFE;
    }
    
    .notification-close:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
}

/* ========== ANIMATION VARIATIONS ========== */
@keyframes slideInRight {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* ========== ACCESSIBILITY ========== */
.notification-message:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}