:root {
  color-scheme: light;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #fbfbfb;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-width: 320px; min-height: 100%; background: #fbfbfb; }

body.ticket-bets-page { overflow-x: hidden; color: rgba(0, 0, 0, .9); }

.ticket-bets-page [hidden] { display: none !important; }

button, a { font: inherit; }

.ticket-bets-shell {
  width: min(100%, 600px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding-bottom: calc(116px + env(safe-area-inset-bottom));
  background: #fbfbfb;
}

.ticket-bets-header {
  position: sticky;
  z-index: 20;
  top: 0;
  background: #fff;
}

.ticket-bets-nav {
  display: grid;
  height: 48px;
  padding: 0 16px;
  grid-template-columns: 24px minmax(0, 1fr) 24px;
  align-items: center;
}

.ticket-bets-nav__back.mobile-page-back {
  border-radius: 0;
  background: transparent;
}

.ticket-bets-nav__back img { filter: invert(1); }

.ticket-bets-nav__back:focus-visible { outline-color: #f21184; }

.ticket-bets-nav h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  text-align: center;
}

.ticket-bets-tabs {
  display: grid;
  height: 36px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ticket-bets-tabs button {
  position: relative;
  min-width: 0;
  padding: 0 12px;
  border: 0;
  color: rgba(0, 0, 0, .55);
  background: transparent;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  cursor: pointer;
}

.ticket-bets-tabs button[aria-pressed="true"] {
  color: rgba(0, 0, 0, .9);
  font-weight: 500;
}

.ticket-bets-tabs button[aria-pressed="true"]::after {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 16px;
  height: 3px;
  border-radius: 12px;
  background: #f21184;
  content: "";
  transform: translateX(-50%);
}

.ticket-bets-tabs button:focus-visible { outline: 2px solid #f21184; outline-offset: -2px; }

.ticket-bets-content { padding: 12px 16px; }

.ticket-bets-feedback,
.ticket-bets-empty {
  margin: 48px 0 0;
  color: rgba(0, 0, 0, .55);
  font-size: 14px;
  line-height: 20px;
  text-align: center;
}

.ticket-bets-feedback:empty { display: none; }

.ticket-bets-retry {
  display: block;
  margin: 16px auto 0;
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #f21184;
}

.ticket-bets-row {
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, .05);
}

.ticket-bets-row__heading {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ticket-bets-row__heading strong {
  min-width: 0;
  overflow: hidden;
  color: rgba(0, 0, 0, .9);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-bets-row time {
  display: block;
  margin-top: 8px;
  color: rgba(0, 0, 0, .55);
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 20px;
}

.ticket-bets-badge {
  display: inline-flex;
  height: 24px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 3px 8px;
  border: 0;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  white-space: nowrap;
}

.ticket-bets-badge--pending { color: #b86301; background: #fef1e2; }
.ticket-bets-badge--won { color: #12b262; background: rgba(18, 178, 98, .1); }
.ticket-bets-badge--none { color: rgba(0, 0, 0, .55); background: #e5e5e5; }

button.ticket-bets-badge { cursor: pointer; }

.ticket-bets-badge img {
  display: block;
  width: 16px;
  height: 16px;
  transform: rotate(180deg);
}

.ticket-bets-badge:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

.ticket-bets-footer {
  position: fixed;
  z-index: 18;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  min-height: calc(92px + env(safe-area-inset-bottom));
  align-items: flex-start;
  justify-content: center;
  padding: 24px max(24px, env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  background: #fff;
}

.ticket-bets-footer a {
  position: relative;
  display: flex;
  width: min(100%, 552px);
  height: 44px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, #e5005c 0%, #ff22ae 100%);
  box-shadow: inset 0 1px 18px #ffd9e8, inset 0 1px 4px #ffd9e8;
  font-size: 16px;
  font-weight: 500;
  line-height: 22px;
  text-align: center;
  text-decoration: none;
}

.ticket-bets-footer a::before {
  position: absolute;
  inset: 0;
  background: url("/static/images/ticket-bets/button-texture.png") center / 307px 307px;
  content: "";
  mix-blend-mode: plus-lighter;
  opacity: .4;
}

.ticket-bets-footer a:focus-visible { outline: 2px solid #9f0052; outline-offset: 2px; }

.ticket-bets-footer a::after { position: relative; content: ""; }

.ticket-bets-result {
  width: min(343px, calc(100vw - 32px));
  padding: 24px;
  border: 0;
  border-radius: 16px;
  color: rgba(0, 0, 0, .9);
  background: #fff;
  text-align: center;
}

.ticket-bets-result::backdrop { background: rgba(0, 0, 0, .55); }
.ticket-bets-result h2 { margin: 0; font-size: 20px; line-height: 28px; }
.ticket-bets-result p { margin: 16px 0 24px; color: rgba(0, 0, 0, .55); line-height: 24px; white-space: pre-line; }
.ticket-bets-result > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ticket-bets-result form { margin: 0; }
.ticket-bets-result button,
.ticket-bets-result a { display: flex; width: 100%; height: 42px; align-items: center; justify-content: center; border: 1px solid #f21184; border-radius: 999px; color: #f21184; background: #fff; text-decoration: none; }
.ticket-bets-result a { color: #fff; background: #f21184; }

@media (min-width: 769px) {
  .ticket-bets-shell { border-right: 1px solid #eee; border-left: 1px solid #eee; }
}
