/* Professional Skeleton Loaders for Fiacore */

.skeleton {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1) 25%, rgba(59, 130, 246, 0.2) 50%, rgba(59, 130, 246, 0.1) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 8px;
}

/* Dark mode skeleton colors */
[data-theme="dark"] .skeleton {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15) 25%, rgba(59, 130, 246, 0.3) 50%, rgba(59, 130, 246, 0.15) 75%);
    background-size: 200% 100%;
}

/* skeleton-loading keyframes in core-animations.css */

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.skeleton-text.short { width: 40%; }
.skeleton-text.medium { width: 70%; }
.skeleton-text.long { width: 100%; }

.skeleton-title {
    height: 1.5rem;
    width: 60%;
    margin-bottom: 1rem;
    border-radius: 6px;
}

.skeleton-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 1rem;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    flex-shrink: 0;
}

.skeleton-button {
    height: 40px;
    width: 120px;
    border-radius: 8px;
}

.skeleton-chart {
    height: 200px;
    border-radius: 12px;
    margin-top: 1rem;
}

.skeleton-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.skeleton-summary-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.skeleton-summary-card .skeleton-value {
    height: 2.5rem;
    width: 60%;
    margin-bottom: 0.5rem;
}

.skeleton-summary-card .skeleton-label {
    height: 0.875rem;
    width: 40%;
}

.skeleton-transaction {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.skeleton-transaction .skeleton-info {
    flex: 1;
}

.skeleton-transaction .skeleton-amount {
    width: 80px;
    height: 1.25rem;
}

.skeleton-table {
    width: 100%;
}

.skeleton-table-row {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.skeleton-table-cell {
    height: 1rem;
    flex: 1;
}

.skeleton-table-cell:first-child { flex: 0.5; }
.skeleton-table-cell:last-child { flex: 0.3; }

.skeleton-header {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.skeleton-header .skeleton-title {
    height: 2rem;
    width: 40%;
    margin-bottom: 0.75rem;
}

.skeleton-header .skeleton-subtitle {
    height: 1rem;
    width: 60%;
}

.skeleton-pill {
    height: 28px;
    width: 80px;
    border-radius: 14px;
    display: inline-block;
    margin-right: 0.5rem;
}

.skeleton-progress {
    height: 8px;
    width: 100%;
    border-radius: 4px;
    margin-top: 0.5rem;
}

.skeleton-score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 2rem auto;
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.skeleton-grid-item {
    height: 100px;
    border-radius: 12px;
}

.skeleton-fade-in {
    opacity: 0;
    animation: skeleton-fade-in 0.3s ease forwards;
}

@keyframes skeleton-fade-in {
    to { opacity: 1; }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* spin keyframes in core-animations.css */

.loading-content {
    text-align: center;
}

.loading-content .loading-text {
    margin-top: 1rem;
    color: #6b7280;
    font-weight: 500;
}

.content-loading .skeleton-card,
.content-loading .skeleton-transaction,
.content-loading .skeleton-summary-card {
    animation-delay: calc(var(--index, 0) * 0.1s);
}

[data-loading="true"] {
    pointer-events: none;
}

[data-loading="true"] > *:not(.skeleton) {
    display: none;
}

.skeleton-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* pulse keyframes in core-animations.css */
