/* =========================================================
   Compact Fixtures Timeline Market Page
   Page: resources/views/predictions/pages/market.blade.php
========================================================= */

.sp-timeline-page {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* TOP HEADER */

.sp-timeline-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 0 0 4px;
}

.sp-timeline-heading h2 {
    margin: 0;
    color: #ffffff;
    font-size: 26px;
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.sp-timeline-heading p {
    margin: 7px 0 0;
    color: #d5dce8;
    font-size: 13px;
}

.sp-timeline-market-card {
    min-width: 138px;
    height: 66px;
    padding: 10px 14px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(245, 166, 35, 0.95);
    background:
        linear-gradient(135deg, rgba(245, 166, 35, 0.12), rgba(255, 255, 255, 0.02)),
        #08101a;
    box-shadow:
        0 0 0 1px rgba(245, 166, 35, 0.12),
        0 10px 28px rgba(0, 0, 0, 0.24);
}

.sp-timeline-market-icon {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    font-size: 22px;
    background: rgba(245, 166, 35, 0.13);
}

.sp-timeline-market-card span {
    display: block;
    color: #cdd5e2;
    font-size: 12px;
    font-weight: 800;
}

.sp-timeline-market-card strong {
    display: block;
    margin-top: 2px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 950;
}

/* DATE STRIP */

.sp-timeline-dates {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background:
        linear-gradient(180deg, rgba(15, 23, 35, 0.98), rgba(8, 13, 21, 0.98));
}

.sp-timeline-date-arrow {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    text-decoration: none;
    color: #f5a623;
    font-size: 28px;
    line-height: 1;
    border: 1px solid rgba(245, 166, 35, 0.75);
    background: rgba(245, 166, 35, 0.04);
}

.sp-timeline-date-arrow:hover {
    background: rgba(245, 166, 35, 0.12);
}

.sp-timeline-date-list {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(9, minmax(72px, 1fr));
    gap: 7px;
}

.sp-timeline-date {
    height: 54px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    text-decoration: none;
    color: #ffffff;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.055);
    background:
        linear-gradient(180deg, rgba(19, 29, 44, 0.92), rgba(12, 18, 29, 0.92));
}

.sp-timeline-date span {
    display: block;
    color: #f1f5fb;
    font-size: 10px;
    line-height: 1;
    font-weight: 900;
}

.sp-timeline-date strong {
    display: inline-block;
    margin: 2px 3px 0 0;
    color: #ffffff;
    font-size: 15px;
    line-height: 1;
    font-weight: 950;
}

.sp-timeline-date em {
    display: inline-block;
    color: #ffffff;
    font-size: 11px;
    line-height: 1;
    font-style: normal;
    font-weight: 900;
}

.sp-timeline-date small {
    width: 4px;
    height: 4px;
    display: block;
    margin-top: 5px;
    border-radius: 50%;
    background: #cbd5e1;
}

.sp-timeline-date.active {
    border-color: rgba(245, 166, 35, 1);
    background:
        radial-gradient(circle at center, rgba(245, 166, 35, 0.20), transparent 70%),
        linear-gradient(180deg, rgba(37, 31, 17, 0.98), rgba(17, 19, 24, 0.98));
}

.sp-timeline-date.active span,
.sp-timeline-date.active strong,
.sp-timeline-date.active em {
    color: #f5a623;
}

.sp-timeline-date.active small {
    background: #f5a623;
}

/* MAIN GRID */

.sp-timeline-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 236px;
    gap: 12px;
    align-items: start;
}

.sp-timeline-main {
    min-width: 0;
}

/* TOOLBAR */

.sp-timeline-toolbar {
    min-height: 58px;
    padding: 10px 12px;
    border-radius: 9px 9px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-bottom: 0;
    background:
        linear-gradient(180deg, rgba(14, 22, 34, 0.98), rgba(9, 15, 24, 0.98));
}

.sp-timeline-primary-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sp-timeline-primary-tabs span {
    height: 36px;
    padding: 0 13px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #d7deea;
    font-size: 13px;
    font-weight: 800;
    border: 1px solid transparent;
    background: transparent;
}

.sp-timeline-primary-tabs span.active {
    color: #ffffff;
    border-color: rgba(245, 166, 35, 0.18);
    background:
        linear-gradient(180deg, rgba(245, 166, 35, 0.14), rgba(245, 166, 35, 0.04));
    box-shadow: inset 0 -2px 0 #f5a623;
}

.sp-timeline-primary-tabs span.live-dot {
    color: #ffffff;
}

