﻿/* ─── APP INDICATOR CSS ─── */

/* 1. Top Progress Bar (GitHub / YouTube style) */
#app-top-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #0d6efd, #00d2ff, #0d6efd);
    background-size: 200% 100%;
    animation: app-progress-gradient 1.5s linear infinite;
    z-index: 99999;
    transition: width 0.25s ease, opacity 0.4s ease;
    box-shadow: 0 0 10px rgba(13, 110, 253, 0.7), 0 0 5px rgba(0, 210, 255, 0.5);
    opacity: 0;
    pointer-events: none;
}

@keyframes app-progress-gradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* 2. Floating Status HUD / Toast (Google Docs style) */
#app-status-hud {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99998;
    background: rgba(15, 23, 42, 0.92);
    color: #ffffff;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 13.5px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateY(60px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#app-status-hud.active {
    transform: translateY(0);
    opacity: 1;
}

#app-status-hud.hud-success {
    background: rgba(16, 185, 129, 0.95);
    color: #ffffff;
}

#app-status-hud.hud-error {
    background: rgba(239, 68, 68, 0.95);
    color: #ffffff;
}

#app-status-hud.hud-info {
    background: rgba(13, 110, 253, 0.95);
    color: #ffffff;
}

/* 3. Global Heavy Operation Overlay / Backdrop Loader */
#app-global-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

#app-global-loader-overlay.active {
    opacity: 1;
    visibility: visible;
}

.app-loader-card {
    background: #ffffff;
    padding: 32px 36px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    text-align: center;
    max-width: 380px;
    width: 90%;
    transform: scale(0.92);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

#app-global-loader-overlay.active .app-loader-card {
    transform: scale(1);
}

.app-loader-icon-wrapper {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-loader-icon-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(13, 110, 253, 0.15);
    animation: app-pulse-ring 1.8s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.app-loader-icon-circle {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 14px rgba(13, 110, 253, 0.35);
    z-index: 1;
}

@keyframes app-pulse-ring {
    0% { transform: scale(0.8); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 0; }
    100% { transform: scale(1.3); opacity: 0; }
}

.app-loader-spinner-bar {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 16px;
    position: relative;
}

.app-loader-spinner-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, #0d6efd, #00d2ff);
    border-radius: 4px;
    animation: app-indeterminate-bar 1.4s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
}

@keyframes app-indeterminate-bar {
    0% { left: -50%; width: 50%; }
    50% { left: 25%; width: 75%; }
    100% { left: 100%; width: 25%; }
}

/* 4. Button working spinner state */
.btn.is-working {
    position: relative;
    pointer-events: none;
    opacity: 0.85;
}
