/* ==========================================
   🟢 INDIVIDUAL MATCH PREVIEW PAGE
   ========================================== */

.match-preview-container {
    max-width: 800px;
    margin: 0 auto;
    padding-top: 30px;
}

/* --- SEO Header Section --- */
.mp-seo-header {
    text-align: center;
    margin-bottom: 40px;
}

.mp-league-name {
    font-size: 12px;
    font-weight: 700;
    color: #ff5e2f;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.mp-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #111;
    margin: 0 0 10px 0;
}

.mp-subtitle {
    color: #666;
    font-size: 1.1rem;
    margin: 0;
}

/* --- Match Card Overrides --- */
.match-preview-container .match-card {
    max-width: 100%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.match-preview-container .match-card-header {
    font-size: 12px;
    padding: 15px;
}

.match-preview-container .match-card-body {
    padding: 20px 0;
}

/* --- Top Scores Section --- */
.mp-top-scores-wrap {
    background: #f8f9fa;
    border-top: 1px solid #eaeaea;
    padding: 20px;
}

.mp-top-scores-title {
    text-align: center;
    margin: 0 0 15px 0;
    font-size: 11px;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 1px;
}

.mp-top-scores-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 300px;
    margin: 0 auto;
}

.match-preview-container .ts-row {
    font-size: 14px;
}

.match-preview-container .ts-score {
    width: 40px;
}

.match-preview-container .ts-bar-wrapper {
    height: 8px;
}

.match-preview-container .ts-prob {
    width: 45px;
}

/* --- CTA Section (Inside Card) --- */
.mp-cta-wrap-inner {
    text-align: center;
    padding: 25px 20px;
    background: #fff;
    border-top: 1px solid #eaeaea;
    border-radius: 0 0 12px 12px;
}

.mp-cta-btn {
    background: #111827;
    color: #ffffff;
    padding: 16px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    display: inline-block;
    width: 100%;
    max-width: 350px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: background 0.2s ease, transform 0.1s ease;
}

.mp-cta-btn:hover {
    background: #334155;
    color: #ffffff;
    transform: translateY(-2px);
}

.mp-cta-disclaimer {
    font-size: 11px;
    color: #999;
    margin-top: 12px;
    margin-bottom: 0;
}

/* =========================================
   RECENT FORM UI (VERTICAL)
   ========================================= */
.mp-form-wrap {
    padding: 0 20px 20px 20px;
    background: #fff;
    border-radius: 0 0 12px 12px;
}

.form-teams-container {
    display: flex;
    justify-content: space-between;
    background: #f8f9fa;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
}

.form-team-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.form-team-name {
    font-size: 11px;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: center;
    margin-bottom: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.form-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}
.form-list {
    max-height: 350px;
    overflow-y: auto;
}

.form-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
    width: 100%;
}