.sp-timeline-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sp-timeline-search input {
    width: 260px;
    height: 34px;
    padding: 0 12px;
    border-radius: 7px;
    color: #e8eef8;
    outline: none;
    border: 1px solid rgba(255, 255, 255, 0.075);
    background: rgba(255, 255, 255, 0.035);
}

.sp-timeline-search input::placeholder {
    color: #778295;
}

.sp-timeline-search button {
    height: 34px;
    padding: 0 14px;
    border-radius: 7px;
    cursor: pointer;
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.035);
}

.sp-timeline-search button:hover {
    color: #111;
    border-color: #f5a623;
    background: #f5a623;
}

/* SINGLE MARKET CHIP */

.sp-timeline-market-strip {
    min-height: 48px;
    padding: 9px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.07);
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    background:
        linear-gradient(180deg, rgba(12, 19, 30, 0.98), rgba(9, 14, 22, 0.98));
}

.sp-timeline-chip {
    height: 30px;
    padding: 0 13px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.035);
}

.sp-timeline-chip.active {
    color: #f5a623;
    border-color: rgba(245, 166, 35, 0.85);
    background: rgba(245, 166, 35, 0.07);
}

/* TABLE CARD */

.sp-timeline-table-card {
    overflow: hidden;
    border-radius: 0 0 9px 9px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-top: 0;
    background:
        linear-gradient(180deg, rgba(13, 20, 31, 0.98), rgba(8, 12, 20, 0.98));
}

/* LEAGUE */

.sp-timeline-league + .sp-timeline-league {
    border-top: 1px solid rgba(255, 255, 255, 0.075);
}

.sp-timeline-league-head {
    height: 38px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background:
        linear-gradient(180deg, rgba(31, 40, 52, 0.78), rgba(20, 28, 39, 0.78));
}

.sp-timeline-league-name {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
}

.sp-timeline-league-name img,
.sp-timeline-league-name > span {
    width: 24px;
    height: 24px;
    border-radius: 3px;
    object-fit: contain;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.06);
}

.sp-timeline-league-name strong {
    min-width: 0;
    color: #ffffff;
    font-size: 13px;
    font-weight: 950;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-timeline-league-name em {
    color: #f5a623;
    font-size: 14px;
    font-style: normal;
}

.sp-timeline-league-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.sp-timeline-league-actions span {
    color: #9aa6b8;
    font-size: 12px;
    font-weight: 800;
}

.sp-timeline-league-actions a {
    color: #f5a623;
    text-decoration: none;
    font-size: 12px;
    font-weight: 950;
}

.sp-timeline-league-actions button {
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 5px;
    cursor: pointer;
    color: #cbd5e1;
    background: transparent;
}

/* ROWS */

.sp-timeline-row {
    display: grid;
    align-items: center;
}

.sp-timeline-row-1x2 {
    grid-template-columns: 74px minmax(430px, 1fr) 92px 92px 92px 80px;
}

.sp-timeline-row-simple {
    grid-template-columns: 74px minmax(430px, 1fr) 140px 100px 80px;
}

.sp-timeline-table-head {
    height: 34px;
    padding: 0 12px;
    color: #7f8ba0;
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(8, 13, 22, 0.98);
}

.sp-timeline-table-head > div {
    padding: 0 6px;
}

.sp-timeline-table-head > div:nth-child(n+3) {
    text-align: center;
}

.sp-timeline-match {
    min-height: 46px;
    padding: 0 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.055);
    background: rgba(255, 255, 255, 0.012);
}

.sp-timeline-match:hover {
    background: rgba(255, 255, 255, 0.035);
}

/* TIME COLUMN */

