/* Local adjustments over the downloaded native site assets. */
:root {
  --site-max-width: 1400px;
}

.container,
.latest-draw-container,
header,
main {
  max-width: var(--site-max-width) !important;
}

footer.footer-wrap,
.footer-wrap {
  width: auto !important;
  max-width: none !important;
  margin: 40px 20px 0 !important;
}

.top-bar-row2,
.top-bar-mobile-ticker {
  display: none !important;
}

body[data-show-domain-rows="true"] .top-bar-row2,
body[data-show-domain-rows="true"] .top-bar-mobile-ticker {
  display: block !important;
}

nav.tabs > .tab-button.nav-api-new,
nav.tabs > .tab-button[onclick*="freeApi"],
#freeApiTab,
.public-api-tab {
  display: none !important;
}

.top-bar {
  margin-bottom: 12px;
}

.top-bar-row1 {
  border-bottom: 1px solid rgba(185, 28, 28, 0.12);
}

.fav-overlay {
  display: none !important;
}

.bet-panel.minimized .bet-panel-header,
.bet-panel.minimized #betPanelIcon,
.bet-panel.minimized .panel-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.bet-panel.minimized .bet-panel-header {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
}

.bet-panel.minimized #betPanelIcon svg,
.bet-panel.minimized .panel-icon svg {
  display: block;
  width: 26px;
  height: 26px;
}

.kf-panel {
  left: 20px !important;
  right: auto !important;
  bottom: 72px !important;
  width: 340px !important;
  max-width: calc(100vw - 32px) !important;
  height: auto !important;
  max-height: calc(100vh - 110px) !important;
  overflow: visible !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.kf-panel .kf-iframe {
  display: none !important;
}

.kf-panel-close {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  z-index: 20 !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  background: rgba(105, 13, 27, 0.62) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 50% !important;
  color: #fff !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 20px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  text-align: center !important;
  transform: none !important;
  cursor: pointer !important;
}

.zmy-kf-chat {
  width: 100%;
  height: min(520px, calc(100vh - 110px));
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  background: #fff8f5;
  border: 1px solid rgba(188, 19, 38, 0.18);
  border-radius: 18px;
  box-shadow: 0 22px 55px rgba(96, 18, 24, 0.18);
  overflow: hidden;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

.zmy-kf-head {
  padding: 16px 52px 16px 18px;
  color: #fff;
  background: linear-gradient(135deg, #b70f24, #e83337);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  min-height: 68px;
  box-sizing: border-box;
}

.zmy-kf-head strong,
.zmy-kf-head span {
  display: block;
}

.zmy-kf-head > div {
  min-width: 0;
}

.zmy-kf-head strong {
  font-size: 18px;
  line-height: 1.2;
}

.zmy-kf-head span,
.zmy-kf-head small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  line-height: 1.35;
}

.zmy-kf-head span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zmy-kf-head small {
  flex: 0 0 auto;
  padding-top: 3px;
  padding-right: 2px;
  white-space: nowrap;
}

.zmy-kf-messages {
  padding: 16px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 20% 0, rgba(232, 51, 55, 0.1), transparent 12rem),
    #fffaf8;
}

.zmy-kf-msg {
  margin-bottom: 12px;
}

.zmy-kf-msg-meta {
  margin-bottom: 4px;
  color: #9b8178;
  font-size: 12px;
}

.zmy-kf-msg-bubble {
  display: inline-block;
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 14px;
  color: #3a2420;
  background: #fff;
  border: 1px solid rgba(176, 110, 92, 0.18);
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.zmy-kf-msg--visitor {
  text-align: right;
}

.zmy-kf-msg--visitor .zmy-kf-msg-bubble {
  color: #fff;
  background: linear-gradient(135deg, #c5162e, #ee413d);
  border-color: transparent;
}

.zmy-kf-msg--system {
  text-align: center;
}

.zmy-kf-msg--system .zmy-kf-msg-bubble {
  color: #9c665c;
  background: rgba(255, 236, 228, 0.8);
  font-size: 12px;
}

.zmy-kf-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px 0;
  background: #fff8f5;
}

.zmy-kf-quick button {
  flex: 1 1 88px;
  border: 1px solid rgba(197, 22, 46, 0.2);
  border-radius: 999px;
  padding: 7px 8px;
  color: #b70f24;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
}

.zmy-kf-compose {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: #fff8f5;
}

.zmy-kf-compose input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(197, 22, 46, 0.22);
  border-radius: 999px;
  padding: 10px 13px;
  outline-color: #c5162e;
}

.zmy-kf-compose button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: white;
  background: linear-gradient(135deg, #b70f24, #e83337);
  cursor: pointer;
  font-weight: 700;
}

@media (max-width: 520px) {
  .kf-panel {
    left: 12px !important;
    right: 12px !important;
    bottom: 74px !important;
    width: auto !important;
    max-width: none !important;
  }

  .zmy-kf-chat {
    height: 70vh;
  }

  .zmy-kf-head {
    padding-right: 48px;
  }

  .zmy-kf-head small {
    display: none;
  }
}
