/* ============================================================================
 * skeletons.css — Batch 4.17
 *
 * Skeleton loaders replace the generic spinner with structure-shaped
 * placeholders. Improves perceived performance significantly — users see
 * the layout immediately and feel the app is "almost there" instead of
 * staring at a spinner with no context.
 *
 * Usage:
 *   <div class="skel skel--line"></div>           — single line of text
 *   <div class="skel skel--line skel--w-50"></div> — half-width line
 *   <div class="skel skel--box" style="height:80px"></div> — block placeholder
 *
 * Layout containers also included:
 *   .skel-match-list — placeholder for /predicciones.html, /quiniela.html matches
 *   .skel-leaderboard — placeholder for /quiniela.html member list
 *   .skel-quinielas-grid — placeholder for /quinielas.html cards
 * ============================================================================ */

@keyframes skel-shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.skel {
    display: block;
    background-color: rgba(255, 255, 255, 0.06);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0)   0%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0)   100%
    );
    background-size: 200px 100%;
    background-repeat: no-repeat;
    animation: skel-shimmer 1.4s ease-in-out infinite;
    border-radius: 6px;
    position: relative;
}

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .skel {
        animation: none;
    }
}

/* Shape variants */
.skel--line   { height: 12px; margin-bottom: 8px; }
.skel--line-lg { height: 16px; margin-bottom: 10px; }
.skel--line-sm { height: 10px; margin-bottom: 6px; }
.skel--box    { display: block; }
.skel--circle { border-radius: 50%; }
.skel--pill   { border-radius: 999px; }

/* Width helpers */
.skel--w-25  { width: 25%; }
.skel--w-33  { width: 33%; }
.skel--w-50  { width: 50%; }
.skel--w-66  { width: 66%; }
.skel--w-75  { width: 75%; }
.skel--w-100 { width: 100%; }

/* ============================================================
 * Composite skeleton layouts
 * ============================================================ */

/* Match card placeholder — mimics a match prediction card */
.skel-match {
    background: rgba(20, 30, 50, 0.40);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 10px;
}

.skel-match__header {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.skel-match__teams {
    display: flex;
    align-items: center;
    gap: 12px;
}

.skel-match__teams .skel--circle {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.skel-match__teams .skel--line {
    flex: 1;
    margin: 0;
    max-width: 140px;
}

.skel-match__score {
    width: 60px;
    height: 36px;
    flex-shrink: 0;
}

/* Quiniela card placeholder — mimics a private group card on /quinielas.html */
.skel-quiniela {
    background: rgba(20, 30, 50, 0.40);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
}

.skel-quiniela__header {
    margin-bottom: 14px;
}

.skel-quiniela__rows .skel--line {
    height: 10px;
}

/* Leaderboard row placeholder — mimics a member in /quiniela.html */
.skel-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(15, 23, 42, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.skel-row .skel--circle {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.skel-row__text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.skel-row__text .skel--line {
    height: 11px;
    margin: 0;
}

.skel-row__points {
    width: 50px;
    height: 18px;
    flex-shrink: 0;
}

/* ============================================================
 * Empty state container (used alongside skeletons — shown when load
 * completes but data is empty)
 * ============================================================ */

.empty-state {
    text-align: center;
    padding: var(--sp-7, 28px) var(--sp-4, 16px);
    max-width: 460px;
    margin: 0 auto;
}

.empty-state__icon {
    font-size: 3.2rem;
    margin-bottom: var(--sp-3, 12px);
    line-height: 1;
}

.empty-state__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 var(--sp-2, 8px);
    line-height: 1.3;
}

.empty-state__body {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.925rem;
    line-height: 1.5;
    margin: 0 0 var(--sp-4, 16px);
}

.empty-state__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.empty-state__cta {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(125, 211, 252, 1) 0%, rgba(56, 189, 248, 1) 100%);
    color: #0a1628;
    font-weight: 700;
    text-decoration: none;
    border-radius: 10px;
    transition: transform 0.12s, box-shadow 0.12s;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
}

.empty-state__cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(125, 211, 252, 0.35);
}

.empty-state__cta--secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.empty-state__cta--secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

.empty-state__hint {
    font-size: 0.825rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: var(--sp-3, 12px);
}
