/* ════════════════════════════════════════════════
   Offline / Online Indicator
   ════════════════════════════════════════════════ */

.offline-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                background 0.3s ease,
                color 0.3s ease;
    pointer-events: none;
}

.offline-bar.visible {
    transform: translateY(0);
    pointer-events: auto;
}

/* ── Offline state ── */
.offline-bar.offline {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.95), rgba(220, 38, 38, 0.95));
    color: #fff;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.35);
}

/* ── Back online state ── */
.offline-bar.online {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(5, 150, 105, 0.95));
    color: #fff;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.35);
}

/* ── Pulse dot ── */
.offline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.offline-bar.offline .offline-dot {
    background: #fca5a5;
    animation: offlinePulse 1.5s ease-in-out infinite;
}

.offline-bar.online .offline-dot {
    background: #6ee7b7;
    animation: none;
}

@keyframes offlinePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}

/* ── Icon ── */
.offline-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.offline-icon svg {
    width: 16px;
    height: 16px;
}

/* ── Retry button ── */
.offline-retry {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 3px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    margin-left: 6px;
    transition: background 0.2s;
}

.offline-retry:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* ── Light mode ── */
.light-mode .offline-bar.offline {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.92), rgba(220, 38, 38, 0.92));
}

.light-mode .offline-bar.online {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.92), rgba(5, 150, 105, 0.92));
}
