/**
 * Manual Mode Banner Styles
 *
 * Persistent staleness indicator for Manual Mode.
 * Color-coded by freshness level.
 *
 * @file manual-mode-banner.css
 * @created 2026-02-07
 */

/* Container */
#manual-mode-banner {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

/* Banner base styles */
.mm-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Freshness levels - Color coded */
.mm-banner.mm-fresh {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.05));
    border-bottom: 2px solid rgba(34, 197, 94, 0.4);
}

.mm-banner.mm-recent {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.15), rgba(234, 179, 8, 0.05));
    border-bottom: 2px solid rgba(234, 179, 8, 0.4);
}

.mm-banner.mm-stale {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.08));
    border-bottom: 2px solid rgba(245, 158, 11, 0.5);
}

.mm-banner.mm-critical {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.08));
    border-bottom: 2px solid rgba(239, 68, 68, 0.5);
    animation: critical-pulse 2s infinite;
}

.mm-banner.mm-none {
    background: linear-gradient(135deg, rgba(156, 163, 175, 0.15), rgba(156, 163, 175, 0.05));
    border-bottom: 2px solid rgba(156, 163, 175, 0.4);
}

.mm-banner.mm-loading {
    background: var(--bg-card, #f9fafb);
    border-bottom: 2px solid var(--border-color, #e5e7eb);
}

.mm-banner.mm-error {
    background: rgba(239, 68, 68, 0.1);
    border-bottom: 2px solid rgba(239, 68, 68, 0.3);
}

/* Minimized state */
.mm-banner.mm-minimized {
    padding: 4px 20px;
    cursor: pointer;
}

.mm-banner.mm-minimized .mm-status,
.mm-banner.mm-minimized .mm-time,
.mm-banner.mm-minimized .mm-import-btn {
    display: none;
}

.mm-banner.mm-minimized:hover {
    opacity: 0.9;
}

/* Banner elements */
.mm-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.mm-status {
    flex: 1;
    color: var(--text-primary, #111827);
    line-height: 1.4;
}

.mm-status strong {
    font-weight: 600;
}

.mm-time {
    color: var(--text-secondary, #6b7280);
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
}

.mm-import-btn {
    padding: 6px 14px;
    background: var(--accent, #3b82f6);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.mm-import-btn:hover {
    background: var(--accent-hover, #2563eb);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.mm-import-btn:active {
    transform: translateY(0);
}

.mm-import-btn.mm-pulse {
    animation: pulse-attention 1.5s infinite;
}

.mm-close-btn {
    padding: 4px 8px;
    background: transparent;
    border: none;
    color: var(--text-secondary, #6b7280);
    cursor: pointer;
    font-size: 12px;
    transition: color 0.2s;
    flex-shrink: 0;
}

.mm-close-btn:hover {
    color: var(--text-primary, #111827);
}

/* Animations */
@keyframes critical-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.85;
    }
}

@keyframes pulse-attention {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .mm-banner {
        padding: 8px 12px;
        font-size: 13px;
        gap: 8px;
    }

    .mm-icon {
        font-size: 16px;
    }

    .mm-time {
        display: none; /* Hide on mobile for space */
    }

    .mm-import-btn {
        padding: 5px 10px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .mm-status strong {
        display: block;
        margin-bottom: 2px;
    }

    .mm-import-btn {
        font-size: 0; /* Hide text on very small screens */
        padding: 6px;
    }

    .mm-import-btn::before {
        content: '📥';
        font-size: 16px;
    }
}
