/*
Theme Name: Tipparn Child
Template: kadence
Version: 1.3
Description: Child theme för tipparn.se
*/

/* ─────────────────────────────────────────
   LIGAFÄRGER
───────────────────────────────────────── */
:root {
    --liga-pl-fill:          #185FA5;
    --liga-pl-text:          #E6F1FB;
    --liga-pl-accent:        #B5D4F4;

    --liga-cl-fill:          #3C3489;
    --liga-cl-text:          #EEEDFE;
    --liga-cl-accent:        #CECBF6;

    --liga-allsvenskan-fill: #085041;
    --liga-allsvenskan-text: #E1F5EE;
    --liga-allsvenskan-accent:#9FE1CB;

    --liga-laliga-fill:      #993C1D;
    --liga-laliga-text:      #FAECE7;
    --liga-laliga-accent:    #F5C4B3;

    --liga-vm-fill:          #3B6D11;
    --liga-vm-text:          #EAF3DE;
    --liga-vm-accent:        #C0DD97;

    --liga-ovriga-fill:      #5F5E5A;
    --liga-ovriga-text:      #F1EFE8;
    --liga-ovriga-accent:    #D3D1C7;

    --color-pos:             #0F6E56;
    --color-neg:             #A32D2D;
    --color-badge-won-bg:    #E1F5EE;
    --color-badge-lost-bg:   #FCEBEB;
    --color-badge-open-bg:   #E6F1FB;
    --color-badge-won-text:  #0F6E56;
    --color-badge-lost-text: #A32D2D;
    --color-badge-open-text: #185FA5;
}

/* ─────────────────────────────────────────
   TYPOGRAFI & GENERELLT
───────────────────────────────────────── */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

.tipparn-wrap {
    width: 100%;
    box-sizing: border-box;
}

/* ─────────────────────────────────────────
   STATISTIKRAD (startsida + statistiksida)
───────────────────────────────────────── */
.tp-stats-bar {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
    padding: .625rem 1rem;
    background: #f5f5f3;
    border-radius: 8px;
    margin-bottom: 2rem;
    font-size: .8125rem;
}

.tp-stats-bar .tp-stat {
    display: flex;
    align-items: baseline;
    gap: .375rem;
}

.tp-stats-bar .tp-stat-label {
    color: #888;
}

.tp-stats-bar .tp-stat-value {
    font-weight: 500;
    color: #111;
}

.tp-stats-bar .tp-stat-value.pos { color: var(--color-pos); }
.tp-stats-bar .tp-stat-value.neg { color: var(--color-neg); }

.tp-stats-divider {
    width: 1px;
    height: 16px;
    background: #ddd;
}

/* ─────────────────────────────────────────
   TIPSKORT (startsida listvyn)
───────────────────────────────────────── */
.tp-tips-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

@media (max-width: 768px) {
    .tp-tips-list {
        grid-template-columns: 1fr;
    }
}

.tp-tip-card {
    display: flex;
    flex-direction: column;
    border: 0.5px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .15s ease;
}

.tp-tip-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
}

.tp-tip-card-graphic {
    width: 100%;
}

.tp-tip-card-graphic svg {
    width: 100%;
    height: auto;
    display: block;
}

.tp-tip-card-body {
    padding: 1rem 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tp-tip-card-ingress {
    font-size: .875rem;
    color: #555;
    line-height: 1.6;
    margin: 0 0 .75rem;
}

.tp-tip-card-meta {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}

.tp-odds-pill {
    font-size: .8125rem;
    font-weight: 500;
    background: #f0f0ee;
    padding: .2rem .6rem;
    border-radius: 6px;
    color: #111;
}

.tp-date {
    font-size: .75rem;
    color: #888;
}

/* ─────────────────────────────────────────
   BADGE
───────────────────────────────────────── */
.tp-badge {
    font-size: .6875rem;
    font-weight: 500;
    padding: .2rem .6rem;
    border-radius: 6px;
    margin-left: auto;
}

.tp-badge.won  { background: var(--color-badge-won-bg);  color: var(--color-badge-won-text);  }
.tp-badge.lost { background: var(--color-badge-lost-bg); color: var(--color-badge-lost-text); }
.tp-badge.open { background: var(--color-badge-open-bg); color: var(--color-badge-open-text); }
.tp-badge.void { background: #f5f5f3; color: #666; }

/* ─────────────────────────────────────────
   INLÄGG (single.php)
───────────────────────────────────────── */
.tp-post-header {
    margin-bottom: 1.5rem;
}

.tp-post-title {
    font-size: 1.5rem;
    font-weight: 500;
    margin: 0 0 .375rem;
    line-height: 1.3;
}

.tp-post-meta-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .8125rem;
    color: #888;
}

.tp-post-meta-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #ccc;
}

.tp-match-graphic {
    margin-bottom: 1.5rem;
    border-radius: 12px;
    overflow: hidden;
}

.tp-match-graphic svg {
    width: 100%;
    height: auto;
    display: block;
}

