/* KDB_RESPONSIVE_UI_REPAIR_V1
   Mobile LIVE + sponsor marquee + canonical header socials.
   The canonical footer is deliberately outside every selector in this file.
*/

/* -------------------------------------------------------------------------
   Header socials: the same icon language and SVG geometry as the canonical
   footer, driven by the one global header include on every public/marshal page.
   ------------------------------------------------------------------------- */

body.kdb-design-system-v1 .site-header.kdb-global-header {
    grid-template-areas: "brand nav social register";
}

body.kdb-design-system-v1 .site-header.kdb-global-header .site-header__brand {
    grid-area: brand;
}

body.kdb-design-system-v1 .site-header.kdb-global-header .site-nav {
    grid-area: nav;
}

body.kdb-design-system-v1 .site-header.kdb-global-header .site-nav__registration {
    display: none;
}

body.kdb-design-system-v1 .site-header.kdb-global-header .menu-toggle {
    grid-area: menu;
}

body.kdb-design-system-v1 .site-header.kdb-global-header .header-register {
    grid-area: register;
}

html body.kdb-design-system-v1
    .site-header.kdb-global-header
    .site-header__social[data-kdb-header-socials="canonical-footer-v1"] {
    grid-area: social;
    width: max-content !important;
    min-width: max-content !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
}

html body.kdb-design-system-v1
    .site-header.kdb-global-header
    .site-header__social[data-kdb-header-socials="canonical-footer-v1"] > a {
    box-sizing: border-box !important;
    width: 33px !important;
    height: 33px !important;
    min-width: 33px !important;
    min-height: 33px !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center !important;
    flex: 0 0 33px !important;
    overflow: hidden !important;
    color: #d9e9f1 !important;
    border: 1px solid rgba(83, 169, 207, 0.28) !important;
    border-radius: 6px !important;
    background: rgba(7, 31, 47, 0.72) !important;
    box-shadow: none !important;
    text-decoration: none !important;
    transform: none !important;
    transition:
        color 160ms ease,
        border-color 160ms ease,
        background-color 160ms ease,
        transform 160ms ease !important;
}

html body.kdb-design-system-v1
    .site-header.kdb-global-header
    .site-header__social[data-kdb-header-socials="canonical-footer-v1"] > a:hover,
html body.kdb-design-system-v1
    .site-header.kdb-global-header
    .site-header__social[data-kdb-header-socials="canonical-footer-v1"] > a:focus-visible {
    color: #48d7ff !important;
    border-color: rgba(70, 210, 255, 0.72) !important;
    background: rgba(8, 55, 70, 0.96) !important;
    transform: translateY(-1px) !important;
}

html body.kdb-design-system-v1
    .site-header.kdb-global-header
    .site-header__social[data-kdb-header-socials="canonical-footer-v1"] svg {
    width: 16px !important;
    height: 16px !important;
    display: block !important;
    flex: 0 0 auto !important;
    fill: currentColor !important;
    stroke: currentColor !important;
    stroke-width: 1.8 !important;
}

html body.kdb-design-system-v1
    .site-header.kdb-global-header
    .site-header__social[data-kdb-header-socials="canonical-footer-v1"]
    [data-kdb-header-social="telegram"] svg {
    fill: currentColor !important;
    stroke: none !important;
}

html body.kdb-design-system-v1
    .site-header.kdb-global-header
    .site-header__social[data-kdb-header-socials="canonical-footer-v1"]
    [data-kdb-header-social="instagram"] svg {
    fill: none !important;
    stroke: currentColor !important;
}

html body.kdb-design-system-v1
    .site-header.kdb-global-header
    .site-header__social[data-kdb-header-socials="canonical-footer-v1"]
    [data-kdb-header-social="instagram"] :is(rect, circle) {
    fill: none !important;
}

html body.kdb-design-system-v1
    .site-header.kdb-global-header
    .site-header__social[data-kdb-header-socials="canonical-footer-v1"] strong {
    margin: 0 !important;
    color: inherit !important;
    font-family: Arial, sans-serif !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
}

/* The former mobile script created a second set of icons. The global set above
   is now responsive, so the duplicate must never consume space or receive taps. */
html body .kdb-mobile-header-socials-v18-2,
html body [data-kdb-mobile-header-socials-v18-2] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

@media (max-width: 1230px) {
    body.kdb-design-system-v1 .site-header.kdb-global-header {
        grid-template-columns: 170px minmax(0, 1fr) auto 214px !important;
        grid-template-areas: "brand nav social register";
    }

    html body.kdb-design-system-v1
        .site-header.kdb-global-header
        .site-header__social[data-kdb-header-socials="canonical-footer-v1"] {
        display: flex !important;
    }
}

@media (min-width: 1081px) and (max-width: 1160px) {
    body.kdb-design-system-v1 .site-header.kdb-global-header {
        grid-template-columns: 160px minmax(0, 1fr) auto !important;
        grid-template-areas: "brand nav social";
    }

    body.kdb-design-system-v1
        .site-header.kdb-global-header
        .header-register.header-register--v8 {
        display: none !important;
    }
}

