/* ATS Stats 80% Club Widget v1.7.0 — Light Theme + Mobile Optimized */
.ats80-wrap {
    font-family: Arial, sans-serif;
    background: #f8f9fa;
    padding: 16px;
    border: 1px solid #dde2e6;
    border-radius: 8px;
    max-width: 100%;
    box-sizing: border-box;
}
.ats80-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 6px;
}
.ats80-header-left { display: flex; align-items: center; gap: 10px; }
.ats80-badge {
    background: #1a7a3c;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 3px;
    letter-spacing: .5px;
    text-transform: uppercase;
}
.ats80-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.ats80-subtitle { font-size: 11px; color: #999; }
.ats80-league-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.ats80-ltab {
    font-size: 12px;
    font-weight: 700;
    padding: 5px 14px;
    border: 1px solid #cdd2d7;
    border-radius: 3px;
    cursor: pointer;
    background: #fff;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .5px;
    transition: background .15s, color .15s, border-color .15s;
}
.ats80-ltab.active, .ats80-ltab:hover {
    background: #1a7a3c;
    color: #fff;
    border-color: #1a7a3c;
}
.ats80-stabs {
    display: flex;
    gap: 5px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.ats80-stab {
    font-size: 11px;
    padding: 3px 10px;
    border: 1px solid #dde2e6;
    border-radius: 3px;
    cursor: pointer;
    background: #fff;
    color: #999;
    text-transform: uppercase;
    letter-spacing: .4px;
    transition: color .15s, border-color .15s, background .15s;
}
.ats80-stab.active, .ats80-stab:hover {
    background: #e8f5ee;
    color: #1a7a3c;
    border-color: #1a7a3c;
}
.ats80-legend { display: flex; gap: 14px; margin-bottom: 8px; }
.ats80-leg { font-size: 11px; display: flex; align-items: center; gap: 5px; color: #999; }
.ats80-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.ats80-league  { display: none; }
.ats80-league.active  { display: block; }
.ats80-section { display: none; }
.ats80-section.active { display: block; }

/* ── Table — desktop ── */
.ats80-table-wrap {
    background: #fff;
    border: 1px solid #dde2e6;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}
.ats80-t-head {
    display: grid;
    grid-template-columns: 1fr 90px 90px 90px;
    padding: 8px 12px;
    background: #1a7a3c;
    font-size: 10px;
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    gap: 6px;
}
.ats80-t-head span:not(:first-child) { text-align: center; }
.ats80-t-row {
    display: grid;
    grid-template-columns: 1fr 90px 90px 90px;
    padding: 8px 12px;
    border-bottom: 1px solid #edf0f2;
    align-items: center;
    font-size: 13px;
    gap: 6px;
    background: #fff;
    transition: background .1s;
}
.ats80-t-row:nth-child(even) { background: #f4f7f5; }
.ats80-t-row:last-child { border-bottom: none; }
.ats80-t-row:hover { background: #e8f5ee; }
.ats80-trend { color: #2a2a2a; line-height: 1.4; }
.ats80-rec   { text-align: center; font-size: 13px; font-weight: 700; white-space: nowrap; }
.ats80-green { color: #1a7a3c; }
.ats80-blue  { color: #185fa5; }
.ats80-gold  { color: #854f0b; }
.ats80-na    { color: #ccc; font-weight: 400; }
.ats80-empty { padding: 14px 12px; color: #aaa; font-size: 12px; font-style: italic; }

/* Footer CTA */
.ats80-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #dde2e6;
    flex-wrap: wrap;
    gap: 8px;
}
.ats80-footer-note { font-size: 12px; color: #666; }
.ats80-footer-note strong { color: #1a1a1a; }
.ats80-cta-btn {
    background: #1a7a3c;
    color: #fff !important;
    border: 2px solid #1a7a3c;
    border-radius: 3px;
    padding: 9px 22px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: .5px;
    text-decoration: none !important;
    display: inline-block;
    transition: background .15s;
}
.ats80-cta-btn:hover {
    background: #15612f;
    border-color: #15612f;
    color: #fff !important;
    text-decoration: none !important;
}

/* ── Mobile: stack records below trend text ── */
@media (max-width: 640px) {

    .ats80-wrap { padding: 12px; }
    .ats80-title { font-size: 14px; }

    /* Hide the desktop column header */
    .ats80-t-head { display: none; }

    /* Each row becomes a card */
    .ats80-t-row {
        display: flex;
        flex-direction: column;
        padding: 10px 12px;
        border-bottom: 1px solid #dde2e6;
        background: #fff;
    }
    .ats80-t-row:nth-child(even) { background: #f4f7f5; }
    .ats80-t-row:last-child { border-bottom: none; }

    /* Trend text full width, readable size */
    .ats80-trend {
        display: block;
        font-size: 13px;
        line-height: 1.5;
        color: #1a1a1a;
        margin-bottom: 8px;
        width: 100%;
    }

    /* Records as coloured badges in a row */
    .ats80-rec {
        display: inline-flex;
        align-items: center;
        font-size: 12px;
        font-weight: 700;
        padding: 3px 8px;
        border-radius: 3px;
        margin-right: 6px;
        margin-bottom: 2px;
        white-space: nowrap;
        text-align: left;
    }
    .ats80-green { color: #1a7a3c; background: #e8f5ee; }
    .ats80-blue  { color: #185fa5; background: #e8f0fa; }
    .ats80-gold  { color: #854f0b; background: #fdf3e3; }

    /* Label prefix shown only on mobile */
    .ats80-rec::before {
        font-size: 10px;
        font-weight: 400;
        margin-right: 4px;
        text-transform: uppercase;
        letter-spacing: .3px;
        opacity: .7;
    }
    .ats80-green::before { content: "ATS "; }
    .ats80-blue::before  { content: "SU "; }
    .ats80-gold::before  { content: "O/U "; }

    /* Hide dashes on mobile */
    .ats80-na { display: none; }

    /* Tabs smaller on mobile */
    .ats80-ltab {
        font-size: 11px;
        padding: 4px 10px;
    }
    .ats80-stab {
        font-size: 10px;
        padding: 3px 8px;
    }

    /* Footer stacks vertically, button full width */
    .ats80-footer {
        flex-direction: column;
        align-items: stretch;
    }
    .ats80-cta-btn {
        text-align: center;
        width: 100%;
        padding: 12px;
        font-size: 13px;
    }
}
