/* Loading and Status Styles */

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 16px;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    font-size: 14px;
    color: var(--gray-600);
}

.progress-container {
    width: 300px;
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-loading {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Status Toast */
.status {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: none;
    z-index: 1001;
    box-shadow: var(--shadow-md);
    animation: slideUp 0.3s ease;
}

.status.success {
    background: var(--success);
    color: var(--white);
    display: block;
}

.status.error {
    background: var(--danger);
    color: var(--white);
    display: block;
}

.status.warning {
    background: var(--warning);
    color: var(--white);
    display: block;
}

/* Cache Status Banner */
#cacheStatus {
    display: none;
    padding: 12px 20px;
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 14px;
}

#cacheStatus.active {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

#cacheStatus .cache-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

#cacheStatus .cache-actions {
    display: flex;
    gap: 8px;
}

#cacheStatus button {
    padding: 6px 12px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}

#cacheStatus button:hover {
    background: rgba(255,255,255,0.2);
}

/* Integrity Warning Banner */
#integrityWarning {
    display: none;
    padding: 12px 20px;
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 14px;
}

#integrityWarning.active {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

#integrityWarning .warning-text {
    flex: 1;
}

#integrityWarning button {
    padding: 6px 12px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}

#integrityWarning button:hover {
    background: rgba(255,255,255,0.2);
}

/* Background Loading Indicator */
#backgroundLoadingIndicator {
    display: none;
    position: fixed;
    top: 70px;
    right: 24px;
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    z-index: 100;
    animation: pulse 1.5s ease-in-out infinite;
}

#backgroundLoadingIndicator.active {
    display: flex;
    align-items: center;
    gap: 8px;
}

#backgroundLoadingIndicator .mini-spinner {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