.sp-timeline-time {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sp-timeline-time strong {
    min-width: 42px;
    height: 23px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 12px;
    font-weight: 950;
    line-height: 1;
}

.sp-timeline-time strong.scheduled {
    color: #ffffff;
    background: transparent;
}

.sp-timeline-time strong.finished {
    color: #52e88d;
    background: rgba(34, 197, 94, 0.16);
}

.sp-timeline-time strong.live {
    color: #52c8ff;
    background: rgba(14, 165, 233, 0.18);
}

.sp-timeline-time strong.half {
    color: #f5a623;
    background: rgba(245, 166, 35, 0.18);
}

/* MATCHUP */

.sp-timeline-matchup {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(170px, 1fr) 64px minmax(170px, 1fr);
    align-items: center;
    gap: 12px;
    color: #ffffff;
    text-decoration: none;
}

.sp-timeline-matchup .team {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sp-timeline-matchup .team.home {
    justify-content: flex-end;
    text-align: right;
}

.sp-timeline-matchup .team.away {
    justify-content: flex-start;
    text-align: left;
}

.sp-timeline-matchup .team img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex: 0 0 auto;
}

.sp-timeline-matchup .team em {
    min-width: 0;
    color: #edf3ff;
    font-size: 13px;
    font-style: normal;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* CENTER: VS OR SCORE */

.sp-timeline-matchup .center-result {
    min-width: 58px;
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    color: #aeb8c8;
    font-size: 12px;
    font-weight: 950;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

.sp-timeline-matchup .center-result.vs {
    color: #aeb8c8;
    background: transparent;
}

.sp-timeline-matchup .center-result.score {
    color: #f5a623;
    background: rgba(245, 166, 35, 0.13);
}

/* ODDS + TIP */

.sp-timeline-odd {
    width: calc(100% - 12px);
    height: 32px;
    margin: 0 auto;
    border-radius: 6px;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 13px;
    font-weight: 950;
    border: 1px solid rgba(255, 255, 255, 0.075);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.025));
}

.sp-timeline-tip {
    width: calc(100% - 10px);
    height: 30px;
    margin: 0 auto;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #bcffd4;
    font-size: 12px;
    font-weight: 950;
    background: rgba(34, 197, 94, 0.22);
    border: 1px solid rgba(34, 197, 94, 0.26);
}

.sp-timeline-tip.tip-x,
.sp-timeline-tip.tip-1x,
.sp-timeline-tip.tip-x2,
.sp-timeline-tip.tip-12 {
    color: #111827;
    background: linear-gradient(135deg, #f5a623, #ffcf5a);
    border-color: rgba(245, 166, 35, 0.9);
}

.sp-timeline-tip.tip-2 {
    color: #9edcff;
    background: rgba(14, 165, 233, 0.20);
    border-color: rgba(14, 165, 233, 0.3);
}

/* EMPTY */

.sp-timeline-empty {
    padding: 32px 16px;
    color: #98a4b7;
    font-size: 14px;
    font-weight: 850;
    text-align: center;
}

/* RIGHT SIDEBAR */

.sp-timeline-side {
    position: sticky;
    top: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sp-timeline-side-card {
    padding: 14px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    background:
        radial-gradient(circle at top right, rgba(245, 166, 35, 0.10), transparent 42%),
        linear-gradient(180deg, rgba(16, 23, 34, 0.98), rgba(10, 14, 22, 0.98));
}

.sp-side-title {
    color: #f5a623;
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sp-side-date {
    padding-top: 12px;
}

.sp-side-date-nav {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) 26px;
    gap: 8px;
    align-items: center;
}

.sp-side-date-nav a {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    text-decoration: none;
    color: #f5a623;
    border: 1px solid rgba(245, 166, 35, 0.20);
    background: rgba(255, 255, 255, 0.03);
}

.sp-side-date-nav strong {
    color: #ffffff;
    font-size: 18px;
    line-height: 1;
    text-align: center;
}

.sp-side-date span {
    display: block;
    margin-top: 8px;
    color: #c4cedd;
    font-size: 12px;
    text-align: center;
}

.sp-side-list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sp-side-list div {
    min-height: 34px;
    padding: 8px 10px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.sp-side-list span {
    min-width: 0;
    color: #b8c2d2;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-side-list strong {
    color: #ffffff;
    font-size: 13px;
    font-weight: 950;
}

/* RESPONSIVE */

@media (max-width: 1250px) {
    .sp-timeline-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .sp-timeline-side {
        position: static;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .sp-timeline-top {
        align-items: stretch;
        flex-direction: column;
    }

    .sp-timeline-market-card {
        width: 100%;
    }

    .sp-timeline-date-list {
        display: flex;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .sp-timeline-date {
        min-width: 86px;
    }

    .sp-timeline-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .sp-timeline-search {
        width: 100%;
    }

    .sp-timeline-search input {
        width: 100%;
        flex: 1;
    }

    .sp-timeline-table-card {
        overflow-x: auto;
    }

    .sp-timeline-row-1x2 {
        min-width: 900px;
    }

    .sp-timeline-row-simple {
        min-width: 760px;
    }

    .sp-timeline-side {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .sp-timeline-heading h2 {
        font-size: 22px;
    }

    .sp-timeline-heading p {
        font-size: 12px;
    }

    .sp-timeline-primary-tabs span {
        height: 32px;
        padding: 0 10px;
        font-size: 12px;
    }

    .sp-timeline-market-strip {
        overflow-x: auto;
    }
}