/* ===== Single-Line Notification Banner ===== */

/* Main Notification Banner Container */
.notification-bar {
    position: static;
    width: 100%;
    z-index: 9999;
    background: linear-gradient(135deg, var(--nav-bg-gradient-start) 0%, var(--nav-bg-gradient-end) 100%);
    border-bottom: 1px solid var(--nav-border);
    height: 40px;
    display: flex;
    align-items: center;
    transition: all var(--transition-base);
}

/* Dark mode support */
[data-theme="dark"] .notification-bar {
    background: linear-gradient(135deg, var(--nav-bg-gradient-end) 0%, var(--nav-bg-gradient-start) 100%);
    border-bottom: 1px solid var(--nav-border-dark);
}

/* Hidden state */
.notification-bar-hidden {
    display: none !important;
}

/* Inner container */
.notification-bar-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    position: relative; /* Needed for absolute positioning */
}

/* Remove the old control containers as buttons are now inside the display area */
.notification-controls-left,
.notification-controls-right {
    display: none;
}

/* Navigation buttons styling - Simple icons, no button appearance */
.notification-prev-btn,
.notification-next-btn {
    background: transparent;
    border: none;
    color: var(--nav-text);
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 10px;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10; /* Ensure arrows are above other content */
}

.notification-prev-btn {
    left: 100px; /* Position on the left edge of the display area */
}

.notification-next-btn {
    right: 100px; /* Position on the right edge of the display area */
}

.notification-prev-btn:hover,
.notification-next-btn:hover {
    color: var(--nav-text-hover);
    transform: translateY(-50%) scale(1.15);
    background: transparent;
}

.notification-prev-btn:disabled,
.notification-next-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
    transform: translateY(-50%);
    background: transparent;
}

/* Remove any button-like styling */
.notification-prev-btn:focus,
.notification-next-btn:focus {
    outline: none;
    box-shadow: none;
    background: transparent;
}

/* Notification counter - Simple text, no badge */
.notification-counter {
    color: var(--nav-text);
    font-size: 11px;
    font-weight: 500;
    min-width: 30px;
    text-align: center;
    opacity: 0.8;
}

/* Center notification display area */
.notification-display-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
    height: 100%;
    position: relative;
}

/* Single notification item (one visible at a time) */
.notification-item {
    background: transparent;
    border: none;
    padding: 0;
    display: none; /* Initially hide all */
    align-items: center;
    gap: var(--space-sm);
    max-width: 100%;
    width: 100%;
    height: 100%;
    transition: all var(--transition-base);
    opacity: 0;
    transform: translateX(20px);
    pointer-events: none;
    justify-content: center;
    overflow: visible; /* Allow progress bar to be visible */
    flex: 0 0 auto; /* Don't grow or shrink, use natural width */
}

/* Active notification item */
.notification-item.active {
    display: flex; /* Show only active */
    opacity: 1;
    transform: translateX(0);
    position: relative;
    pointer-events: auto;
    flex: 0 0 auto; /* Don't grow or shrink, use natural width */
}

