/*
 * Final parity layer for the original JetX auxiliary surfaces and interactions.
 * This file is intentionally last in the cascade.
 */

@keyframes reference-online-roll-up {
  to { transform: translateY(-22px); }
}

@keyframes reference-online-roll-down {
  to { transform: translateY(22px); }
}

.online-odometer .digit-strip {
  transform: translateY(0);
  will-change: transform;
}

.reference-info-empty,
.reference-history-empty {
  padding: 24px 10px;
  color: #596079;
  font: 11px/16px var(--font-family-medium);
  text-align: center;
}

.reference-chat #send-chat:disabled {
  opacity: 1;
  cursor: default;
}

.reference-chat {
  z-index: 14000;
}

.reference-chat .chat-div {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 820px;
  height: 570px;
  margin: -285px 0 0 -410px;
  border-radius: var(--border-radius);
  background: #1c1e29;
  color: #d0d7e5;
  font: 18px/normal var(--font-family-medium);
  font-feature-settings: 'case' on;
  text-align: center;
}

.reference-chat .head {
  height: 60px;
  padding: 0 25px 0 55px;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  background: #0f1017;
  color: #596079;
  font-size: 14px;
  line-height: 60px;
  text-align: left;
}

.reference-chat .chat-content {
  height: calc(100% - 60px);
  padding: 30px;
}

.reference-chat .chat-message {
  height: calc(100% - 44px);
  padding-right: 10px;
  overflow-y: auto;
}

.reference-chat .chat-input {
  height: 44px;
  padding: 5px;
  border-radius: 6px;
  background: #0b0c0f;
}

.reference-chat .chat-input-left {
  float: left;
  width: calc(100% - 100px);
  padding: 0 12px;
}

.reference-chat .chat-input-left input {
  width: 100%;
  height: 34px;
  border: 0;
  background: none;
  color: #9499b0;
  font: 12px/34px var(--font-family-medium);
}

.reference-chat .chat-input-right {
  float: right;
  width: 100px;
  height: 34px;
  border-radius: var(--border-radius);
  background: #13151d;
}

.reference-chat .chat-input-right input {
  width: 100%;
  height: 34px;
  border: 0;
  background-color: transparent;
  color: #34394c;
  font: 12px/34px var(--font-family-medium);
  text-align: center;
}

@media screen and (min-width: 851px) {
  /* The desktop capture is missing ImagesLight/win.png; use its bundled
     original mobile artwork at the reference desktop dimensions. */
  .bet .win {
    height: 79px !important;
    padding-top: 25px !important;
    background-image: url('/reference/JetXStg3/Content/ImagesLight/Mobile/win.png') !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
  }

  .bet .win.reference-win-visible {
    z-index: 3 !important;
    animation: jetx-win-rise-desktop 500ms ease forwards, jetx-win-fade 100ms linear 1500ms forwards !important;
  }
}

.reference-history-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, .8);
}

.reference-history-shell {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 820px;
  height: 570px;
  margin: -285px 0 0 -410px;
  overflow: hidden;
  border-radius: var(--border-radius);
  background: #1c1e29;
  color: #d0d7e5;
  font-family: var(--font-family-medium);
  font-feature-settings: 'case' on;
}

.reference-history-head {
  position: relative;
  height: 60px;
  padding: 0 55px;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  background: #0f1017;
  color: #596079;
  font-size: 14px;
  line-height: 60px;
  text-align: left;
  text-transform: uppercase;
}

.reference-history-head::before {
  content: '';
  position: absolute;
  left: 22px;
  top: 20px;
  width: 20px;
  height: 20px;
  border: 2px solid #596079;
  border-radius: 50%;
  box-sizing: border-box;
}

.reference-history-head::after {
  content: '';
  position: absolute;
  left: 31px;
  top: 24px;
  width: 1px;
  height: 7px;
  background: #596079;
  box-shadow: 3px 6px 0 #596079;
  transform-origin: bottom center;
}

.reference-history-head button {
  position: absolute;
  right: 25px;
  top: 22px;
  width: 17px;
  height: 16px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.reference-history-tabs {
  display: flex;
  height: 45px;
  border-bottom: 1px solid #11131a;
  background: #171923;
}

.reference-history-tabs a {
  position: relative;
  width: 50%;
  color: #596079;
  font-size: 12px;
  line-height: 45px;
  text-align: center;
  cursor: pointer;
}

.reference-history-tabs a.active {
  color: #fddd55;
}

.reference-history-tabs a.active::after {
  content: '';
  position: absolute;
  left: 25%;
  right: 25%;
  bottom: 0;
  height: 2px;
  background: #fddd55;
}

.reference-history-table {
  height: calc(100% - 105px);
  padding: 20px 30px 30px;
}

.reference-history-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  min-height: 28px;
  margin-bottom: 1px;
  border-radius: 3px;
  background: var(--grey-button);
  color: #9499b0;
  font-size: 11px;
  line-height: 28px;
  text-align: center;
}

.reference-history-row.head {
  min-height: 30px;
  border-radius: 3px;
  background: #12141c;
  color: #596079;
  line-height: 30px;
}

.reference-history-row strong {
  font-weight: normal;
}

.reference-history-row strong.win {
  color: #4ec520;
}

.reference-history-row strong.lose {
  color: #ff5151;
}

.reference-history-list {
  height: calc(100% - 31px);
  margin-top: 2px;
  overflow-y: auto;
}

