/* World Cup Sticker Collection Counter — interactive widget + per-team grid.
   Layered on top of v2-editorial.css; only styles the .wcs-* internals. */

:root {
    --wcs-accent: #a855f7;
    --wcs-accent-dark: #7e22ce;
    --wcs-ink: #1b1726;
}

/* ---------- Main collection card ---------- */
.wcs-card {
    background: #fff;
    border: 1px solid #ece8f4;
    border-radius: 18px;
    padding: 1.25rem;
    box-shadow: 0 14px 40px rgba(126, 34, 206, 0.12);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wcs-main { text-align: center; }
.wcs-main-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: #8b8398;
}
.wcs-main-value {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 800;
    font-size: clamp(2.75rem, 8vw, 4rem);
    line-height: 1;
    color: var(--wcs-ink);
    margin: 0.25rem 0 0.5rem;
    font-variant-numeric: tabular-nums;
}
.wcs-of {
    font-size: 0.4em;
    color: #b3abc0;
    margin-left: 0.35rem;
    vertical-align: middle;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
}
.wcs-bar {
    height: 10px;
    background: #f0ecf7;
    border-radius: 999px;
    overflow: hidden;
}
.wcs-bar-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--wcs-accent), var(--wcs-accent-dark));
    transition: width 0.25s ease;
}
.wcs-sub {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: #6f6780;
    font-weight: 600;
}

/* ---------- Big controls ---------- */
.wcs-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}
.wcs-btn {
    border: none;
    border-radius: 12px;
    padding: 0.85rem 0.5rem;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.06s ease, filter 0.15s ease;
    color: #fff;
    -webkit-user-select: none;
    user-select: none;
}
.wcs-btn:active { transform: scale(0.97); }
.wcs-btn-plus { background: var(--wcs-accent); }
.wcs-btn-minus { background: #6f6780; }
.wcs-btn-pack {
    grid-column: 1 / -1;
    background: var(--wcs-ink);
    letter-spacing: 0.02em;
}
.wcs-btn:hover { filter: brightness(1.05); }

/* ---------- Doubles ---------- */
.wcs-doubles {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: #faf7ff;
    border: 1px dashed #d8cdee;
    border-radius: 12px;
    padding: 0.6rem 0.85rem;
}
.wcs-doubles-label {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #5d5470;
}
.wcs-doubles-ctrl {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.wcs-doubles-value {
    min-width: 2ch;
    text-align: center;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--wcs-ink);
}

/* shared mini +/- buttons (doubles + per-team) */
.wcs-mini {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid #e0d8ee;
    background: #fff;
    color: var(--wcs-accent-dark);
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.wcs-mini:active { transform: scale(0.94); }
.wcs-mini:hover { background: #f6f1fe; }

.wcs-reset {
    background: none;
    border: none;
    color: #a79fb6;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    align-self: center;
    padding: 0.25rem;
}
.wcs-reset:hover { color: #6f6780; }

#wcs-app.is-complete .wcs-bar-fill {
    background: linear-gradient(90deg, #22c55e, #15803d);
}

/* ---------- Per-team grid ---------- */
.wcs-groups {
    /* match the v2-sec content box (.v2-personas / .v2-faq): centered,
       capped width, with the section's horizontal padding — the section
       itself only pads vertically. */
    max-width: 1240px;
    margin: 1.5rem auto 0;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    box-sizing: border-box;
}
.wcs-group {
    background: #fff;
    border: 1px solid #ece8f4;
    border-radius: 14px;
    padding: 0.9rem 1rem 1rem;
}
.wcs-group-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 800;
    color: var(--wcs-accent-dark);
    margin: 0 0 0.6rem;
}
.wcs-group-teams {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.wcs-team {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.4rem;
    border-radius: 9px;
}
.wcs-team.has-some { background: #faf7ff; }
.wcs-team-flag { font-size: 1.15rem; line-height: 1; }
.wcs-team-name {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--wcs-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wcs-team-ctrl {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
}
.wcs-team-count {
    min-width: 2ch;
    text-align: center;
    font-weight: 800;
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
    color: #5d5470;
}

@media (max-width: 640px) {
    .wcs-groups { grid-template-columns: 1fr; padding: 0 1rem; }
}
