/* ============================================
   UTILITIES CSS
   Clases de utilidad
   ============================================ */

/* Text Utilities */
.text-center { 
    text-align: center; 
}

.text-muted { 
    color: var(--gray); 
}

/* Spacing Utilities */
.mb-2 { 
    margin-bottom: 8px; 
}

.mb-3 { 
    margin-bottom: 12px; 
}

.mt-2 { 
    margin-top: 8px; 
}

.mt-3 { 
    margin-top: 12px; 
}

/* Display Utilities */
.hidden { 
    display: none !important; 
}

/* Intro.js Tour Customization */
.introjs-overlay {
    opacity: 0.8 !important;
}

.introjs-tooltip {
    max-width: 400px;
    padding: 20px !important;
}

.introjs-helperLayer {
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--primary);
    box-shadow: 0 0 0 5000px rgba(0, 0, 0, 0.8);
}

.introjs-tooltipbuttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.introjs-skipbutton {
    margin-right: auto !important;
    margin-left: 0 !important;
}

.introjs-prevbutton,
.introjs-nextbutton {
    margin: 0 !important;
}

/* Pulse animation for unsaved changes */
@keyframes btn-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(243, 156, 18, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(243, 156, 18, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(243, 156, 18, 0);
    }
}

.btn-pulse {
    animation: btn-pulse 2s infinite;
}

/* ============================================
   APP LOADER
   Loading screen shown during initialization
   ============================================ */

.app-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.app-loader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    color: white;
}

.loader-logo {
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

.loader-logo i {
    color: white;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.loader-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 30px 0;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.loader-spinner {
    margin-bottom: 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-text {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-weight: 300;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Hide app container while loading */
body:has(.app-loader:not(.loaded)) .app-container {
    opacity: 0;
    pointer-events: none;
}
