/* market-trends.css — Betting Market Trends Charts */

/* ========================================
   GLOBAL OVERRIDES
   Reset front.css globals that break this page
   ======================================== */
.market-trends-page button {
    background-color: transparent !important;
    margin-bottom: 0 !important;
}
.market-trends-page button:hover {
    background-color: transparent !important;
}

/* ========================================
   PAGE LAYOUT
   ======================================== */
.market-trends-page {
    padding: 15px 20px;
}

/* ========================================
   CONTROLS ROW (Sport tabs)
   ======================================== */
.mt-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* ========================================
   FILTER CONTROLS
   ======================================== */
.mt-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 20px;
    padding: 12px 16px;
    background-color: var(--tmb-gray-100);
    border: 1px solid var(--tmb-gray-300);
    border-radius: 4px;
}

.mt-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mt-filter-group label {
    font-size: 11px;
    font-weight: bold;
    color: var(--tmb-gray-600);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mt-filter-group select {
    font-size: 13px;
    padding: 5px 10px;
    min-width: 140px;
    height: 34px;
}

/* Range slider styling */
.mt-filter-group input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 200px;
    height: 6px;
    border-radius: 3px;
    background: var(--tmb-gray-300);
    outline: none;
    margin-top: 4px;
}

.mt-filter-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--tmb-brand-dark);
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px var(--tmb-black-30);
}

.mt-filter-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--tmb-brand-dark);
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px var(--tmb-black-30);
}

/* Slider value highlights */
.mt-filter-group label span {
    font-weight: 900;
    color: var(--tmb-brand-dark);
}

/* ========================================
   CHARTS
   ======================================== */
.mt-charts-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.mt-chart-wrap {
    position: relative;
    width: 100%;
    height: 350px;
}

.mt-chart-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--tmb-gray-900);
    margin: 0 0 8px 0;
}

.mt-chart-wrap canvas {
    width: 100% !important;
    height: 300px !important;
}

/* Each chart's title carries the colour of its betting line
   (market-trends.js: the total purple, the spread blue). */
.mt-chart-title {
    border-left: 4px solid var(--tmb-gray-400);
    padding-left: 8px;
}

.mt-chart-totals .mt-chart-title {
    border-left-color: var(--tmb-purple);
}

.mt-chart-lines .mt-chart-title {
    border-left-color: var(--tmb-blue);
}

/* Loading overlay */
.mt-loading {
    text-align: center;
    padding: 40px;
    color: var(--tmb-gray-600);
    font-size: 14px;
}

/* No data message */
.mt-no-data {
    color: var(--tmb-gray-600);
    padding: 20px;
    font-size: 14px;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 767px) {
    /* 16px edge spacing (matches nav header standard) */
    .content-wrapper > .market-trends-page {
        padding: 10px 16px !important;
    }
}

/* Container-query version: everything else here is inside .tmb-cq-root
   (see market-trends-body.php), so it responds to THIS WIDGET'S width on
   /my-dash/, not just a narrow browser viewport. */
@container (max-width: 767px) {
    .mt-filters {
        flex-direction: column;
        gap: 12px;
    }

    .mt-filter-group {
        width: 100%;
    }

    .mt-filter-group input[type="range"] {
        width: 100%;
    }

    .mt-filter-group select {
        width: 100%;
    }

    .mt-chart-wrap {
        height: 280px;
    }

    .mt-chart-wrap canvas {
        height: 240px !important;
    }

    .mt-chart-title {
        font-size: 13px;
    }

}
