/* ============================================================
   style-new.css — styles for the new functions.
   Loaded ONLY for the stream2sport stream, AFTER the stream's
   main stylesheet (tc-main), so these rules override the older
   copies bundled in style*.css for that stream only.
   ============================================================ */

/* ------------------------------------------------------------
   Design-token defaults.
   These let the patch render correctly on its own when
   "Do not load the default CSS" is enabled (the --tc-* vars
   normally live in style*.css). When the default CSS IS loaded,
   style-new.css comes after it, so for the stream2sport stream
   these values pin the tokens to the canonical palette.
   ------------------------------------------------------------ */
:root {
    --tc-primary: #FF5C35;
    --tc-accent: #FF1F3D;
    --tc-success: #3DAA6B;
    --tc-special: #F59E0B;
    --tc-text-dark: #111111;
    --tc-text-secondary: #888888;
    --tc-text-muted: #555555;
    --tc-border-color: rgba(0, 0, 0, 0.08);
    --tc-bg-card: #ffffff;
    --tc-shadow: rgba(0, 0, 0, 0.06);
    --tc-transition: all 0.18s ease;
    --tc-border-radius-pill: 999px;
}

/* ============================================================
   AI PICK — favourite outcome highlight (predictions)
   ============================================================ */
.match-odds span.tc-ai-pick {
    border: 2px solid var(--tc-success);
    background: rgba(98, 196, 98, 0.08);
    color: var(--tc-text-dark);
    box-shadow: 0 0 0 3px rgba(98, 196, 98, 0.12), 0 2px 6px rgba(98, 196, 98, 0.25);
    overflow: visible;
}

.match-odds span.tc-ai-pick:hover {
    box-shadow: 0 0 0 3px rgba(98, 196, 98, 0.2), 0 4px 10px rgba(98, 196, 98, 0.35);
}

.match-odds span .tc-ai-badge {
    position: absolute;
    display: flex;
    align-items: center;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    background: var(--tc-success);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.3px;
    line-height: 1;
    padding: 3px 7px;
    border-radius: 999px;
    box-shadow: 0 2px 5px rgba(98, 196, 98, 0.4);
    z-index: 2;
}

/* ============================================================
   4th odds cell — top brand logo (predictions row)
   ============================================================ */
.match-odds span.tc-odds-brand {
    padding: 4px;
    min-width: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid var(--tc-border-color);
    overflow: hidden;
}

.match-odds span.tc-odds-brand::after {
    content: none;
}

.match-odds span.tc-odds-brand img {
    max-width: 90%;
    max-height: 90%;
    /* width: auto; */
    margin: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.match-odds span.tc-odds-brand:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

/* ============================================================
   Telegram funnel block — [tc_telegram]
   ============================================================ */
.tc-tg-funnel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    background: var(--tc-bg-card, #fff);
    border-radius: 18px;
    padding: 20px 24px;
    margin: 18px 0;
    box-shadow: 0 2px 12px var(--tc-shadow, rgba(0, 0, 0, 0.08));
}

.tc-tg-funnel-text {
    flex: 1 1 240px;
    min-width: 0;
}

.tc-tg-funnel-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--tc-text-dark, #1A1E2E);
    margin-bottom: 4px;
}

.tc-tg-funnel-sub {
    font-size: 14px;
    color: var(--tc-text-secondary, #666);
}

.tc-tg-funnel-link {
    color: #2aabee;
    text-decoration: none;
    font-weight: 600;
}

.tc-tg-funnel-link:hover {
    text-decoration: underline;
}

.tc-tg-funnel-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #2aabee;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 14px;
    padding: 11px 22px;
    border-radius: 999px;
    transition: var(--tc-transition, all 0.2s ease);
    white-space: nowrap;
}

.tc-tg-funnel-btn:hover {
    background: #1c97d6;
    transform: translateY(-1px);
    color: #fff !important;
}

.tc-tg-funnel-btn .tc-tg-icon {
    display: block;
}

