/* ==========================================================================
   RosterInsight UI Framework - Pre-boot Splash & Loader Styles
   ========================================================================== */

#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #ffffff 0%, #f1f5f9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

#loader-wrapper.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
}

.loader-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    width: 80px;
    height: 80px;
    border-radius: 20px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 800;
    font-size: 32px;
    box-shadow: 0 8px 25px rgba(2, 132, 199, 0.25), inset 0 2px 4px rgba(255, 255, 255, 0.2);
    animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 25px rgba(2, 132, 199, 0.25), inset 0 2px 4px rgba(255, 255, 255, 0.2);
    }
    50% {
        transform: scale(1.04);
        box-shadow: 0 12px 35px rgba(2, 132, 199, 0.35), inset 0 2px 4px rgba(255, 255, 255, 0.3);
    }
}

.loader-spinner-container {
    position: relative;
    width: 48px;
    height: 48px;
}

.loader-ring {
    box-sizing: border-box;
    display: block;
    position: absolute;
    width: 48px;
    height: 48px;
    margin: 0;
    border: 3px solid rgba(2, 132, 199, 0.1);
    border-radius: 50%;
    animation: loader-spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    border-top-color: #0284c7;
}

@keyframes loader-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loader-content p {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 1rem;
    font-weight: 550;
    color: #475569;
    margin: 0;
    letter-spacing: 0.2px;
    animation: pulse-text 2s ease-in-out infinite;
}

@keyframes pulse-text {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* Error/Failure State */
.loader-content.error-state {
    max-width: 420px;
    padding: 32px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    animation: slide-up 0.4s ease-out;
}

.error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.loader-content.error-state h3 {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 12px 0;
}

.loader-content.error-state p {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0 0 24px 0;
    animation: none;
    opacity: 1;
}

.retry-button {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
    transition: all 0.2s ease;
}

.retry-button:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
}

.retry-button:active {
    transform: translateY(0);
}

@keyframes slide-up {
    0% {
        transform: translateY(15px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}