/* Container for notification items to manage visibility */
.notification-items-container {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

/* Priority indicator positioned within title */
.priority-indicator {
    margin-right: 4px;
    display: inline-block;
    vertical-align: middle;
}

/* ===== Notification Type Color Coding ===== */

/* Success - Green accent border and background */
.notification-item.notification-success {
    background: rgba(16, 185, 129, 0.15);
    border-left: 3px solid #10b981;
}

.notification-item.notification-success .notification-icon {
    background: rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.notification-item.notification-success .notification-title {
    color: #10b981;
}

/* Warning - Amber accent border and background */
.notification-item.notification-warning {
    background: rgba(245, 158, 11, 0.15);
    border-left: 3px solid #f59e0b;
}

.notification-item.notification-warning .notification-icon {
    background: rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.notification-item.notification-warning .notification-title {
    color: #f59e0b;
}

/* Error - Red accent border and background */
.notification-item.notification-error {
    background: rgba(239, 68, 68, 0.15);
    border-left: 3px solid #ef4444;
}

.notification-item.notification-error .notification-icon {
    background: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.notification-item.notification-error .notification-title {
    color: #ef4444;
}

/* Urgent - Red accent border and background (bold) */
.notification-item.notification-urgent {
    background: rgba(239, 68, 68, 0.25);
    border-left: 3px solid #ef4444;
    font-weight: 700;
}

.notification-item.notification-urgent .notification-icon {
    background: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

.notification-item.notification-urgent .notification-title {
    color: #ef4444;
    font-weight: 700;
}

/* Info - Blue accent border and background */
.notification-item.notification-info {
    background: rgba(59, 130, 246, 0.15);
    border-left: 3px solid #3b82f6;
}

.notification-item.notification-info .notification-icon {
    background: rgba(59, 130, 246, 0.3);
    color: #3b82f6;
}

.notification-item.notification-info .notification-title {
    color: #3b82f6;
}

/* Dark mode adjustments for notification types */
[data-theme="dark"] .notification-item.notification-success {
    background: rgba(16, 185, 129, 0.2);
}

[data-theme="dark"] .notification-item.notification-warning {
    background: rgba(245, 158, 11, 0.2);
}

[data-theme="dark"] .notification-item.notification-error {
    background: rgba(239, 68, 68, 0.25);
}

[data-theme="dark"] .notification-item.notification-urgent {
    background: rgba(239, 68, 68, 0.35);
}

[data-theme="dark"] .notification-item.notification-info {
    background: rgba(59, 130, 246, 0.2);
}

/* ===== Priority Indicators (Visual Representations) ===== */

/* Priority Indicator Container - Clean, minimal design */
.priority-indicator {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    width: 18px;
    height: 12px;
    flex-shrink: 0;
    margin-right: 6px;
    vertical-align: middle;
}

/* URGENT - Full width bar - Red */
.priority-indicator.urgent {
    background: #ef4444;
    border-radius: 2px;
    width: 18px;
    height: 4px;
}

/* HIGH - Two bars - Orange */
.priority-indicator.high {
    gap: 2px;
}

.priority-indicator.high .bar {
    width: 4px;
    height: 100%;
    background: #f97316;
    border-radius: 1px;
}

.priority-indicator.high .bar:nth-child(2) {
    height: 60%;
}

/* MEDIUM - Three bars - Amber */
.priority-indicator.medium {
    gap: 2px;
}

.priority-indicator.medium .bar {
    width: 3px;
    height: 100%;
    background: #f59e0b;
    border-radius: 1px;
}

.priority-indicator.medium .bar:nth-child(2) {
    height: 70%;
}

.priority-indicator.medium .bar:nth-child(3) {
    height: 40%;
}

/* LOW - Two bars - Green */
.priority-indicator.low {
    gap: 2px;
}

.priority-indicator.low .bar {
    width: 5px;
    height: 100%;
    background: #10b981;
    border-radius: 1px;
}

.priority-indicator.low .bar:nth-child(2) {
    height: 50%;
}

/* NORMAL - Three dots - Blue */
.priority-indicator.normal {
    gap: 2px;
    align-items: center;
}

.priority-indicator.normal .dot {
    width: 3px;
    height: 3px;
    background: #3b82f6;
    border-radius: 50%;
}

/* Dark mode priority indicators - slightly brighter */
[data-theme="dark"] .priority-indicator.urgent {
    background: #f87171;
}

[data-theme="dark"] .priority-indicator.high .bar {
    background: #fb923c;
}

[data-theme="dark"] .priority-indicator.medium .bar {
    background: #fbbf24;
}

[data-theme="dark"] .priority-indicator.low .bar {
    background: #34d399;
}

[data-theme="dark"] .priority-indicator.normal .dot {
    background: #60a5fa;
}

/* Adjust notification item gap to accommodate priority indicator */
.notification-item {
    gap: var(--space-xs);
}

/* Active notification state */
.notification-item.active {
    opacity: 1;
    transform: translateX(0);
    position: relative;
    pointer-events: auto;
    z-index: 1;
}

/* Hidden state - completely remove from layout */
.notification-item[style*="display: none"] {
    display: none !important;
}

/* Notification content */
.notification-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    min-width: 0;
    height: 100%;
    justify-content: center;
}

/* Notification icon */
.notification-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 9px;
    background: rgba(255, 255, 255, 0.15);
    color: var(--nav-text);
    margin-left: 12px;
}

/* Notification text content */
.notification-text {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    justify-content: center;
    position: relative;
    flex-direction: column;
}

/* Container for title and message to keep them on same line */
.notification-content {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    width: 100%;
    justify-content: center;
}

/* Title and message styling */
.notification-title,
.notification-message {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: inline-block;
    vertical-align: top;
}

.notification-title {
    flex-shrink: 0; /* Don't shrink the title */
}

.notification-message {
    flex-shrink: 1; /* Allow message to shrink */
}

/* Progress bar below message - positioned absolutely */
.notification-progress-bar {
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    display: flex;
    gap: 2px;
    justify-content: center;
}

.progress-segment {
    width: 8px;
    height: 2px;
    background: var(--nav-text);
    opacity: 0.3;
    border-radius: 1px;
    transition: all var(--transition-fast);
}

.progress-segment.active {
    background: var(--color-primary-light);
    opacity: 1;
    height: 2px;
}

[data-theme="dark"] .progress-segment {
    background: var(--nav-text);
}

[data-theme="dark"] .progress-segment.active {
    background: var(--color-primary-light);
}

.notification-title {
    font-weight: 500;
    color: var(--nav-text-hover);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-message {
    color: var(--nav-text);
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.9;
}

/* Notification metadata */
.notification-meta {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    flex-shrink: 0;
    font-size: 10px;
    color: var(--nav-text);
    opacity: 0.8;
}

.notification-time {
    display: flex;
    align-items: center;
    gap: 2px;
}

/* Voice support indicator - Simple icon */
.notification-voice-indicator {
    display: none;
}

/* Auto-rotate indicator - Simple text */
.auto-rotate-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--nav-text);
    font-size: 10px;
    opacity: 0.7;
}

/* Slide animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
        position: absolute;
        left: 0;
    }
    to {
        opacity: 1;
        transform: translateX(0);
        position: relative;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
        position: absolute;
        left: 0;
    }
    to {
        opacity: 1;
        transform: translateX(0);
        position: relative;
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
        position: relative;
    }
    to {
        opacity: 0;
        transform: translateX(-20px);
        position: absolute;
        left: 0;
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
        position: relative;
    }
    to {
        opacity: 0;
        transform: translateX(20px);
        position: absolute;
        left: 0;
    }
}

.notification-item.slide-in-left {
    animation: slideInLeft 0.3s ease-out;
    z-index: 2;
}

.notification-item.slide-in-right {
    animation: slideInRight 0.3s ease-out;
    z-index: 2;
}

.notification-item.slide-out-left {
    animation: slideOutLeft 0.3s ease-out;
    z-index: 1;
}

.notification-item.slide-out-right {
    animation: slideOutRight 0.3s ease-out;
    z-index: 1;
}

/* Responsive adjustments */
/* Mobile-specific notification flip interaction */
@media (max-width: 768px) {
    .notification-title {
        font-size: var(--font-size-xs);
        display: block !important; /* Override default mobile hiding */
    }
    
    .notification-message {
        display: block !important; /* Override default mobile hiding */
        font-size: 10px;
        padding-top: 5px;
    }
    
    .notification-meta {
        display: none;
    }
    
    .notification-item {
        cursor: pointer;
    }
    
    .notification-content {
        position: relative;
        width: 100%;
        height: 100%;
        transition: transform 0.4s ease-in-out;
    }
    
    .notification-text {
        position: relative;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .notification-title,
    .notification-message {
        position: absolute;
        width: 100%;
        height: 100%;
        display: flex !important;
        align-items: center;
        justify-content: center;
        padding: 0 10px;
        box-sizing: border-box;
        text-align: center;
        white-space: normal;
        overflow: hidden;
        left: 0;
        top: 0;
        transition: opacity 0.4s ease-in-out;
    }
    
    .notification-title {
        opacity: 1;
        z-index: 2;
    }
    
    .notification-message {
        opacity: 0;
        z-index: 1;
    }
    
    .notification-item.flipped .notification-title {
        opacity: 0;
        z-index: 1;
    }
    
    .notification-item.flipped .notification-message {
        opacity: 1;
        z-index: 2;
    }
    
    /* Ensure the notification text area is properly constrained */
    .notification-text {
        overflow: hidden;
        height: 100%;
    }
    
    .notification-title,
    .notification-message {
        overflow: auto;
        word-wrap: break-word;
        padding: 8px 10px;
    }
}

@media (max-width: 768px) {
    
    .notification-controls-left,
    .notification-controls-right {
        gap: 4px;
    }
    
    .notification-prev-btn,
    .notification-next-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .notification-prev-btn{
        left: 20px; /* Adjusted position for smaller screens */
    }
    .notification-next-btn{
        right: 20px; /* Adjusted position for smaller screens */
    }

    
    
    .notification-counter {
        font-size: 10px;
        padding: 2px 6px;
        min-width: 20px;
    }
    
    .notification-icon {
        display: none;
    }
    
    .notification-text {
        gap: 1px;
    }
    
    .notification-title {
        font-size: 11px;
    }
    
    .auto-rotate-indicator {
        display: none;
    }
}

@media (max-width: 480px) {

    
    .notification-item {
        gap: var(--space-sm);
    }
    
    .notification-icon {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .notification-title {
        font-size: 10px;
    }
    
    .notification-meta {
        display: none;
    }
}

/* Empty state */
.notification-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    color: var(--nav-text);
    opacity: 0.7;
    font-size: var(--font-size-sm);
    padding: var(--space-md);
}

/* Loading state */
.notification-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    color: var(--nav-text);
    opacity: 0.7;
    font-size: var(--font-size-sm);
    padding: var(--space-md);
}

.notification-loading .spinner-border {
    width: 16px;
    height: 16px;
    border-width: 2px;
    border-color: var(--nav-text);
    border-right-color: transparent;
}

/* Focus styles for accessibility */
.notification-prev-btn:focus,
.notification-next-btn:focus {
    outline: 2px solid var(--color-primary-light);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .notification-item {
        border-width: 2px;
    }
    
    .notification-prev-btn,
    .notification-next-btn {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .notification-item,
    .notification-prev-btn,
    .notification-next-btn {
        transition: none;
    }
    
    .notification-item.active {
        animation: none;
    }
    
    .auto-rotate-progress-bar {
        transition: none;
    }
}

/* Print styles */
@media print {
    .notification-bar {
        display: none !important;
    }
}

/* Focus visible for keyboard navigation */
.notification-prev-btn:focus-visible,
.notification-next-btn:focus-visible {
    outline: 2px solid var(--color-primary-light);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.3);
}

/* Voice support indicator - Hidden */
.notification-voice-indicator {
    display: none;
}

/* Text-to-speech active state - Hidden */
.notification-item.speaking .notification-icon {
    display: none;
}

/* Professional badge styling */
.notification-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Status indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.status-indicator::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-indicator.active::before {
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

/* Professional divider */
.notification-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 var(--space-sm);
}

/* Compact mode for mobile */
@media (max-width: 768px) {
    .notification-divider {
        display: none;
    }
}

/* ===== End of Professional Notification Bar Styles ===== */