@media (max-width: 1080px) {
    body.kdb-design-system-v1 .site-header.kdb-global-header {
        grid-template-columns: 154px minmax(0, 1fr) 76px 205px !important;
        grid-template-areas: "brand social menu register";
        gap: 12px !important;
    }

    body.kdb-design-system-v1 .site-header.kdb-global-header .site-nav {
        grid-area: nav;
    }
}

@media (max-width: 760px) {
  body.kdb-design-system-v1 .site-header.kdb-global-header .site-nav__registration {
    grid-column: 1 / -1;
    min-height: 50px !important;
    padding: 0 15px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    color: #031923 !important;
    background: linear-gradient(105deg, #ffcc3d, #f26086) !important;
    box-shadow: 0 0 22px rgba(242, 96, 134, .32) !important;
    font-weight: 900 !important;
    letter-spacing: .06em !important;
  }

  body.kdb-design-system-v1 .site-header.kdb-global-header .site-nav__registration b {
    color: #031923 !important;
    font-size: 26px !important;
    line-height: 1 !important;
  }
    body.kdb-design-system-v1 .site-header.kdb-global-header {
        grid-template-columns: 128px minmax(0, 1fr) 42px !important;
        grid-template-areas: "brand social menu";
        gap: 6px !important;
        padding-inline: 10px !important;
    }

    body.kdb-design-system-v1 .site-header.kdb-global-header .site-header__brand img {
        width: 126px !important;
    }

    body.kdb-design-system-v1 .site-header.kdb-global-header .menu-toggle {
        width: 42px !important;
        min-width: 42px !important;
        margin: 0 !important;
        justify-content: center !important;
        gap: 3px !important;
    }

    body.kdb-design-system-v1 .site-header.kdb-global-header .menu-toggle b {
        display: none !important;
    }

    html body.kdb-design-system-v1
        .site-header.kdb-global-header
        .site-header__social[data-kdb-header-socials="canonical-footer-v1"] {
        width: 100% !important;
        min-width: 0 !important;
        gap: 5px !important;
    }

    html body.kdb-design-system-v1
        .site-header.kdb-global-header
        .site-header__social[data-kdb-header-socials="canonical-footer-v1"] > a {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        min-height: 38px !important;
        flex-basis: 38px !important;
        border-radius: 7px !important;
    }

    html body.kdb-design-system-v1
        .site-header.kdb-global-header
        .site-header__social[data-kdb-header-socials="canonical-footer-v1"] svg {
        width: 19px !important;
        height: 19px !important;
    }

    html body.kdb-design-system-v1
        .site-header.kdb-global-header
        .site-header__social[data-kdb-header-socials="canonical-footer-v1"] strong {
        font-size: 12px !important;
    }
}

@media (max-width: 360px) {
    body.kdb-design-system-v1 .site-header.kdb-global-header {
        grid-template-columns: 108px minmax(0, 1fr) 34px !important;
        gap: 4px !important;
        padding-inline: 8px !important;
    }

    body.kdb-design-system-v1 .site-header.kdb-global-header .site-header__brand img {
        width: 107px !important;
    }

    body.kdb-design-system-v1 .site-header.kdb-global-header .menu-toggle {
        width: 34px !important;
        min-width: 34px !important;
    }

    html body.kdb-design-system-v1
        .site-header.kdb-global-header
        .site-header__social[data-kdb-header-socials="canonical-footer-v1"] {
        gap: 3px !important;
    }

    html body.kdb-design-system-v1
        .site-header.kdb-global-header
        .site-header__social[data-kdb-header-socials="canonical-footer-v1"] > a {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        min-height: 30px !important;
        flex-basis: 30px !important;
        border-radius: 6px !important;
    }

    html body.kdb-design-system-v1
        .site-header.kdb-global-header
        .site-header__social[data-kdb-header-socials="canonical-footer-v1"] svg {
        width: 15px !important;
        height: 15px !important;
    }

    html body.kdb-design-system-v1
        .site-header.kdb-global-header
        .site-header__social[data-kdb-header-socials="canonical-footer-v1"] strong {
        font-size: 9px !important;
    }
}

/* -------------------------------------------------------------------------
   Home LIVE: remove the obsolete mobile call-to-action strip and let the card
   end immediately after the visible rows. The click target remains article#pilots.
   ------------------------------------------------------------------------- */

@media (max-width: 820px) {
    html body.kdb-design-system-v1.kdb-public-page
        .dashboard > #pilots.dash-card {
        height: auto !important;
        min-height: 0 !important;
        block-size: auto !important;
        align-self: start !important;
    }

    html body.kdb-design-system-v1.kdb-public-page
        #pilots :is([data-kdb-home-live-v59], .kdb-home-live-v59) {
        height: auto !important;
        min-height: 0 !important;
        block-size: auto !important;
    }

    html body.kdb-design-system-v1.kdb-public-page
        #pilots :is([data-kdb-home-live-v59-body], .kdb-home-live-v59__body),
    html body.kdb-design-system-v1.kdb-public-page
        #pilots .kdb-home-bracket-v1 {
        height: auto !important;
        min-height: 0 !important;
        block-size: auto !important;
    }

    html body.kdb-design-system-v1.kdb-public-page
        #pilots .kdb-home-bracket-v1__footer {
        display: none !important;
    }
}
