/* ============================================================
   MatchOn — betslip fixture picker
   Follows the existing betslip palette: #1565c0 blue, #c5cfe8 borders,
   7px radii, so it reads as part of the slip rather than a bolt-on.
   ============================================================ */

.fxp {
    border: 2px solid #c5cfe8;
    border-radius: 10px;
    background: #f7f9ff;
    padding: 0.6rem;
    margin-bottom: 1rem;
}

/* ── toolbar ─────────────────────────────────────────────── */

.fxp__bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.fxp__title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1565c0;
    margin-right: auto;
}

.fxp__league,
.fxp__search {
    font-size: 0.85rem;
    padding: 0.35rem 0.5rem;
    border: 2px solid #c5cfe8;
    border-radius: 7px;
    background: #fff;
    color: #333;
}

.fxp__league { max-width: 200px; }

.fxp__search {
    flex: 1 1 160px;
    min-width: 120px;
}

.fxp__league:focus,
.fxp__search:focus {
    outline: none;
    border-color: #1565c0;
}

.fxp__refresh {
    border: 2px solid #c5cfe8;
    border-radius: 7px;
    background: #fff;
    color: #1565c0;
    cursor: pointer;
    padding: 0.35rem 0.6rem;
    font-size: 0.85rem;
}

.fxp__refresh:hover { background: #e8f0fe; }

/* ── status lines ────────────────────────────────────────── */

.fxp__notice {
    margin: 0 0 0.4rem;
    padding: 0.4rem 0.55rem;
    border-left: 3px solid #f9a825;
    border-radius: 0;
    background: #fff8e1;
    color: #7a5b00;
    font-size: 0.78rem;
}

.fxp__status {
    font-size: 0.76rem;
    color: #7a86a8;
    margin-bottom: 0.4rem;
    min-height: 1rem;
}

.fxp__status a { color: #1565c0; }

/* ── list ────────────────────────────────────────────────── */

.fxp__list {
    max-height: 320px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.fxp__row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    grid-template-areas:
        "when   prices actions"
        "teams  prices actions"
        "drawer drawer drawer";
    align-items: center;
    gap: 0.15rem 0.6rem;
    background: #fff;
    border: 1px solid #dde5f5;
    border-radius: 8px;
    padding: 0.45rem 0.6rem;
}

.fxp__row.is-applied {
    border-color: #1565c0;
    background: #f0f6ff;
}

.fxp__when {
    grid-area: when;
    font-size: 0.72rem;
    color: #7a86a8;
}

.fxp__live {
    display: inline-block;
    background: #c62828;
    color: #fff;
    border-radius: 4px;
    padding: 0 0.3rem;
    font-size: 0.66rem;
    font-weight: 700;
    margin-left: 0.2rem;
}

.fxp__teams {
    grid-area: teams;
    font-size: 0.88rem;
    color: #263238;
    line-height: 1.25;
}

.fxp__team { font-weight: 600; }

.fxp__v {
    color: #9aa4c0;
    margin: 0 0.35rem;
    font-size: 0.78rem;
}

/* ── price buttons ───────────────────────────────────────── */

.fxp__prices {
    grid-area: prices;
    display: flex;
    gap: 0.25rem;
}

.fxp__price {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 58px;
    padding: 0.25rem 0.3rem;
    border: 2px solid #c5cfe8;
    border-radius: 7px;
    background: #fff;
    cursor: pointer;
    line-height: 1.15;
}

.fxp__price:hover:not(:disabled) {
    border-color: #1565c0;
    background: #e8f0fe;
}

.fxp__price:focus-visible {
    outline: 2px solid #1565c0;
    outline-offset: 1px;
}

.fxp__price.is-empty {
    cursor: default;
    opacity: 0.45;
}

.fxp__oc {
    font-size: 0.64rem;
    font-weight: 700;
    color: #7a86a8;
}

.fxp__val {
    font-size: 0.92rem;
    font-weight: 700;
    color: #1565c0;
}

.fxp__book {
    font-size: 0.6rem;
    color: #9aa4c0;
    max-width: 56px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── row actions ─────────────────────────────────────────── */

.fxp__actions {
    grid-area: actions;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.fxp__fill {
    font-size: 0.76rem;
    padding: 0.3rem 0.7rem;
    border: none;
    border-radius: 7px;
    background: #1565c0;
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
}

.fxp__fill:hover { background: #0d47a1; }

.fxp__row.is-applied .fxp__fill { background: #2e7d32; }

.fxp__books {
    font-size: 0.68rem;
    padding: 0.2rem 0.5rem;
    border: 1px solid #c5cfe8;
    border-radius: 6px;
    background: #fff;
    color: #7a86a8;
    cursor: pointer;
    white-space: nowrap;
}

.fxp__books:hover { color: #1565c0; border-color: #1565c0; }

/* ── bookmaker drawer ────────────────────────────────────── */

.fxp__drawer {
    grid-area: drawer;
    margin-top: 0.45rem;
    padding-top: 0.45rem;
    border-top: 1px solid #e3e9f7;
}

.fxp__drawer-msg {
    margin: 0;
    font-size: 0.76rem;
    color: #7a86a8;
}

.fxp__books-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.76rem;
}

.fxp__books-table th {
    text-align: left;
    color: #7a86a8;
    font-weight: 600;
    padding: 0.2rem 0.3rem;
    border-bottom: 1px solid #e3e9f7;
}

.fxp__books-table th:not(:first-child),
.fxp__books-table td:not(:first-child) {
    text-align: center;
    width: 56px;
}

.fxp__books-table td {
    padding: 0.2rem 0.3rem;
    color: #37474f;
    border-bottom: 1px solid #f2f5fc;
}

/* ── narrow screens ──────────────────────────────────────── */

@media (max-width: 700px) {
    .fxp__row {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "when    actions"
            "teams   actions"
            "prices  prices"
            "drawer  drawer";
    }

    .fxp__prices { margin-top: 0.35rem; }
    .fxp__price  { flex: 1; min-width: 0; }
    .fxp__title  { width: 100%; margin-bottom: 0.2rem; }
    .fxp__league { max-width: none; flex: 1 1 auto; }
}
