/**
 * Offline Mode Styles
 * Alert bar and content overlay for offline detection
 */

@import url("root.css");

/* ==========================================================================
   OFFLINE ALERT BAR (Fixed Bottom)
   ========================================================================== */

.offline-alert-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out, background-color 0.5s ease-in-out;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.offline-alert-bar--show {
    transform: translateY(0);
}

.offline-alert-bar--offline {
    background-color: #b71c1c;
    color: white;
}

.offline-alert-bar--online {
    background-color: #1b5e20;
    color: white;
}

.alert-bar-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 20px;
    gap: 10px;
}

.alert-icon {
    display: none;
}

.alert-message {
    font-size: 13px;
    font-weight: 500;
}

/* ==========================================================================
   OFFLINE CONTENT OVERLAY (YouTube-style)
   ========================================================================== */

.offline-content-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9998;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.offline-content-overlay--show {
    opacity: 1;
    visibility: visible;
}

/* Prevent scrolling when overlay is active */
body.has-offline-overlay {
    overflow: hidden !important;
}

.offline-content-wrapper {
    text-align: center;
    color: white;
    padding: 40px;
    max-width: 500px;
}

.offline-illustration {
    margin-bottom: 30px;
}

.offline-illustration svg {
    width: 200px;
    height: 200px;
}

.offline-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--white);
}

.offline-message {
    font-size: 16px;
    color: var(--bs-gray-200);
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Bootstrap button override for offline retry button */
.offline-content-wrapper .btn {
    min-width: 200px;
}

/* ==========================================================================
   ONLINE FEATURE DISABLED STATE
   ========================================================================== */

.online-feature-disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    pointer-events: none;
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================== */

@media (max-width: 767.98px) {
    .offline-content-wrapper {
        padding: 20px;
    }

    .offline-title {
        font-size: 24px;
    }

    .offline-message {
        font-size: 14px;
    }

    .offline-illustration svg {
        width: 150px;
        height: 150px;
    }
}
