/* =====================================================
   Prediction Accuracy Page — accuracy.css
   ===================================================== */

.dsn-main { background: #111827; min-height: 60vh; }

/* Breadcrumb (reuses pl-breadcrumb from league.css) */
.pl-breadcrumb {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: #6b7280; padding: 20px 0 0;
}
.pl-breadcrumb a { color: #6b7280; text-decoration: none; }
.pl-breadcrumb a:hover { color: #e8192c; }
.pl-breadcrumb span { color: #d1d5db; }

.acc-title {
    font-size: 22px; font-weight: 700; color: #f9fafb;
    margin: 20px 0 24px;
}

/* Summary row */
.acc-summary {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.acc-stat {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 10px;
    padding: 16px 20px;
    text-align: center;
    min-width: 120px;
    flex: 1;
}
.acc-stat--big {
    background: rgba(232,25,44,.08);
    border-color: rgba(232,25,44,.25);
}
.acc-stat__val {
    display: block;
    font-size: 28px; font-weight: 800; color: #f9fafb;
    line-height: 1.1;
}
.acc-stat--big .acc-stat__val { color: #e8192c; font-size: 36px; }
.acc-stat__val--green { color: #22c55e; }
.acc-stat__val--red   { color: #e8192c; }
.acc-stat__label {
    display: block;
    font-size: 12px; color: #6b7280;
    text-transform: uppercase; letter-spacing: .05em;
    margin-top: 4px;
}

/* Accuracy bar */
.acc-bar-wrap {
    height: 6px;
    background: #1f2937;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 28px;
}
.acc-bar {
    height: 100%;
    background: linear-gradient(90deg, #e8192c, #f59e0b);
    border-radius: 3px;
    transition: width .6s ease;
}

/* Cards */
.acc-card {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
}
.acc-card__title {
    font-size: 13px; font-weight: 700; color: #f9fafb;
    padding: 12px 16px;
    border-bottom: 1px solid #374151;
}

/* By-league table */
.acc-table {
    width: 100%;
    border-collapse: collapse;
}
.acc-table th {
    font-size: 11px; color: #4b5563; font-weight: 600;
    padding: 8px 16px 6px; text-align: left;
    text-transform: uppercase; letter-spacing: .04em;
}
.acc-table td { padding: 10px 16px; font-size: 13px; color: #9ca3af; }
.acc-table tr { border-bottom: 1px solid rgba(255,255,255,.04); }
.acc-table tr:last-child { border-bottom: none; }
.acc-table th:first-child,
.acc-table td:first-child { color: #d1d5db; font-weight: 500; }
.acc-league-bar-wrap {
    display: flex; align-items: center; gap: 8px;
}
.acc-league-bar-wrap span { font-size: 13px; font-weight: 700; color: #f9fafb; min-width: 36px; }
.acc-league-bar {
    height: 6px; flex: 1; max-width: 120px;
    background: #e8192c; border-radius: 3px;
}

/* Recent predictions list */
.acc-list { padding: 4px 0; }
.acc-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,.04);
    min-height: 52px;
}
.acc-row:last-child { border-bottom: none; }
.acc-row--ok  { background: rgba(34,197,94,.03); }
.acc-row--bad { background: rgba(232,25,44,.03); }

.acc-row__badge {
    width: 28px; height: 28px; border-radius: 8px;
    font-size: 14px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.acc-badge--ok  { background: rgba(34,197,94,.15); color: #22c55e; }
.acc-badge--bad { background: rgba(232,25,44,.12); color: #e8192c; }

.acc-row__match { flex: 1; min-width: 0; overflow: hidden; }

.acc-row__score {
    flex-shrink: 0;
    width: 52px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}
.acc-row__score-val {
    font-size: 15px;
    font-weight: 800;
    color: #f9fafb;
    letter-spacing: .04em;
    line-height: 1;
}
.acc-row__score-label {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #4b5563;
}
.acc-row__teams {
    font-size: 13px; font-weight: 600; color: #f3f4f6;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.acc-row__meta { font-size: 11px; color: #4b5563; margin-top: 2px; }

.acc-row__preds {
    display: flex; gap: 0; flex-shrink: 0;
}
.acc-pred {
    width: 320px; text-align: center; padding: 0 20px;
    overflow: hidden;
}
.acc-pred + .acc-pred {
    border-left: 1px solid rgba(255,255,255,.05);
}
.acc-pred__label {
    display: block; font-size: 10px; color: #4b5563;
    text-transform: uppercase; letter-spacing: .04em;
    white-space: nowrap;
}
.acc-pred__val {
    display: block;
    font-size: 12px; font-weight: 600; color: #9ca3af;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}
.acc-pred__val em { color: #6b7280; font-style: normal; font-size: 11px; }
.acc-pred--actual .acc-pred__val { color: #d1d5db; }

/* Outcome type badges */
.acc-outcome {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 3px;
}
.acc-outcome--win   { background: rgba(34,197,94,.12);  color: #22c55e; }
.acc-outcome--draw  { background: rgba(234,179,8,.12);  color: #facc15; }
.acc-outcome--over  { background: rgba(59,130,246,.12); color: #60a5fa; }
.acc-outcome--under { background: rgba(139,92,246,.12); color: #a78bfa; }

/* Pagination */
.acc-pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 4px; padding: 14px 16px;
    border-top: 1px solid rgba(255,255,255,.06);
}
.acc-page-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 34px; height: 34px; padding: 0 10px;
    border-radius: 6px; font-size: 13px; font-weight: 500;
    color: #9ca3af; text-decoration: none;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.07);
    transition: all .15s;
}
.acc-page-btn:hover { color: #f1f5f9; background: rgba(255,255,255,.08); }
.acc-page-btn--active { background: rgba(232,25,44,.12); border-color: #e8192c; color: #e8192c; font-weight: 700; }
.acc-page-btn--disabled { opacity: .35; pointer-events: none; }
.acc-page-ellipsis { color: #4b5563; font-size: 13px; padding: 0 4px; }

/* Empty state */
.acc-empty {
    text-align: center; color: #6b7280;
    font-size: 14px; padding: 60px 0;
}

/* ── Filter bar ── */
.acc-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #1a1d2e;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
}
.acc-filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
}
.acc-filter-label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .05em;
    white-space: nowrap;
}
/* Custom select wrapper — hides native arrow, shows SVG */
.acc-filter-select-wrap {
    position: relative;
}
.acc-filter-select-wrap::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") center/contain no-repeat;
    pointer-events: none;
}
.acc-filter-select {
    appearance: none;
    -webkit-appearance: none;
    background: #111827;
    border: 1px solid rgba(255,255,255,.1);
    color: #e2e8f0;
    font-size: 13px;
    font-family: inherit;
    padding: 7px 32px 7px 12px;
    border-radius: 7px;
    cursor: pointer;
    transition: border-color .15s;
    min-width: 130px;
}
.acc-filter-select:hover { border-color: rgba(255,255,255,.2); }
.acc-filter-select:focus { border-color: #e8192c; outline: none; }
.acc-filter-select option { background: #111827; color: #e2e8f0; }
.acc-filter-divider {
    width: 1px;
    height: 24px;
    background: rgba(255,255,255,.08);
    flex-shrink: 0;
}
.acc-filter-clear-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #9ca3af;
    text-decoration: none;
    padding: 6px 10px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 6px;
    transition: all .15s;
    white-space: nowrap;
}
.acc-filter-clear-link:hover { color: #f1f5f9; border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.04); }
.acc-filter-count {
    margin-left: auto;
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .acc-filter-bar { gap: 8px; padding: 10px 12px; }
    .acc-filter-label { display: none; }
    .acc-filter-select { min-width: 0; font-size: 12px; padding: 6px 28px 6px 10px; }
    .acc-filter-divider { display: none; }
    .acc-filter-count { margin-left: 0; width: 100%; order: 10; color: #4b5563; }
}

/* ── 14-day trend chart ─────────────────────── */
.acc-trend {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    padding: 8px 0 4px;
    overflow-x: auto;
}
.acc-trend__col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 36px;
    cursor: default;
}
.acc-trend__pct {
    font-size: 9px;
    color: #6b7280;
    font-weight: 600;
}
.acc-trend__bar {
    width: 100%;
    border-radius: 3px 3px 0 0;
    min-height: 4px;
    transition: opacity .2s;
}
.acc-trend__bar--good { background: #22c55e; }
.acc-trend__bar--ok   { background: #f59e0b; }
.acc-trend__bar--bad  { background: #ef4444; }
.acc-trend__col:hover .acc-trend__bar { opacity: .75; }
.acc-trend__date {
    font-size: 9px;
    color: #4b5563;
    white-space: nowrap;
}

/* ── By-market grid ─────────────────────────── */
.acc-market-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 8px 0;
}
.acc-market {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 80px;
    flex: 1;
}
.acc-market__ring {
    width: 60px; height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    border: 3px solid;
}
.acc-market__ring--good { border-color: #22c55e; color: #22c55e; }
.acc-market__ring--ok   { border-color: #f59e0b; color: #f59e0b; }
.acc-market__ring--bad  { border-color: #ef4444; color: #ef4444; }
.acc-market__name {
    font-size: 11px;
    color: #e2e8f0;
    font-weight: 600;
    text-align: center;
}
.acc-market__sub {
    font-size: 10px;
    color: #6b7280;
}

@media (max-width: 640px) {
    .acc-summary { gap: 8px; }
    .acc-stat { min-width: 80px; padding: 12px; }
    .acc-stat__val { font-size: 22px; }
    .acc-stat--big .acc-stat__val { font-size: 28px; }
    .acc-row__preds { flex-direction: column; gap: 6px; }
    .acc-pred { width: auto; min-width: 0; text-align: left; padding: 0; }
    .acc-pred + .acc-pred { border-left: none; border-top: 1px solid rgba(255,255,255,.05); padding-top: 6px; }
    .acc-row__score { width: auto; flex-direction: row; gap: 6px; align-self: auto; }
    .acc-row__score-label { font-size: 9px; }
}
@media (max-width: 420px) {
    .acc-title { font-size: 18px; }
    .acc-stat { min-width: 70px; padding: 10px; }
    .acc-stat__val { font-size: 18px; }
    .acc-stat--big .acc-stat__val { font-size: 26px; }
    .acc-row { padding: 10px 12px; gap: 10px; }
    .acc-row__teams { font-size: 12px; }
    .acc-row__badge { width: 24px; height: 24px; font-size: 12px; }
    .acc-filter-bar { padding: 8px 10px; gap: 6px; }
    .acc-filter-select { font-size: 11px; min-width: 0; padding: 5px 26px 5px 8px; }
}
