/* ========================================================================
   VS Footy Stats — Shared Styles
   Common base, cards, stat blocks, tabs, tables, skeleton, colors
   ======================================================================== */

/* ── Reset & Base ── */
.vfs {
    --header-h: 0px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: #1a1a2e;
    -webkit-font-smoothing: antialiased;
}

.vfs *, .vfs *::before, .vfs *::after {
    box-sizing: border-box;
}

.vfs-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ── Content area ── */
.vfs-content {
    background: #f0f2f5;
    min-height: 50vh;
    padding: 16px 0 60px;
}

/* ── Cards ── */
.vfs-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,0.08);
    overflow: hidden;
}

.vfs-card__header {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.vfs-card__title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #666;
    margin: 0;
}

.vfs-card__body {
    padding: 16px 18px;
}

/* ── Stat blocks ── */
.vfs-sb {
    border-radius: 8px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.vfs-sb__val {
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1;
}

.vfs-sb__key {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    opacity: 0.65;
}

/* Stat colors */
.vfs-sb--excellent { background: #239954; color: #fff; }
.vfs-sb--good      { background: #91bc80; color: #fff; }
.vfs-sb--average   { background: #e5b05e; color: #fff; }
.vfs-sb--poor      { background: #c85f46; color: #fff; }
.vfs-sb--blue      { background: #3b82f6; color: #fff; }
.vfs-sb--muted     { background: #f0f2f5; color: #666; }

/* Stat block — stacked variant (value on top, label below) */
.vfs-sb--stacked {
    flex-direction: column;
    padding: 10px 8px;
    gap: 4px;
}

.vfs-sb--stacked .vfs-sb__val {
    font-size: 1.1rem;
}

.vfs-sb--stacked .vfs-sb__key {
    opacity: 0.75;
}

/* ── Team badge ── */
.vfs-badge {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: contain;
    background: rgba(0,0,0,0.04);
    flex-shrink: 0;
}

.vfs-badge--lg {
    width: 56px;
    height: 56px;
    border-radius: 12px;
}

.vfs-badge--ph {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 800;
    color: #999;
    background: rgba(0,0,0,0.06);
}

.vfs-badge--ph.vfs-badge--lg {
    font-size: 1.2rem;
}

/* ── Tabs (generic) ── */
.vfs-tabs {
    display: flex;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    gap: 0;
}

.vfs-tab {
    flex: 1;
    padding: 10px 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    color: #999;
    text-align: center;
    position: relative;
    transition: color 0.15s;
}

.vfs-tab:hover {
    color: #666;
}

.vfs-tab--active {
    color: #1a1a2e;
}

.vfs-tab--active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 2.5px;
    background: #4A7FFF;
    border-radius: 2px 2px 0 0;
}

.vfs-tab-content {
    display: none;
}

.vfs-tab-content--active {
    display: block;
}

/* ── Tables ── */
.vfs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.vfs-table th {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #999;
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.vfs-table td {
    padding: 9px 10px;
    color: #333;
    font-weight: 500;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.vfs-table tr:last-child td {
    border-bottom: none;
}

.vfs-table th:not(:first-child),
.vfs-table td:not(:first-child) {
    text-align: center;
}

.vfs-table--striped tr:nth-child(even) td {
    background: rgba(0,0,0,0.015);
}

/* ── Progress bar (horizontal) ── */
.vfs-bar {
    height: 6px;
    background: #f0f2f5;
    border-radius: 3px;
    overflow: hidden;
}

.vfs-bar__fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.vfs-bar__fill--green  { background: #239954; }
.vfs-bar__fill--blue   { background: #3b82f6; }
.vfs-bar__fill--red    { background: #c85f46; }
.vfs-bar__fill--orange { background: #e5b05e; }
.vfs-bar__fill--grey   { background: #999; }

/* ── Form badges (W/D/L) ── */
.vfs-form-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 5px;
    font-size: 0.65rem;
    font-weight: 800;
    color: #fff;
}

.vfs-form-badge--W { background: #239954; }
.vfs-form-badge--D { background: #e5b05e; }
.vfs-form-badge--L { background: #c85f46; }

/* ── Section label (small uppercase) ── */
.vfs-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #999;
}

/* ── Back button ── */
.vfs-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1.5px solid rgba(0,0,0,0.1);
    border-radius: 10px;
    background: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    transition: all 0.15s;
    margin-bottom: 16px;
}

.vfs-back:hover {
    border-color: rgba(0,0,0,0.2);
    color: #333;
}

.vfs-back__arrow {
    font-size: 1rem;
}

/* ── Skeleton loading (shared) ── */
.vfs-sk-bone {
    background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
    background-size: 200% 100%;
    animation: vfs-shimmer 1.4s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes vfs-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Quick-links (anchor nav) ── */
.vfs-quick-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 18px;
}

.vfs-quick-link {
    padding: 5px 14px;
    border-radius: 8px;
    border: 1.5px solid rgba(0,0,0,0.1);
    background: transparent;
    font-size: 0.75rem;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    transition: all 0.15s;
}

.vfs-quick-link:hover {
    border-color: #4A7FFF;
    color: #4A7FFF;
    background: rgba(74,127,255,0.05);
}

/* ── Desktop container sizing ── */
@media (min-width: 1024px) {
    .vfs-container {
        padding: 0 24px;
    }
}
