/* =====================================================
   Тото Последно Теглене — Red/White/Grey Theme
   Съвпада с efbet365 стил
   ===================================================== */

.tl-wrap {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    width: 100%;
    color: #1a1a1a;
}

/* ── Header ── */
.tl-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.tl-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.tl-badge {
    background: #c0392b;
    color: #ffffff;
    font-size: .72rem;
    font-weight: 800;
    padding: 5px 14px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: .6px;
    white-space: nowrap;
}
.tl-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #1a1a1a;
}

/* ── Drawing card ── */
.tl-drawing {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,.07);
}
.tl-draw-label {
    background: #f5f5f5;
    color: #555;
    font-size: .75rem;
    font-weight: 700;
    padding: 8px 20px;
    letter-spacing: .5px;
    text-transform: uppercase;
    border-bottom: 1px solid #e0e0e0;
}

/* ── Numbers block ── */
.tl-numbers-block {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
    padding: 20px 22px;
}
.tl-positions-block {
    background: linear-gradient(135deg, #922b21 0%, #c0392b 100%);
}
.tl-zodia-block {
    background: linear-gradient(135deg, #a93226 0%, #c0392b 100%);
    padding-top: 12px;
}
.tl-toto1-block {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
}
.tl-section-label {
    font-size: .72rem;
    font-weight: 700;
    color: rgba(255,255,255,.65);
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 14px;
}

/* ── Balls ── */
.tl-balls-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tl-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: #ffffff;
    color: #c0392b;
    border-radius: 50%;
    font-size: 1.1rem;
    font-weight: 800;
    box-shadow: 0 3px 10px rgba(0,0,0,.2);
    transition: transform .15s;
    flex-shrink: 0;
}
.tl-ball:hover { transform: scale(1.08); }
.tl-ball-pos    { background: #f5f5f5; color: #c0392b; }
.tl-ball-orange { background: #f5f5f5; color: #c0392b; }

/* ── Jackpot bar ── */
.tl-jackpot-bar {
    background: #f8f8f8;
    border-top: 3px solid #c0392b;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.tl-jp-label {
    font-size: .85rem;
    font-weight: 800;
    color: #c0392b;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.tl-jp-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: #1a1a1a;
    text-align: right;
}
.tl-jp-value em { font-style: italic; font-size: 1rem; font-weight: 600; color: #777; }

/* ── Winnings table ── */
.tl-winnings { overflow-x: auto; }
.tl-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}
.tl-table thead tr { background: #f0f0f0; }
.tl-table th {
    padding: 11px 16px;
    text-align: left;
    font-size: .72rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .4px;
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
}
.tl-table th:not(:first-child) { text-align: right; }
.tl-table td {
    padding: 11px 16px;
    border-bottom: 1px solid #f0f0f0;
    color: #1a1a1a;
}
.tl-table td:first-child { font-weight: 600; }
.tl-table td:not(:first-child) {
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: #444;
}
.tl-table tbody tr:last-child td { border-bottom: none; }
.tl-table tbody tr:hover { background: #fdf5f5; }

/* ── Тото 1 matches grid ── */
.tl-matches-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.tl-match-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 34px;
}
.tl-match-num {
    font-size: .6rem;
    color: rgba(255,255,255,.6);
    font-weight: 700;
}
.tl-match-res {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 800;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.tl-match-1 { background: #ffffff; color: #c0392b; }
.tl-match-2 { background: #f0f0f0; color: #333; }
.tl-match-x { background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.35); }

/* ── Rojdenden YMDD ── */
.tl-ymdd-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.tl-ymdd-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.tl-ymdd-label {
    font-size: .65rem;
    font-weight: 700;
    color: rgba(255,255,255,.6);
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* ── Mobile winnings cards ── */
.tl-winnings-desktop { display: block; overflow-x: auto; }
.tl-winnings-mobile  { display: none; }

@media (max-width: 640px) {
    .tl-winnings-desktop { display: none; }
    .tl-winnings-mobile  { display: block; padding: 4px 0; }

    .tl-win-card {
        padding: 12px 16px;
        border-bottom: 1px solid #f0f0f0;
    }
    .tl-win-card:last-child { border-bottom: none; }
    .tl-win-label {
        font-size: .85rem;
        font-weight: 700;
        color: #1a1a1a;
        margin-bottom: 8px;
    }
    .tl-win-grid {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 8px;
    }
    .tl-win-cell { display: flex; flex-direction: column; gap: 3px; }
    .tl-win-key {
        font-size: .65rem;
        font-weight: 700;
        color: #aaa;
        text-transform: uppercase;
        letter-spacing: .4px;
    }
    .tl-win-val { font-size: .82rem; color: #444; font-variant-numeric: tabular-nums; }
    .tl-win-total { font-weight: 700; color: #c0392b; }

    .tl-jackpot-bar { flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 16px; }
    .tl-jp-value { font-size: 1.05rem; }
    .tl-ball { width: 42px; height: 42px; font-size: .95rem; }
    .tl-balls-row { gap: 6px; }
    .tl-numbers-block { padding: 14px 16px; }
    .tl-title { font-size: 1rem; }
    .tl-match-res { width: 28px; height: 28px; font-size: .75rem; }
    .tl-matches-grid { gap: 4px; }
}

@media (max-width: 380px) {
    .tl-ball { width: 36px; height: 36px; font-size: .82rem; }
    .tl-win-grid { grid-template-columns: 1fr 1fr; }
    .tl-win-total { grid-column: 1 / -1; }
}

/* ── Loading ── */
.tl-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 28px 0;
    color: #999;
    font-size: .9rem;
}
.tl-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid #e0e0e0;
    border-top-color: #c0392b;
    border-radius: 50%;
    animation: tl-spin .7s linear infinite;
    flex-shrink: 0;
}
@keyframes tl-spin { to { transform: rotate(360deg); } }

/* ── Error ── */
.tl-error {
    padding: 16px 20px;
    background: #fff5f5;
    border-left: 4px solid #c0392b;
    border-radius: 8px;
    color: #922b21;
}
