/* Kingmaker mobile restoration layer. Keep selectors scoped to this brand DOM. */

html {
  --stb-cookie-banner-height: 0px !important;
}

/* Restore the harvested mobile hero scenery from local brand assets. */
stb-main-banner .main-banner-container > .main-banner {
  background-image: image-set(
    url("/_a/assets/main-banner-bg-mob-1x.191c0054d1488dcd.webp") 1x,
    url("/_a/assets/main-banner-bg-mob-2x.7b2d73db7a99c32e.webp") 2x
  ) !important;
  background-position: center top !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
}

/* The source uses a purple strip behind the three primary navigation tabs. */
.sub-menu {
  background: linear-gradient(180deg, #831dc2 0%, #62109b 100%) !important;
}

.sub-menu .nav-list,
.sub-menu .nav-list__item,
.sub-menu .nav-list__link {
  position: relative;
  z-index: 1;
}

/* Make restored SVG symbols visible and keep the source geometry. */
stb-icon-sprite,
stb-icon-sprite .icon,
.base-title__link stb-icon-sprite,
.chapter-icon {
  display: inline-flex !important;
  flex: 0 0 auto;
}

.base-title__link {
  align-items: center !important;
  grid-auto-flow: column !important;
  gap: 2px !important;
}

/* Source Live Casino cards have a bright green lower outline. */
.category-card--live-casino::after {
  content: "";
  position: absolute;
  z-index: 8;
  inset: 0;
  box-sizing: border-box;
  border: 4px solid #00bd3f;
  border-top: 0;
  border-radius: 0 0 14px 14px;
  pointer-events: none;
}

/* Hydrated source events disappear from the static snapshot; restore them explicitly. */
.km-events-slot {
  box-sizing: border-box;
  margin: 0 !important;
  padding: 16px 0 0 20px;
  min-height: 202px;
  overflow: hidden;
}

.km-events-track {
  display: flex;
  gap: 12px;
  width: max-content;
  padding-right: 20px;
  overflow: visible;
}

.km-event-card {
  box-sizing: border-box;
  width: 318px;
  min-height: 178px;
  padding: 16px;
  border: 4px solid #53138a;
  border-radius: 16px;
  background: linear-gradient(145deg, #6818a2 0%, #35105f 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  color: #fbf8ff;
  font-family: inherit;
}

.km-event-top,
.km-event-match,
.km-event-odds {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.km-event-live {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 6px;
  background: #ff4e57;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.km-event-state {
  color: #d9b0ff;
  font-size: 14px;
  font-weight: 700;
}

.km-event-league {
  margin: 9px 0 12px;
  overflow: hidden;
  color: #bc86ed;
  font-size: 13px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.km-event-teams {
  display: grid;
  gap: 5px;
  font-size: 16px;
  line-height: 1.2;
}

.km-event-score {
  display: grid;
  gap: 5px;
  min-width: 20px;
  text-align: right;
  font-size: 16px;
  font-weight: 700;
}

.km-event-odds {
  gap: 8px;
  margin-top: 14px;
}

.km-event-odd {
  flex: 1;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(217, 176, 255, 0.32);
  border-radius: 9px;
  color: #d9b0ff;
  text-align: center;
  font-size: 12px;
  line-height: 1.15;
}

.km-event-odd strong {
  display: block;
  margin-bottom: 2px;
  color: #fbf8ff;
  font-size: 15px;
}

/* Broken source srcsets leave sport cards transparent; JS rewrites them to local @2x assets. */
.categories-grid--sport .sport-card__background {
  visibility: visible !important;
}

.categories-grid--sport .sport-card__background-holder {
  -webkit-mask-image: url("/_a/assets/sport-front-mask.5f3813fb8b34059c.svg") !important;
  mask-image: url("/_a/assets/sport-front-mask.5f3813fb8b34059c.svg") !important;
}

.categories-grid--sport .sport-card__picture {
  -webkit-mask-image: url("/_a/assets/sport-picture-mask.93f711a1129e34ee.svg") !important;
  mask-image: url("/_a/assets/sport-picture-mask.93f711a1129e34ee.svg") !important;
}

/* Footer accordion mechanics added by the brand JS. */
.chapter-mobile .chapter-icon {
  transition: transform 180ms ease;
}

.chapter-mobile[data-km-open="1"] .chapter-icon {
  transform: rotate(180deg);
}

.km-footer-panel {
  display: none;
  box-sizing: border-box;
  padding: 4px 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chapter-mobile[data-km-open="1"] .km-footer-panel {
  display: grid;
}

.km-footer-panel a {
  padding: 8px 0;
  color: #d9b0ff;
  font-size: 13px;
  line-height: 1.2;
  text-decoration: none;
}

@media (min-width: 415px) {
  .km-events-slot,
  .km-footer-panel {
    display: none !important;
  }
}
