/* Notifications System - Mobile App Style */

#notification-container {
    position: fixed;
    top: calc(var(--safe-top, 0px) + 16px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10001;
    
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    
    width: calc(100% - 32px);
    max-width: 420px;
    pointer-events: none;
}

.notification {
    position: relative;
    width: 100%;
    
    /* Glassmorphism effect - matching app design */
    background: rgba(26, 24, 32, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    
    padding: 16px 20px;
    
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    
    display: flex;
    align-items: center;
    gap: 12px;
    
    font-family: var(--font-family, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
    font-size: clamp(0.875rem, 2.5vmin, 1rem);
    line-height: 1.5;
    color: #f0f0f0;
    
    pointer-events: auto;
    cursor: pointer;
    
    /* Animation */
    animation: slideDown 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Smooth transitions */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.5),
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.notification:active {
    transform: translateY(0);
}

/* Notification Icons */
.notification-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    font-size: 16px;
    font-weight: 700;
    
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Success - Gold accent (matching app theme) */
.notification.success .notification-icon {
    background: linear-gradient(135deg, #ffc947, #ffb627);
    color: #0d0c11;
}

.notification.success {
    border-color: rgba(255, 201, 71, 0.3);
}

/* Error - Red with glow */
.notification.error .notification-icon {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: #ffffff;
}

.notification.error {
    border-color: rgba(255, 68, 68, 0.3);
}

/* Warning - Orange */
.notification.warning .notification-icon {
    background: linear-gradient(135deg, #ffaa00, #ff8800);
    color: #ffffff;
}

.notification.warning {
    border-color: rgba(255, 170, 0, 0.3);
}

/* Info - Blue accent (matching app) */
.notification.info .notification-icon {
    background: linear-gradient(135deg, #0088cc, #0066aa);
    color: #ffffff;
}

.notification.info {
    border-color: rgba(0, 136, 204, 0.3);
}

/* Notification Content */
.notification-content {
    flex: 1;
    font-weight: 500;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Close button (optional) */
.notification-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    
    transition: all 0.2s ease;
    cursor: pointer;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
}

/* Exit animation */
.notification.removing {
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
}

/* Progress bar (optional - for auto-dismiss timer) */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 16px 16px;
    transform-origin: left;
    animation: progress 5s linear forwards;
}

.notification.success .notification-progress {
    background: linear-gradient(90deg, #ffc947, #ffb627);
}

.notification.error .notification-progress {
    background: linear-gradient(90deg, #ff4444, #cc0000);
}

.notification.warning .notification-progress {
    background: linear-gradient(90deg, #ffaa00, #ff8800);
}

.notification.info .notification-progress {
    background: linear-gradient(90deg, #0088cc, #0066aa);
}

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

/* Mobile optimizations */
@media (max-width: 480px) {
    #notification-container {
        top: calc(var(--safe-top, 0px) + 12px);
        width: calc(100% - 24px);
    }
    
    .notification {
        padding: 14px 16px;
        font-size: 0.875rem;
    }
    
    .notification-icon {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }
}

/* Prevent stacking issues with other fixed elements */
.notification {
    isolation: isolate;
}
