/* Skeleton Loading Styles */

@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 0px, #f8f8f8 40px, #f0f0f0 80px);
    background-size: 200px 100%;
    animation: skeleton-loading 1.4s ease-in-out infinite;
}

.skeleton-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
}

.skeleton-image {
    width: 100%;
    height: 200px;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.skeleton-title {
    height: 24px;
    border-radius: 4px;
    margin-bottom: 12px;
    width: 80%;
}

.skeleton-text {
    height: 16px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-text-short {
    width: 60%;
}

.skeleton-button {
    height: 40px;
    width: 120px;
    border-radius: 8px;
    margin-top: 16px;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

.loading-spinner-primary {
    border-color: rgba(15, 41, 66, 0.2);
    border-top-color: var(--primary-color);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Loading Bar at Top */
.loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--secondary-color);
    z-index: 9999;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--secondary-color);
}

/* Pulse Animation for Loading States */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
