/* notification-bar.css */
/* Issue #23: Notification Bar Component Styles */

/* Container styles */
.notification-bar-container {
    position: fixed;
    z-index: 999999;
    pointer-events: none;
    display: flex;
    flex-direction: column;
}

/* Position variations */
.notification-bar-container.position-top-center {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.notification-bar-container.position-top-right {
    top: 20px;
    right: 20px;
}

.notification-bar-container.position-top-left {
    top: 20px;
    left: 20px;
}

.notification-bar-container.position-bottom-center {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.notification-bar-container.position-bottom-right {
    bottom: 20px;
    right: 20px;
}

.notification-bar-container.position-bottom-left {
    bottom: 20px;
    left: 20px;
}

/* Base notification styles */
.notification-bar {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    font-size: 14px;
    font-weight: 500;
    min-width: 280px;
    max-width: 400px;
    pointer-events: auto;
    cursor: pointer;
    transition: all 300ms ease-out;
    user-select: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.4;
}

/* Hover effects */
.notification-bar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

/* Type-specific styles */
.notification-bar.notification-info {
    background-color: rgba(33, 150, 243, 0.95);
    color: white;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.notification-bar.notification-success {
    background-color: rgba(76, 175, 80, 0.95);
    color: white;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.notification-bar.notification-warning {
    background-color: rgba(255, 152, 0, 0.95);
    color: white;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.notification-bar.notification-error {
    background-color: rgba(244, 67, 54, 0.95);
    color: white;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

/* Icon styles */
.notification-icon {
    margin-right: 8px;
    font-size: 16px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Message styles */
.notification-message {
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Close button styles */
.notification-close {
    margin-left: 8px;
    opacity: 0.7;
    font-weight: bold;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 2px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

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

/* Animation states */
.notification-bar.notification-entering {
    transform: translateY(-10px);
    opacity: 0;
}

.notification-bar.notification-entered {
    transform: translateY(0);
    opacity: 1;
}

.notification-bar.notification-exiting {
    transform: translateY(-10px);
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin: 0;
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .notification-bar {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    }
    
    .notification-bar:hover {
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .notification-bar {
        min-width: 260px;
        max-width: calc(100vw - 40px);
        font-size: 13px;
        padding: 10px 14px;
    }
    
    .notification-bar-container.position-top-center,
    .notification-bar-container.position-bottom-center {
        left: 20px;
        right: 20px;
        transform: none;
    }
    
    .notification-bar-container.position-top-left,
    .notification-bar-container.position-top-right {
        left: 20px;
        right: 20px;
    }
    
    .notification-bar-container.position-bottom-left,
    .notification-bar-container.position-bottom-right {
        left: 20px;
        right: 20px;
    }
}

/* Accessibility improvements */
.notification-bar:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .notification-bar {
        border-width: 2px;
        font-weight: 600;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .notification-bar {
        transition: none;
    }
    
    .notification-bar:hover {
        transform: none;
    }
}

/* Special server ready notification style */
.notification-bar.server-ready {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.95), rgba(56, 142, 60, 0.95));
    border: 1px solid rgba(76, 175, 80, 0.4);
}

.notification-bar.server-ready .notification-icon {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* Progress indicator for notifications with progress */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 8px 8px;
    transition: width linear;
}

.notification-bar {
    position: relative;
    overflow: hidden;
}

/* Multiple notification spacing */
.notification-bar-container .notification-bar + .notification-bar {
    margin-top: 10px;
}

/* Loading state */
.notification-bar.loading .notification-icon {
    animation: spin 1s linear infinite;
}

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