@media (max-width: 480px) {
    .tc-tg-funnel {
        padding: 16px 18px;
    }
    .tc-tg-funnel-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================
   Floating action icons — gift + Telegram (bottom-right stack)
   ============================================================ */
.tc-float-icons {
    position: fixed;
    right: 30px;
    bottom: 90px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: bottom 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Lift above the showcase bottom banner when it's visible */
.tc-float-icons.tc-float-lifted {
    bottom: 86px;
}

.tc-float-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    color: #fff !important;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tc-float-icon:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32);
    color: #fff !important;
}

.tc-float-icon svg {
    display: block;
}

.tc-float-tg {
    background: #2aabee;
}

.tc-float-gift {
    background: linear-gradient(135deg, var(--tc-success, #62c462), #3ba84f);
    animation: tc-gift-pulse 2.2s ease-in-out infinite;
}

@keyframes tc-gift-pulse {
    0%, 100% { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25); }
    50%      { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), 0 0 0 8px rgba(98, 196, 98, 0.18); }
}

@media (max-width: 480px) {
    .tc-float-icons {
        right: 18px;
        bottom: 75px;
        gap: 10px;
    }
    .tc-float-icon {
        width: 48px;
        height: 48px;
    }
    .tc-float-icons.tc-float-lifted {
        bottom: 78px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tc-float-gift { animation: none; }
}

/* ============================================================
   Exit-intent popup — [tc_exit_popup]
   ============================================================ */
.tc-exit-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(10, 12, 20, 0.62);
    opacity: 0;
    transition: opacity 0.28s ease;
}

.tc-exit-overlay[hidden] {
    display: none;
}

.tc-exit-overlay.tc-exit-show {
    opacity: 1;
}

.tc-exit-modal {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: var(--tc-bg-card, #fff);
    border-radius: 20px;
    padding: 28px 24px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    transform: translateY(16px) scale(0.97);
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.tc-exit-show .tc-exit-modal {
    transform: translateY(0) scale(1);
}

.tc-exit-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--tc-text-secondary, #888);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    transition: var(--tc-transition, all 0.2s ease);
    display: flex;
    justify-content: center;
    align-items: center;
}

.tc-exit-close:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--tc-text-dark, #1A1E2E);
}

.tc-exit-heading {
    margin: 0 0 16px;
    font-size: 22px;
    font-weight: 800;
    color: var(--tc-text-dark, #1A1E2E);
    text-align: center;
}

/* --- Telegram CTA inside popup --- */
.tc-exit-tg {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #2aabee;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 20px;
    transition: var(--tc-transition, all 0.2s ease);
}

.tc-exit-tg:hover {
    background: #1c97d6;
    color: #fff !important;
}

.tc-exit-tg-icon {
    flex: 0 0 auto;
    display: flex;
}

.tc-exit-tg-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.tc-exit-tg-title {
    font-weight: 800;
    font-size: 15px;
}

.tc-exit-tg-sub {
    font-size: 12px;
    opacity: 0.92;
}

.tc-exit-tg-btn {
    flex: 0 0 auto;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    padding: 7px 16px;
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
}

@media (max-width: 680px) {
    .tc-exit-tg {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }
}

/* --- Brands list inside popup --- */
.tc-exit-brands-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--tc-text-secondary, #888);
    margin-bottom: 10px;
}

.tc-exit-brands {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tc-exit-loading {
    text-align: center;
    padding: 20px 0;
}

.tc-exit-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--tc-border-color, #e0e0e0);
    border-radius: 12px;
    transition: var(--tc-transition, all 0.2s ease);
}

.tc-exit-brand:hover {
    box-shadow: 0 3px 10px var(--tc-shadow, rgba(0, 0, 0, 0.08));
    transform: translateY(-1px);
}

.tc-exit-brand-rank {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--tc-special, #FFD700);
    color: #1a1e2e;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tc-exit-brand-logo {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tc-exit-brand-logo img {
    max-width: 88%;
    max-height: 88%;
    object-fit: contain;
}

.tc-exit-brand-info {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.tc-exit-brand-name {
    font-size: 15px;
    font-weight: 800;
    color: var(--tc-text-dark, #1A1E2E);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tc-exit-brand-bonus {
    font-size: 12px;
    color: var(--tc-text-secondary, #888);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tc-exit-brand-btn {
    flex: 0 0 auto;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--tc-primary, #FF6B35), var(--tc-accent, #ff1f3d));
    color: #fff;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 12px;
    padding: 9px 16px;
    border-radius: 999px;
    transition: var(--tc-transition, all 0.2s ease);
}

.tc-exit-brand-btn:hover {
    transform: translateY(-1px);
}

@media (max-width: 480px) {
    .tc-exit-modal {
        padding: 24px 18px 20px;
    }
    .tc-exit-brand-bonus {
        display: none;
    }
}

/* ============================================================
   Trust header — freshness badge + trust row (above showcase)
   ============================================================ */
.tc-trust-header {
    display: flex;
    /* flex-direction: column; */
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 4px 0 18px;
}

.tc-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(98, 196, 98, 0.12);
    color: #2f7d35;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 999px;
}

.tc-trust-badge-icon {
    display: flex;
}

.tc-trust-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 22px;
}

.tc-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    /* color: var(--tc-text-muted, #333); */
    color: inherit;
}

.tc-trust-item-icon {
    display: flex;
    color: var(--tc-success, #62c462);
}

.tc-trust-item-label {
    white-space: nowrap;
}

@media (max-width: 480px) {
    .tc-trust-header {
      flex-direction: column;
    }
    .tc-trust-row {
        gap: 8px 14px;
    }
    .tc-trust-item {
        font-size: 12px;
    }
}

.matches-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.matches-head a {
    color: #6c63ff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.matches-head a::after {
    content: '→';
    margin-left: 6px;
    transition: transform 0.3s ease;
    display: inline-block;
}

.matches-head a:hover {
    color: #4a42d4;
}

.matches-head a:hover::after {
    transform: translateX(4px);
}

/* =========================================================================
   Sports Predictions — predict-table (table layout)
   ========================================================================= */

.predict-table {
    --pt-bg:            #ffffff;
    --pt-head-bg:       #f5f6f8;
    --pt-border:        #e6e8ec;
    --pt-text:          #1a1e2e;
    --pt-text-muted:    #6b7280;
    --pt-row-hover:     #f9fafb;
    --pt-select-bg:     #e7f6ec;
    --pt-select-border: #34c759;
    --pt-select-text:   #1c7a3c;
    --pt-btn-bg:        #ff6b00;
    --pt-btn-bg-hover:  #e85f00;
    --pt-btn-text:      #ffffff;
    --pt-radius:        12px;
    --pt-radius-sm:     8px;

    width: 100%;
    background: var(--pt-bg);
    border: 1px solid var(--pt-border);
    border-radius: var(--pt-radius);
    overflow: hidden;
    color: var(--pt-text);
    font-size: 14px;
    line-height: 1.4;
}

/* ---------- Head ---------- */
.predict-table__head {
    display: flex;
    align-items: center;
    background: var(--pt-head-bg);
    border-bottom: 1px solid var(--pt-border);
    font-weight: 600;
    color: var(--pt-text-muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.predict-table__th {
    padding: 14px 16px;
}

.predict-table__th_match {
    flex: 1 1 auto;
}

.predict-table__th_odds {
    flex: 0 0 auto;
    width: 46%;
    min-width: 340px;
}

/* ---------- Body ---------- */
.predict-table__body {
    display: block;
}

.predict-table__tr {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--pt-border);
    transition: background .15s ease;
}

.predict-table__tr:last-child {
    border-bottom: none;
}

.predict-table__tr:hover {
    background: var(--pt-row-hover);
}

.predict-table__td {
    padding: 12px 16px;
    display: flex;
    align-items: center;
}

/* Date column */
.predict-table__td_date {
    flex: 0 0 auto;
    width: 96px;
}

.predict-table__date {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.predict-table__date-main {
    font-weight: 600;
    white-space: nowrap;
}

.predict-table__date-time {
    color: var(--pt-text-muted);
    font-size: 13px;
}

/* Teams column */
.predict-table__td_command {
    flex: 1 1 auto;
    min-width: 0;
}

.predict-table__command {
    display: flex;
    flex-direction: column;
    /* justify-content: space-between; */
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.predict-table__command-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.predict-table__command-img {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.predict-table__command-img img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    display: block;
}

.predict-table__command-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Odds column */
.predict-table__td_ratio {
    flex: 0 0 auto;
    width: 32%;
    min-width: 200px;
}

.predict-table__ratio {
    display: flex;
    gap: 8px;
    width: 100%;
    margin-top: 6px;
}

.predict-table__ratio-item {
    position: relative;
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 6px;
    border: 1px solid var(--pt-border);
    border-radius: var(--pt-radius-sm);
    background: var(--pt-bg);
    font-size: 12px;
    font-weight: 600;
    color: var(--pt-text-muted);
    transition: border-color .15s ease, background .15s ease;
}

/* AI PICK badge on the favourite */
.predict-table__ai-pick {
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 7px;
    background: var(--pt-select-border);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: .03em;
    border-radius: 999px;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
}

.predict-table__ratio-item span {
    font-size: 8px;
    font-weight: 700;
    color: var(--pt-text) !important;
}

/* Favourite (lowest odd) */
.predict-table__ratio-item_select {
    background: var(--pt-select-bg);
    border-color: var(--pt-select-border);
    color: var(--pt-select-text);
}

.predict-table__ratio-item_select span {
    color: var(--pt-select-text);
}

/* Action column */
.predict-table__td_action {
    flex: 0 0 auto;
    width: 190px;
    justify-content: flex-end;
}

.predict-table__action {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    justify-content: flex-end;
}

.predict-table__make {
    flex: 1 1 auto;
    min-width: 0;
}

/* Brand logo next to the button */
.predict-table__brand {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--pt-radius-sm);
    overflow: hidden;
    cursor: pointer;
    transition: transform .1s ease, box-shadow .15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

.predict-table__brand:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, .18);
}

.predict-table__brand:focus-visible {
    outline: 2px solid var(--pt-select-border);
    outline-offset: 2px;
}

.predict-table__brand img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    display: block;
}

.predict-table__make-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 16px;
    background: var(--pt-btn-bg);
    color: var(--pt-btn-text);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .02em;
    border-radius: var(--tc-border-radius-pill);
    cursor: pointer;
    user-select: none;
    transition: background .15s ease, transform .05s ease;
    white-space: nowrap;
}

.predict-table__make-btn:hover {
    background: var(--pt-btn-bg-hover);
}

.predict-table__make-btn:active {
    transform: translateY(1px);
}

.predict-table__make-btn:focus-visible {
    outline: 2px solid var(--pt-select-border);
    outline-offset: 2px;
}

/* =========================================================================
   ADAPTIVE
   ========================================================================= */
@media (max-width: 768px) {
    .predict-table__command {
        flex-direction: row;
        justify-content: space-between;
        padding: 0 1rem;
    }
    .predict-table__head {
        display: none;
    }

    .predict-table__tr {
        justify-content: center;
        flex-wrap: wrap;
        padding: 12px;
        gap: 10px;
    }

    .predict-table__td {
        padding: 0;
    }

    .predict-table__td_date {
        order: 1;
        width: auto;
    }

    .predict-table__date {
        flex-direction: row;
        gap: 6px;
        align-items: baseline;
    }

    .predict-table__td_command {
        order: 3;
        width: 100%;
    }

    .predict-table__td_ratio {
        order: 4;
        width: 100%;
        min-width: 0;
    }

    .predict-table__td_action {
        /* order: 2; OLD */
        order: 4;
        margin-left: auto;
        /* width: auto; */
        width: 100%;
    }

    .predict-table__make-btn {
        /* width: auto; */
        width: 100%;
        padding: 8px 18px;
    }

    .predict-table__brand {
        /* width: 38px; */
        width: 70px;
        height: 38px;
    }

    .predict-table__brand img {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 420px) {
    .predict-table__ratio {
        gap: 6px;
    }

    .predict-table__ratio-item {
        padding: 6px 4px;
    }

    .predict-table__ratio-item span {
        font-size: 8px;
    }
}
