/* LRAL sacensību publiskais skats */

.lrc { max-width: 1100px; margin: 0 auto; }

.lrc-empty {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
    background: #fff;
    border: 2px dashed #e5e7eb;
    border-radius: 14px;
}

/* --------------------------- Saraksts --------------------------- */

.lrc-series { margin-bottom: 44px; }

.lrc-series-title {
    font-size: 1.55rem;
    font-weight: 800;
    color: #1f2937;
    margin: 0 0 18px;
    padding-bottom: 8px;
    border-bottom: 3px solid #73281E;
}

.lrc-year-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}

.lrc-year-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 18px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}

.lrc-year-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 26px rgba(0,0,0,.10);
    border-color: #73281E;
}

.lrc-year-num { font-size: 1.7rem; font-weight: 800; color: #73281E; line-height: 1; }
.lrc-year-meta { font-size: .82rem; color: #64748b; }

/* ------------------------ Viena sacensība ------------------------ */

.lrc-back { margin: 0 0 16px; }
.lrc-back a { color: #73281E; font-weight: 600; text-decoration: none; }
.lrc-back a:hover { text-decoration: underline; }

.lrc-head { margin-bottom: 22px; }

.lrc-title {
    font-size: 2rem;
    font-weight: 800;
    color: #1f2937;
    margin: 0 0 12px;
}

.lrc-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }

.lrc-badge {
    font-size: .8rem;
    font-weight: 600;
    color: #73281E;
    background: #fef3f2;
    border: 1px solid #fecaca;
    padding: 3px 12px;
    border-radius: 20px;
}

.lrc-notes {
    background: #f8fafc;
    border-left: 4px solid #73281E;
    padding: 10px 18px;
    border-radius: 6px;
    color: #475569;
    font-size: .92rem;
}

.lrc-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
}

.lrc-search {
    padding: 9px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    min-width: 220px;
}
.lrc-search:focus { border-color: #73281E; }

.lrc-cat-filter { display: flex; flex-wrap: wrap; gap: 6px; }

/* !important, jo tēmas globālais button stils citādi pārraksta fonu un
   aktīvo cilni nevar atšķirt no neaktīvās. */
.lrc .lrc-cat-btn {
    padding: 6px 14px;
    background: #fff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 20px;
    font-size: .85rem;
    font-weight: 600;
    color: #73281E !important;
    cursor: pointer;
    transition: all .2s;
    text-shadow: none;
}
.lrc .lrc-cat-btn:hover { border-color: #73281E !important; }
.lrc .lrc-cat-btn.active {
    background: #73281E !important;
    color: #fff !important;
    border-color: #73281E !important;
}

.lrc-cat { margin-bottom: 32px; }

.lrc-cat-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #73281E;
    margin: 0 0 10px;
}

.lrc-table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
}

.lrc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    white-space: nowrap;
}

.lrc-table thead th {
    background: #73281E;
    color: #fff;
    padding: 9px 12px;
    font-weight: 600;
    font-size: 12px;
    text-align: right;
    white-space: nowrap;
}
.lrc-table thead th.lrc-rank,
.lrc-table thead th.lrc-call { text-align: left; }

/* Kārtojamās kolonnas */
.lrc-table thead th.lrc-sortable { cursor: pointer; user-select: none; }
.lrc-table thead th.lrc-sortable:hover { background: #8a3a2e; }

.lrc-table thead th.lrc-sortable::after {
    content: '⇅';
    margin-left: 5px;
    opacity: .45;
    font-size: 10px;
}

.lrc-table thead th[data-sort="asc"]::after  { content: '↑'; opacity: 1; }
.lrc-table thead th[data-sort="desc"]::after { content: '↓'; opacity: 1; }

.lrc-table td {
    padding: 7px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    text-align: right;
}

.lrc-table tbody tr:last-child td { border-bottom: none; }
.lrc-table tbody tr:nth-child(even) { background: #f8fafc; }
.lrc-table tbody tr:hover { background: #fef3f2; }

.lrc-table td.lrc-rank { text-align: left; font-weight: 700; color: #94a3b8; width: 42px; }
.lrc-table td.lrc-call { text-align: left; font-weight: 700; }
.lrc-table td.lrc-call a { color: #73281E; text-decoration: none; }
.lrc-table td.lrc-call a:hover { text-decoration: underline; }

.lrc-source { margin-top: 20px; font-size: .85rem; }
.lrc-source a { color: #94a3b8; }

.lrc-op-sub { color: #64748b; margin: 0 0 20px; }

@media (max-width: 768px) {
    .lrc-title { font-size: 1.5rem; }
    .lrc-table { font-size: 12.5px; }
}

/* --------------------------- Statistika --------------------------- */

.lrc-series-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    border-bottom: 3px solid #73281E;
    padding-bottom: 8px;
}
.lrc-series-head .lrc-series-title { margin: 0; border: none; padding: 0; }

.lrc-stats-link {
    flex-shrink: 0;
    font-size: .85rem;
    font-weight: 600;
    color: #73281E;
    text-decoration: none;
    padding: 5px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 20px;
    transition: all .2s;
}
.lrc-stats-link:hover { background: #73281E; color: #fff; border-color: #73281E; }

.lrc-chart {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px 22px;
    margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
}

.lrc-chart-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 16px;
}

.lrc-svg { width: 100%; height: auto; display: block; }

/* Norāde par ritināšanu — redzama tikai šaurajos ekrānos (sk. media query).
   Bāzes noteikumam jābūt PIRMS media query, citādi tas to pārrakstītu. */
.lrc-chart-hint {
    display: none;
    font-size: .75rem;
    color: #94a3b8;
    margin: 2px 0 0;
}

/* Uz telefona grafiks, saspiests līdz ekrāna platumam, kļūst nesalasāms:
   asu teksts samazinās kopā ar SVG. Tāpēc saglabā minimālo platumu un ļauj
   grafikam ritināties horizontāli — teksts paliek normāla izmēra. */
@media (max-width: 700px) {
    .lrc-chart-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -4px;
        padding: 0 4px;
    }
    .lrc-chart-scroll .lrc-svg { min-width: 560px; }
    .lrc-chart-hint { display: block; }
}

.lrc-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 12px;
    font-size: .82rem;
    color: #475569;
}
.lrc-chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lrc-chart-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

.lrc-alltime td { text-align: center; }
.lrc-alltime td.lrc-rank, .lrc-alltime td.lrc-call { text-align: left; }
.lrc-alltime thead th { text-align: center; }
.lrc-alltime thead th.lrc-rank, .lrc-alltime thead th.lrc-call { text-align: left; }

/* --------------------- Operatora statistika --------------------- */

.lrc-op-tabs { margin: 0 0 20px; }

.lrc-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 14px;
    margin: 8px 0 28px;
}

.lrc-tile {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 18px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.lrc-tile-num { font-size: 1.5rem; font-weight: 800; color: #73281E; line-height: 1.1; }
.lrc-tile-lbl { font-size: .78rem; color: #64748b; text-transform: uppercase; letter-spacing: .04em; }

.lrc-op-cats {
    background: #f8fafc;
    border-radius: 8px;
    padding: 10px 16px;
    color: #475569;
    font-size: .9rem;
    margin: 0 0 24px;
}
.lrc-op-cats strong { color: #73281E; }
