/* Hurpedia Fotbollsplan-jämförare v1.0.0 */
/* Egen namnrymd .fbp- */

.fbp-root {
    --fbp-bg: #ffffff;
    --fbp-bg-soft: #f7f9fc;
    --fbp-text: #1a2332;
    --fbp-text-soft: #4a5568;
    --fbp-text-muted: #6b7280;
    --fbp-accent: #0f6b3a;
    --fbp-accent-soft: #ecfdf5;
    --fbp-grass: #2d8c4e;
    --fbp-grass-stripe: #25783f;
    --fbp-line: #ffffff;
    --fbp-border: #e2e8f0;
    --fbp-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --fbp-radius: 12px;
    --fbp-radius-sm: 8px;

    box-sizing: border-box;
    color: var(--fbp-text);
    line-height: 1.55;
    margin: 1.5em 0;
    max-width: 100%;
}

.fbp-root *,
.fbp-root *::before,
.fbp-root *::after {
    box-sizing: border-box;
}

/* === KORT === */
.fbp-card {
    background: var(--fbp-bg);
    border: 1px solid var(--fbp-border);
    border-radius: var(--fbp-radius);
    box-shadow: var(--fbp-shadow);
    margin-bottom: 16px;
    padding: clamp(16px, 3vw, 24px);
}

.fbp-section-title {
    color: var(--fbp-text);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 14px;
}

/* === TABS === */
.fbp-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.fbp-tab {
    appearance: none;
    background: var(--fbp-bg-soft);
    border: 2px solid var(--fbp-border);
    border-radius: var(--fbp-radius-sm);
    color: var(--fbp-text);
    cursor: pointer;
    flex: 1 1 auto;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    min-height: 42px;
    padding: 8px 14px;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.fbp-tab:hover {
    background: var(--fbp-accent-soft);
    border-color: var(--fbp-accent);
}

.fbp-tab-active {
    background: var(--fbp-accent);
    border-color: var(--fbp-accent);
    color: #ffffff;
}

.fbp-tab:focus-visible {
    outline: 3px solid var(--fbp-accent-soft);
    outline-offset: 2px;
}

.fbp-description {
    color: var(--fbp-text-soft);
    font-size: 0.95rem;
    margin: 0;
}

/* === MÅTT === */
.fbp-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.fbp-stat {
    background: var(--fbp-bg-soft);
    border: 1px solid var(--fbp-border);
    border-radius: var(--fbp-radius-sm);
    min-width: 0;
    padding: 14px 12px;
    text-align: center;
}

.fbp-stat:nth-child(3) {
    background: var(--fbp-accent-soft);
    border-color: var(--fbp-accent);
}

.fbp-stat-label {
    color: var(--fbp-text-muted);
    display: block;
    font-size: 0.825rem;
    font-weight: 600;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fbp-stat-num {
    color: var(--fbp-text);
    display: block;
    font-size: clamp(1.05rem, 3vw, 1.3rem);
    font-weight: 700;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.fbp-stat:nth-child(3) .fbp-stat-num {
    color: var(--fbp-accent);
}

.fbp-typical {
    color: var(--fbp-text-soft);
    font-size: 0.95rem;
    margin: 0;
    padding: 10px 12px;
    background: var(--fbp-accent-soft);
    border-radius: var(--fbp-radius-sm);
}

/* === SVG VISUALISERING === */
.fbp-svg-wrap {
    background: var(--fbp-grass);
    background-image: repeating-linear-gradient(
        90deg,
        var(--fbp-grass) 0px,
        var(--fbp-grass) 24px,
        var(--fbp-grass-stripe) 24px,
        var(--fbp-grass-stripe) 48px
    );
    border-radius: var(--fbp-radius-sm);
    padding: 16px;
    margin-bottom: 10px;
}

.fbp-svg {
    display: block;
    width: 100%;
    height: auto;
    max-height: 400px;
}

.fbp-svg-note {
    color: var(--fbp-text-muted);
    font-size: 0.825rem;
    font-style: italic;
    margin: 0;
    text-align: center;
}

/* === JÄMFÖRELSER === */
.fbp-comparison-intro {
    color: var(--fbp-text);
    font-size: 1rem;
    margin: 0 0 10px;
}

.fbp-comparison-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fbp-comparison-list li {
    background: var(--fbp-bg-soft);
    border-left: 3px solid var(--fbp-accent);
    border-radius: 0 var(--fbp-radius-sm) var(--fbp-radius-sm) 0;
    color: var(--fbp-text);
    font-size: 0.95rem;
    margin: 0 0 6px;
    padding: 10px 14px;
}

.fbp-comparison-list strong {
    color: var(--fbp-accent);
    font-size: 1.1rem;
}

/* === STADIONS-TABELL === */
.fbp-stadiums-table {
    border-collapse: collapse;
    font-size: 0.95rem;
    margin: 0 0 10px;
    width: 100%;
}

.fbp-stadiums-table thead th {
    background: var(--fbp-bg-soft);
    border-bottom: 2px solid var(--fbp-border);
    color: var(--fbp-text);
    font-size: 0.825rem;
    font-weight: 700;
    padding: 10px 12px;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fbp-stadiums-table tbody td {
    border-bottom: 1px solid var(--fbp-border);
    padding: 10px 12px;
    vertical-align: middle;
}

.fbp-stadiums-table tbody tr:last-child td {
    border-bottom: none;
}

.fbp-source-note {
    color: var(--fbp-text-muted);
    font-size: 0.825rem;
    font-style: italic;
    margin: 8px 0 0;
}

/* === RESPONSIV TABELL — KORT PÅ MOBIL === */
@media (max-width: 540px) {
    .fbp-stadiums-table thead {
        clip: rect(0 0 0 0);
        height: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute;
        white-space: nowrap;
        width: 1px;
    }
    .fbp-stadiums-table tbody tr {
        background: var(--fbp-bg);
        border: 1px solid var(--fbp-border);
        border-radius: var(--fbp-radius-sm);
        display: block;
        margin-bottom: 8px;
        padding: 6px 0;
    }
    .fbp-stadiums-table tbody td {
        border-bottom: none;
        display: flex;
        justify-content: space-between;
        padding: 6px 12px;
        text-align: right;
    }
    .fbp-stadiums-table tbody td::before {
        color: var(--fbp-text-muted);
        content: attr(data-label);
        font-weight: 600;
        text-align: left;
    }
    .fbp-stadiums-table tbody td:first-child {
        background: transparent;
        border-bottom: 1px solid var(--fbp-border);
        color: var(--fbp-text);
        font-weight: 700;
        margin-bottom: 4px;
        padding-bottom: 8px;
    }
    .fbp-stadiums-table tbody td:first-child::before {
        display: none;
    }

    /* Mobile-anpassning av tabs */
    .fbp-tabs {
        gap: 4px;
    }
    .fbp-tab {
        font-size: 0.825rem;
        padding: 6px 10px;
        min-height: 36px;
        flex: 1 1 calc(50% - 4px);
    }
}

/* === DARK MODE === */
@media (prefers-color-scheme: dark) {
    .fbp-root {
        --fbp-bg: #1a2332;
        --fbp-bg-soft: #232f44;
        --fbp-text: #f1f5f9;
        --fbp-text-soft: #cbd5e1;
        --fbp-text-muted: #94a3b8;
        --fbp-accent: #34d399;
        --fbp-accent-soft: #1e3a25;
        --fbp-grass: #1a5d3a;
        --fbp-grass-stripe: #166032;
        --fbp-border: #334155;
    }
}
