.header-primary {
    border-bottom: 1px solid var(--base) !important;
    position: fixed !important;
}

.sports-card-header-title,
.sports-card-header-title .sports-card-title-link,
[id^="sports-card-header-title-text-"] {
    font-size: 14px !important;
    font-weight: 600; /* a little boldness */
    line-height: 1.3;
}

:root{
    --gauge-bg: rgba(255,255,255,.25);
}     /* dark */

html[data-theme="light"]{
    --gauge-bg: #d1d5db;
}

html:not(.dark){
    --gauge-bg: #d1d5db;
}

/* custom.css (loaded after Bootstrap) */
@media (max-width: 991.98px){
    .g-3,
    .gy-3{
        padding-left: 5px;
        padding-right: 5px;
        padding-bottom: 10px;
    }
}

.featured-games-card {
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
    background: radial-gradient(circle at top left, rgba(59,130,246,.08), transparent 55%),
                var(--card-bg, #0b1020);
    overflow: hidden;
}

.featured-games-card > .card-body {
    border-radius: inherit;
}

.featured-games-card .card-header {
    padding: 16px 24px 8px;
    border-bottom: none;
}

.featured-game-slide {
    min-height: 220px;
}

.featured-market-left {
    padding-right: 8px;
}

.featured-market-icon {
    flex: 0 0 auto;           /* да не се свива при дълго заглавие */
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-market-icon img {
    width: 48px;
    height: 48px;
    min-width: 36px;
    min-height: 36px;
    object-fit: cover;
    border-radius: 12px;
}

.featured-market-category {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(148,163,184,1);
}

.featured-market-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.25;
    margin: 0 0 4px !important;

    display: -webkit-box;
    -webkit-line-clamp: 3;       /* максимум 3 реда */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* линкът да наследява и да не чупи layout-a */
.featured-market-title .featured-game-title-link {
    color: inherit;
    text-decoration: none;
    display: inline;              /* да не става блок с допълнителни редове */
}

.featured-market-title .featured-game-title-link:hover {
    text-decoration: underline;
}

/* по-малък font за по-тесни екрани/дълги заглавия */
@media (max-width: 1199.98px) {
    .featured-market-title {
        font-size: 16px;
    }
}

@media (max-width: 767.98px) {
    .featured-market-title {
        font-size: 15px;
    }
}

.featured-market-meta {
    font-size: 12px;
}

/* Smaller logo size inside the featured slider header */
.featured-market-brand .brand__img--dark,
.featured-market-brand .brand__img--light {
    max-height: 20px;          /* пипаш по вкус: 16–22px */
    width: auto;
    transform: none !important;
    padding-left: 0 !important;
    /* НИКАКЪВ display тук – оставяме глобалната логика */
}

/* outcome бутони – за SINGLE MARKET в carousel (ползваме стила на .single-buy-btn) */
.featured-market-outcomes {
    margin-top: 16px;
    display: flex;
    gap: 8px;
}

.featured-outcome-btn {
    flex: 1;
    height: 40px;             /* като .single-buy-btn */
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    box-sizing: border-box;
    transition: transform .12s cubic-bezier(.4,0,.2,1), box-shadow .1s ease-in-out, opacity .1s ease-in-out, background-color .1s ease-in-out, color .1s ease-in-out;
    box-shadow: 0 -3px 0 0 rgba(0,0,0,.10) inset;
}

.featured-outcome-btn:active {
    transform: scale(.97);
}

/* Yes – същите цветове като .single-buy-btn.yes */
.featured-outcome-btn-yes {
    background: var(--yes-bg);
    color: var(--yes-color);
}

.featured-outcome-btn-yes:hover {
    background: var(--yes-color);
    color: #ffffff;
}

/* No – същите цветове като .single-buy-btn.no */
.featured-outcome-btn-no {
    background: var(--no-bg);
    color: var(--no-color);
}

.featured-outcome-btn-no:hover {
    background: var(--no-color);
    color: #ffffff;
}

/* === multi-market list === */
.featured-markets-multi {
    margin-top: 12px;
}

.featured-markets-scroll {
    max-height: 140px;
    overflow-y: auto;
    padding-right: 4px;
}

.featured-market-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13px;
}

.featured-market-row-title {
    flex: 1 1 auto;
    margin-right: 8px;
    color: #e5e7eb;
    text-decoration: none;
}

.featured-market-row-title:hover {
    text-decoration: underline;
}

.featured-market-row-actions {
    display: flex;
    gap: 4px;
}

/* mini Yes/No buttons – ползваме структурата и цветовете на .sports-card-btn */
.featured-market-mini-btn {
    width: 44px;
    height: 31px;
    padding: 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    transition: transform .12s cubic-bezier(.4,0,.2,1), box-shadow .1s ease-in-out, opacity .1s ease-in-out, background-color .1s ease-in-out, border-color .1s ease-in-out, color .1s ease-in-out;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
    box-sizing: border-box;
    box-shadow: 0 -3px 0 0 rgba(0,0,0,.10) inset;
}

.featured-market-mini-btn:active {
    transform: scale(.97);
}

/* по желание – ако искаш да ползваш default/hover текст като в картите */
.featured-market-mini-btn .label-hover {
    display: none;
}

.featured-market-mini-btn .default-text {
    display: inline;
}

/* YES mini – същите цветове като .sports-card-btn.yes */
.featured-market-mini-btn.mini-yes {
    background: var(--yes-bg);
    color: var(--yes-color);
}

.featured-market-mini-btn.mini-yes:hover {
    background: var(--yes-color);
    color: #ffffff;
}

/* NO mini – същите цветове като .sports-card-btn.no */
.featured-market-mini-btn.mini-no {
    background: var(--no-bg);
    color: var(--no-color);
}

.featured-market-mini-btn.mini-no:hover {
    background: var(--no-color);
    color: #ffffff;
}

:root {
    --chart-bg: #ffffff;
    --chart-line-light: #2563eb;
    --chart-fill-light-top: rgba(37, 99, 235, 0.28);
    --chart-fill-light-bottom: rgba(37, 99, 235, 0);
    --chart-line-dark: #a855f7;
    --chart-fill-dark-top: rgba(168, 85, 247, 0.28);
    --chart-fill-dark-bottom: rgba(168, 85, 247, 0);
    --chart-grid-color: rgba(17, 24, 39, 0.08);
    --chart-text-color: #64748b;
}

html.dark {
    --chart-bg: var(--card-bg);
    --chart-grid-color: rgba(249, 249, 249, 0.08);
    --chart-text-color: #aab4bf;
}

/* Десктоп / общо */
.featured-chart-wrapper {
    position: relative;
    height: 220px;      /* вместо min-height */
    min-height: 220px;
}

/* Мобилно – малко по-ниска графика, за да не става "километър" */
@media (max-width: 991.98px){
    .featured-chart-wrapper {
        height: 200px;
        min-height: 200px;
    }
}


.featured-chart-panel {
    display: flex;
    align-items: stretch;
    height: 100%;
}

.featured-chart-ylabels {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(148,163,184,1);
    margin-right: 6px;
}

.featured-chart-canvas {
    position: relative;
    flex: 1;
    min-width: 0;
    background: transparent;
    border-radius: 12px;
    overflow: visible;
}

.featured-tv-chart {
    width: 100%;
    height: 100%;
    min-height: 180px;
    position: relative;
    overflow: visible;
}

.featured-tv-chart table {
    border: 0 !important;
}

.featured-chart-tooltip {
    position: absolute;
    z-index: 5;
    min-width: 148px;
    max-width: 220px;
    padding: 8px 10px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    color: #334155;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
    font-size: 12px;
    line-height: 1.35;
    pointer-events: none;
    transform: translate3d(0, 0, 0);
}

html.dark .featured-chart-tooltip {
    background: rgba(30, 41, 59, 0.96);
    color: #e2e8f0;
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.featured-chart-tooltip-title {
    margin-bottom: 6px;
    color: #64748b;
    font-weight: 600;
    white-space: nowrap;
}

html.dark .featured-chart-tooltip-title {
    color: #cbd5e1;
}

.featured-chart-tooltip-row {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
}

.featured-chart-tooltip-swatch {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.featured-chart-tooltip-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.featured-chart-tooltip-value {
    font-weight: 700;
}

.featured-chart-live-marker {
    position: absolute;
    z-index: 30;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--chart-line-light);
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.45);
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.featured-chart-live-marker::after {
    content: "";
    position: absolute;
    inset: -7px;
    border-radius: 50%;
    border: 2px solid currentColor;
    opacity: 0.48;
    animation: featured-live-ping 1.55s ease-out infinite;
}

.featured-chart-loading {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    background: inherit;
    color: #64748b;
}

.featured-chart-loading::before {
    content: "";
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 3px solid rgba(148, 163, 184, 0.3);
    border-top-color: currentColor;
    animation: featured-chart-spin 0.8s linear infinite;
}

html.dark .featured-chart-loading {
    color: #cbd5e1;
}

@keyframes featured-chart-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes featured-live-ping {
    0% {
        transform: scale(0.45);
        opacity: 0.7;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

/* mobile – ляво и дясно едно под друго */
@media (max-width: 991.98px){
    .featured-game-left,
    .featured-game-right {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* override на Bootstrap за индикаторите в тази карта */
.featured-games-card .carousel-indicators {
    position: static;     /* да не стоят absolute върху графиката */
    margin: 4px 0 0;      /* махаме 1rem bottom, слагаме лек top */
    justify-content: center;
}

/* точките да са кръгли, малки */
.featured-games-card .carousel-indicators [data-bs-target] {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: rgba(148,163,184,0.6);
    opacity: 1;            /* по-видими от дефолтното 0.5 */
}

/* активната – бяла */
.featured-games-card .carousel-indicators .active {
    background-color: #ffffff;
}

/* вече няма нужда от extra padding заради absolute dots */
.featured-games-card .card-body {
    padding-bottom: 20px;
}

/* общо – малко по-висок */
.featured-game-slide {
    min-height: 260px;
}

/* десктоп: фиксирана височина, равно разпределение */
@media (min-width: 992px) {
    .featured-game-slide {
        height: 260px;     /* може да вдигнеш на 280/300 ако искаш малко повече въздух */
    }

    .featured-game-left,
    .featured-game-right {
        display: flex;
        flex-direction: column;
    }

    .featured-market-left,
    .featured-chart-wrapper {
        flex: 1 1 auto;    /* ляво и дясно запълват вертикално */
    }

    .featured-market-news {
        margin-top: auto;  /* news пада към дъното, да не бута всичко */
    }
}

/* на мобилен не заключваме height, за да не режем дълги заглавия */
@media (max-width: 991.98px){
    .featured-game-slide {
        min-height: 220px;
        height: auto;
    }
}

.featured-market-title {
    margin: 0 0 4px !important; /* !important само ако глобалното е много инатливо */
}

/* game title as link */
.featured-game-title-link {
    color: inherit;
    text-decoration: none;
}

.featured-game-title-link:hover {
    text-decoration: underline;
}

/* === multi-market list === */
.featured-markets-multi {
    margin-top: 12px;
}

.featured-markets-scroll {
    max-height: 140px;      /* ограничаваме височината */
    overflow-y: auto;
    padding-right: 4px;
}

.featured-market-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13px;
}

.featured-market-row-title {
    flex: 1 1 auto;
    margin-right: 8px;
    color: var(--light);
    text-decoration: none;
}

.featured-market-row-title:hover {
    text-decoration: underline;
}

.featured-market-row-actions {
    display: flex;
    gap: 4px;
}

/* mini Yes/No buttons */
.featured-market-mini-btn {
    border-radius: 8px;
    padding: 3px 10px;
    font-size: 12px;
    line-height: 1.2;
    cursor: pointer;
    transition: transform .12s cubic-bezier(.4,0,.2,1), box-shadow .1s ease-in-out, opacity .1s ease-in-out, background-color .1s ease-in-out, border-color .1s ease-in-out, color .1s ease-in-out;
}

.featured-market-mini-btn:hover {
    box-shadow: 0 -3px 0 0 rgba(0,0,0,.10) inset;
}

.single-buy-btn.no {
    background: var(--no-bg);
    color: var(--no-color);
}

.single-buy-btn.yes {
    background: var(--yes-bg);
    color: var(--yes-color);
}

.featured-outcome-btn-yes {
    background: var(--yes-bg);
    color: var(--yes-color);
}

.featured-outcome-btn-no {
    background: var(--no-bg);
    color: var(--no-color);
}

.featured-market-row-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 30% текст пред Yes/No */
.featured-market-yes-pct {
    color: var(--light);
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    padding-top: 2px; /* леко нагоре да се изравни с бутоните */
}

/* Hide scrollbar but keep scroll functionality */
.featured-markets-scroll {
    scrollbar-width: none;       /* Firefox */
    -ms-overflow-style: none;    /* IE / Edge */
}

.featured-markets-scroll::-webkit-scrollbar {
    display: none;               /* Chrome / Safari */
}
.featured-outcome-btn .featured-outcome-label {
    font-weight: 800; /* по-дебел текст */
}
.cent-bold {
    font-size: 14px;
    font-weight: 900;
}

@media (min-width: 768px) and (max-width: 991px) {
    .col-md-4 {
        width: 50% !important;
    }
}

.driver-popover {
    background: var(--base) !important;
    color: var(--light) !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    box-shadow: 0 18px 50px rgba(0,0,0,0.35) !important;
}

.driver-popover-title {
    color: var(--light) !important;
}

.driver-popover-description {
    color: var(--light) !important;
    opacity: 0.9 !important;
}

.driver-popover-footer .driver-popover-btn {
    border-radius: 8px !important;
    background: rgba(255,255,255,0.08) !important;
    color: var(--light) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    padding: 8px 12px !important;
    font-weight: 600 !important;
}

.driver-popover-footer .driver-popover-btn:hover {
    background: rgba(255,255,255,0.12) !important;
}

.driver-popover-progress-text {
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #727272 !important;
    zoom: 1;
    padding-left: 5px !important;
}

.mkt-tour-skip {
    margin-right: auto !important;
    padding-right: 5px !important;
    font-size: .86rem !important;
    font-weight: 500 !important;
}

.mkt-tour-disabled {
    pointer-events: none !important;
    cursor: default !important;
}