/* --- Text Truncation and Protection --- */
.form-list-info {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.form-list-opp {
    color: #777;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.form-list-score {
    font-weight: 700;
    color: #333;
    flex-shrink: 0;
}

.form-list-date {
    font-size: 9px;
    color: #aaa;
    flex-shrink: 0;
    text-align: right;
}

.form-list-date span {
    display: none;
}

.form-divider {
    width: 1px;
    background: #ddd;
    margin: 0 15px;
}

.f-badge {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.f-w { background-color: #00BFA5; }
.f-d { background-color: #A0AAB5; }
.f-l { background-color: #EF5350; }

/* =========================================
   MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 768px) {
    .match-preview-container {
        padding-top: 20px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .match-preview-container .match-card {
        margin-left: 0;
        margin-right: 0;
    }

    .mp-title { font-size: 1.6rem; }
    .mp-subtitle { font-size: 0.9rem; }

    .form-teams-container {
        flex-direction: column;
        gap: 15px;
    }
    .form-team-col {
        width: 100%;
        align-items: stretch;
    }
    .form-divider {
        width: 100%;
        height: 1px;
        margin: 5px 0;
    }
}

/* =========================================
   BACK LINK COMPONENTS
   ========================================= */
.mp-back-link-wrap {
    margin-bottom: 20px;
}

.mp-back-link {
    color: #666;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.15s ease;
}

.mp-back-link:hover {
    color: #111;
}

/* =========================================
   HEAD-TO-HEAD TALLY & LIST
   ========================================= */
.h2h-tally-container {
    padding: 15px 20px;
    background: #fdfdfd;
    border-bottom: 1px solid #eaeaea;
}
.h2h-tally-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 8px;
}
.h2h-tally-header .t1 { font-weight: 700; color: #42C4D1; }
.h2h-tally-header .draw { color: #999; font-weight: 600; }
.h2h-tally-header .t2 { font-weight: 700; color: #ff5e2f; }

.h2h-tally-bar {
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    width: 100%;
    background: #eee;
}
.h2h-tally-bar .t1-bar { background: #42C4D1; }
.h2h-tally-bar .draw-bar { background: #e0e0e0; }
.h2h-tally-bar .t2-bar { background: #ff5e2f; }

.h2h-tally-footer {
    text-align: center;
    font-size: 10px;
    color: #aaa;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.h2h-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    width: 100%;
    padding: 12px 20px;
    border-bottom: 1px solid #f4f4f4;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}
.h2h-list-row:hover {
    background: #f8f9fa;
}
.h2h-list-row:last-child {
    border-bottom: none;
}

.h2h-comp-info {
    display: flex;
    flex-direction: column;
    width: 35%;
    flex-shrink: 0;
}
.h2h-league {
    font-size: 10px;
    font-weight: 800;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.h2h-season {
    font-size: 9px;
    color: #aaa;
}

.h2h-match-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    min-width: 0;
}
.h2h-teams {
    color: #444;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.h2h-score {
    font-weight: 800;
    color: #111;
    letter-spacing: 1px;
    background: #eee;
    padding: 4px 8px;
    border-radius: 4px;
    flex-shrink: 0;
    margin-left: 10px;
}

/* =========================================
   HISTORICAL HINDSIGHT BLOCK
   ========================================= */
.historical-prediction-wrapper {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.hp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 400px;
    margin-bottom: 8px;
}

.hp-title {
    font-size: 10px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hp-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 9px;
    font-weight: 800;
    padding: 3px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hp-correct {
    background-color: #e6f8f5;
    color: #00BFA5;
}

.hp-incorrect {
    background-color: #fcebeb;
    color: #EF5350;
}

.hp-bar {
    height: 14px;
    max-width: 400px;
    width: 100%;
}

/* =========================================
   DYNAMIC ODDS GRID (EDGE INJECTED)
   ========================================= */
.mp-odds-wrapper {
    margin: 20px 20px 0 20px;
    background: #fff;
    padding-top: 10px;
}

.odds-list-container {
    display: flex;
    flex-direction: column;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    overflow: hidden;
}

.odds-list-header {
    display: flex;
    background: #f8f9fa;
    padding: 10px 15px;
    font-size: 10px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #eaeaea;
}

.odds-list-row {
    display: flex;
    padding: 12px 15px;
    font-size: 12px;
    border-bottom: 1px solid #f4f4f4;
    align-items: center;
    transition: background 0.15s ease;
}

.odds-list-row:hover {
    background: #f8f9fa;
}

.odds-list-row:last-child {
    border-bottom: none;
}

.odds-bookie-col {
    flex: 2;
    font-weight: 600;
    color: #444;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.odds-val-col {
    flex: 1;
    text-align: center;
    font-weight: 700;
    color: #111827;
    background: #f0f0f0;
    margin: 0 4px;
    padding: 6px 0;
    border-radius: 4px;
    font-family: 'Roboto Mono', monospace;
}

.mp-no-odds {
    padding: 16px;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: transparent;
}

/* =========================================
   OPTION C: TERMINAL STYLES
   ========================================= */
.terminal-wrap {
    background: #0f172a;
    border-radius: 12px;
    margin: 20px; /* Restores the padding you wanted */
    border: 1px solid #1e293b;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.terminal-header {
    display: flex;
    background: #1e293b;
    padding: 10px 15px;
    font-size: 9px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.scroll-area {
    max-height: 250px;
    overflow-y: auto;
    padding: 0 15px;
}

/* Custom Slate Navy Scrollbar */
.scroll-area::-webkit-scrollbar { width: 6px; }
.scroll-area::-webkit-scrollbar-track { background: #0f172a; }
.scroll-area::-webkit-scrollbar-thumb { background: #334155; border-radius: 10px; border: 1px solid #0f172a; }
.scroll-area::-webkit-scrollbar-thumb:hover { background: #475569; }
.scroll-area { scrollbar-width: thin; scrollbar-color: #334155 #0f172a; }

.t-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #1e293b;
    align-items: center;
}
.t-row:last-child { border-bottom: none; }
.t-name { flex: 2; color: #94a3b8; font-size: 13px; font-weight: 500; }
.t-val { flex: 1; text-align: center; color: #facc15; font-weight: 700; font-family: monospace; font-size: 14px; }

.sticky-footer {
    position: sticky;
    bottom: 0;
    background: #0f172a;
    padding: 15px;
    border-top: 1px solid #1e293b;
    text-align: center;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.4);
}

.terminal-cta {
    display: block;
    background: #3dd1dc;
    color: #0f172a;
    text-align: center;
    padding: 14px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 800;
    font-size: 13px;
    margin-bottom: 10px;
}