.tp-ingress {
    font-size: 1rem;
    color: #555;
    line-height: 1.7;
    border-left: 2px solid #ddd;
    padding-left: 1rem;
    margin-bottom: 1.5rem;
}

.tp-post-content {
    font-size: .9375rem;
    line-height: 1.8;
    color: #222;
    margin-bottom: 1.5rem;
}

.tp-post-content p {
    margin: 0 0 1rem;
}

.tp-post-divider {
    border: none;
    border-top: 0.5px solid #e8e8e8;
    margin: 1.5rem 0;
}

/* ─────────────────────────────────────────
   FAKTABLOCK (single.php)
───────────────────────────────────────── */
.tp-fact-block {
    background: #f5f5f3;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
}

.tp-fact-block-title {
    font-size: .6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #888;
    margin: 0 0 .75rem;
}

.tp-fact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}

.tp-fact-item-label {
    font-size: .75rem;
    color: #888;
    display: block;
    margin-bottom: .125rem;
}

.tp-fact-item-value {
    font-size: 1rem;
    font-weight: 500;
    color: #111;
}

.tp-fact-item-value.pos { color: var(--color-pos); }
.tp-fact-item-value.neg { color: var(--color-neg); }

.tp-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 0.5px solid #e0e0e0;
}

.tp-result-note {
    font-size: .8125rem;
    color: #666;
}

/* ─────────────────────────────────────────
   STATISTIKSIDA
───────────────────────────────────────── */
.tp-stat-page-title {
    font-size: 1.5rem;
    font-weight: 500;
    margin: 0 0 1.5rem;
}

.tp-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: .75rem;
    margin-bottom: 2rem;
}

.tp-kpi-card {
    background: #f5f5f3;
    border-radius: 8px;
    padding: .75rem 1rem;
}

.tp-kpi-label {
    font-size: .75rem;
    color: #888;
    margin: 0 0 .25rem;
}

.tp-kpi-value {
    font-size: 1.25rem;
    font-weight: 500;
    color: #111;
    margin: 0;
}

.tp-kpi-value.pos { color: var(--color-pos); }
.tp-kpi-value.neg { color: var(--color-neg); }

.tp-section-label {
    font-size: .6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #888;
    margin: 0 0 .75rem;
}

.tp-stat-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
    margin-bottom: 2rem;
}

.tp-stat-table th {
    font-size: .75rem;
    font-weight: 500;
    color: #888;
    text-align: left;
    padding: 0 .75rem .5rem 0;
    border-bottom: 0.5px solid #e8e8e8;
}

.tp-stat-table th:not(:first-child) { text-align: right; }

.tp-stat-table td {
    padding: .625rem .75rem .625rem 0;
    border-bottom: 0.5px solid #f0f0ee;
    color: #222;
}

.tp-stat-table td:not(:first-child) { text-align: right; }
.tp-stat-table tr:last-child td { border-bottom: none; }

.tp-liga-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: .5rem;
    vertical-align: middle;
}

.tp-bar-section {
    margin-bottom: 2rem;
}

.tp-bar-row {
    display: flex;
    align-items: center;
    gap: .625rem;
    margin-bottom: .5rem;
}

.tp-bar-label {
    font-size: .8125rem;
    color: #888;
    width: 80px;
    text-align: right;
    flex-shrink: 0;
}

.tp-bar-track {
    flex: 1;
    height: 6px;
    background: #eeeeec;
    border-radius: 99px;
    overflow: hidden;
}

.tp-bar-fill {
    height: 100%;
    border-radius: 99px;
    transition: width .4s ease;
}

.tp-bar-value {
    font-size: .8125rem;
    font-weight: 500;
    color: #111;
    width: 40px;
    flex-shrink: 0;
}

.tp-season-list {
    margin-bottom: 2rem;
}

.tp-season-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .625rem 0;
    border-bottom: 0.5px solid #f0f0ee;
}

.tp-season-row:last-child { border-bottom: none; }

.tp-season-name {
    font-size: .875rem;
    color: #222;
}

.tp-season-stats {
    display: flex;
    gap: 1.25rem;
}

.tp-season-stat {
    font-size: .8125rem;
    color: #888;
}

.tp-season-stat strong {
    color: #222;
    font-weight: 500;
}

/* ─────────────────────────────────────────
   RESPONSIVT
───────────────────────────────────────── */
/* ─────────────────────────────────────────
   OVERRIDA KADENCE CONTAINER
───────────────────────────────────────── */
.home .wp-site-blocks,
.home #inner-wrap,
.home #wrapper {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

@media (max-width: 768px) {
    .tp-tip-card { flex-direction: column; }
    .tp-tip-card-graphic { width: 100%; height: 140px; }
    .tp-fact-grid { grid-template-columns: 1fr; }
    .tp-kpi-grid { grid-template-columns: 1fr 1fr; }
    .tp-season-stats { gap: .75rem; }
}