@media screen and (max-width: 850px) {
  @keyframes reference-online-roll-up {
    to { transform: translateY(-12px); }
  }

  @keyframes reference-online-roll-down {
    to { transform: translateY(12px); }
  }

  /* The reference keeps both mobile betting sections visually joined. */
  #main .cash-game.simple {
    gap: 0 !important;
  }

  #main .cash-game.simple .buttons-col,
  #main .cash-game.simple #button-0,
  #main .cash-game.simple #button-1 {
    margin-bottom: 0 !important;
  }

  #main .cash-game.simple .buttons-col > .bet-div,
  #main .cash-game.simple #button-0 > .bet-div,
  #main .cash-game.simple #button-1 > .bet-div {
    border-radius: 0 !important;
  }

  /* On mobile the multiplier suffix sits at the bottom edge of the field. */
  #main .cash-game.simple .buttons-col .bet-input.cash-out .input > div > span {
    top: auto !important;
    bottom: 0 !important;
    height: 16px !important;
    margin-top: 0 !important;
    line-height: 16px !important;
    transform: translateY(1px) !important;
  }

  #right.info-div .info-content {
    display: none !important;
  }

  #right.info-div .info-content.active {
    display: block !important;
  }

  .reference-chat .chat-div {
    position: static;
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    background: transparent;
  }

  .reference-chat {
    position: fixed;
    inset: 25px 0 0;
    width: 100%;
    height: calc(100% - 25px);
    border-radius: 2px;
    background: #161821;
    z-index: 13010;
  }

  .reference-chat .head {
    position: relative;
    height: 40px;
    padding: 0 0 0 55px;
    border-radius: 0;
    background: #0f1017;
    font: 12px/40px var(--font-family-regular);
  }

  .reference-chat .chat-content {
    height: calc(100% - 40px);
    padding: 10px;
    border-top: 1px solid #0a0c11;
  }

  .reference-chat .chat-message {
    height: calc(100% - 44px);
    padding-right: 0;
  }

  .reference-chat .chat-input {
    height: 44px;
    padding: 5px;
    border-radius: 3px;
  }

  .reference-chat .chat-input-left {
    width: calc(100% - 100px);
    height: 34px;
    padding: 0 12px;
  }

  .reference-chat .chat-input-left input {
    height: 34px;
    font-size: 12px;
    line-height: 34px;
  }

  .reference-chat .chat-input-right,
  .reference-chat .chat-input-right input {
    width: 100px;
    height: 34px;
    line-height: 34px;
  }

  .reference-chat .head .close svg {
    display: none;
  }

  .reference-history-overlay {
    top: 25px;
    bottom: 0;
    height: calc(100% - 25px);
    z-index: 11;
    background: #161821;
  }

  .reference-history-shell {
    position: static;
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
  }

  .reference-history-head {
    height: 40px;
    padding: 0 55px;
    border-radius: 0;
    font-family: var(--font-family-regular);
    font-size: 12px;
    line-height: 40px;
    text-transform: none;
  }

  .reference-history-head::before {
    left: 20px;
    top: 10px;
  }

  .reference-history-head::after {
    left: 29px;
    top: 14px;
  }

  .reference-history-head button {
    right: 2px;
    top: 2px;
    width: 34px;
    height: 34px;
    background: url('/reference/JetXStg3/Content/ImagesLight/Icons/exit.svg') no-repeat center;
    transform: rotate(180deg);
  }

  .reference-history-head button svg {
    display: none;
  }

  .reference-history-tabs {
    height: 40px;
  }

  .reference-history-tabs a {
    font-size: 10px;
    line-height: 40px;
  }

  .reference-history-table {
    height: calc(100% - 80px);
    padding: 10px;
  }

  .reference-history-row {
    min-height: 26px;
    font-size: 10px;
    line-height: 26px;
  }

  .reference-history-row.head {
    min-height: 28px;
    line-height: 28px;
  }

  .reference-history-list {
    height: calc(100% - 30px);
  }
}

@media screen and (max-width: 850px) and (orientation: landscape) {
  .reference-chat {
    position: absolute;
    z-index: 13010;
  }

  .reference-chat .head {
    height: 30px;
    padding-left: 40px;
    line-height: 30px;
  }

  .reference-chat .head::before {
    left: 10px;
    top: 5px;
  }

  .reference-chat .head .close {
    top: -2px;
    width: 32px;
    height: 32px;
  }

  .reference-chat .chat-content {
    height: calc(100% - 30px);
    padding: 5px;
  }

  .reference-chat .chat-message {
    height: calc(100% - 34px);
  }

  .reference-chat .chat-outer {
    min-height: 20px;
    padding: 5px 3px;
    border-radius: 2px;
    font-size: 10px;
  }

  .reference-chat .chat-date,
  .reference-chat .chat-user {
    width: 40px;
  }

  .reference-chat .chat-text {
    width: calc(100% - 80px);
    font-size: 11px;
  }

  .reference-chat .chat-input {
    height: 34px;
    padding: 5px;
    border-radius: 2px;
  }

  .reference-chat .chat-input-left {
    width: calc(100% - 70px);
    height: 24px;
    padding: 0 5px;
  }

  .reference-chat .chat-input-left input {
    height: 24px;
    font-size: 11px;
    line-height: 24px;
  }

  .reference-chat .chat-input-right,
  .reference-chat .chat-input-right input {
    width: 70px;
    height: 24px;
    font-size: 11px;
    line-height: 24px;
  }

  .reference-history-overlay {
    position: absolute;
  }

  .reference-history-head {
    height: 30px;
    line-height: 30px;
  }

  .reference-history-head::before {
    top: 5px;
  }

  .reference-history-head::after {
    top: 9px;
  }

  .reference-history-head button {
    top: -2px;
  }

  .reference-history-tabs {
    height: 30px;
  }

  .reference-history-tabs a {
    line-height: 30px;
  }

  .reference-history-table {
    height: calc(100% - 60px);
    padding: 5px 10px 10px;
  }
}
