@mobile: ~"only screen and (max-width: 900px), only screen and (pointer: coarse)";
@desktop: ~"only screen and (min-width: 900.01px) and (pointer: fine)";
@portrait: ~"only screen and (orientation: portrait)";
@landscape: ~"only screen and (orientation: landscape)";
@landscapeFullScreen: ~"only screen and (orientation: landscape) and (max-aspect-ratio: 4/3)";
@mobilePortrait: ~"only screen and (max-width: 900px) and (orientation: portrait), only screen and (pointer: coarse) and (orientation: portrait)";
@mobileLandscape: ~"only screen and (max-width: 900px) and (orientation: landscape), only screen and (pointer: coarse) and (orientation: landscape)";
@standardMobiles: ~"only screen and (min-device-width: 360px) and (max-device-width: 916px) and (-webkit-min-device-pixel-ratio: 3) and (orientation: portrait)";
@tabs-width: 250px;
@font-family: 'robotoblack';
@blue-color: #14bffe;
@orange-color: #f1c142;
@almost-white-color: #fef1cf;

@fontFamilyGame: 'TitanOne';
@headerColor: #ffecf8;
@textColor: #fafeff;
@betSlipColor: #f6eae5;

@import "./splash.less";
@import "./paytable.less";

.game-start-notification {
  position: fixed;
  bottom: 80px;
  right: 16px;
  z-index: 500;
  cursor: pointer;
  pointer-events: auto;

  &__inner {
    position: relative;
    background:
      linear-gradient(#fef1cf, #fef1cf) padding-box,
      repeating-linear-gradient(
        -45deg,
        #8b1a1a 0px,
        #8b1a1a 10px,
        #d4bfa0 10px,
        #d4bfa0 20px
      ) border-box;
    border: 4px solid transparent;
    border-radius: 12px;
    padding: 16px 20px;
    min-width: 240px;
    max-width: 320px;
    box-shadow: 3px 3px 12px rgba(0, 0, 0, 0.3);
    animation: gsn-slide-in 0.4s ease-out;

    // Arrow pointing UP toward button (landscape: popup is below button)
    &::before {
      content: '';
      position: absolute;
      top: -9px;
      left: 50%;
      transform: translateX(-50%) rotate(45deg);
      width: 15px;
      height: 15px;
      background: #fef1cf;
      border-top: 4px solid #8b1a1a;
      border-left: 4px solid #8b1a1a;
      z-index: 1;
    }
  }

  &.portrait &__inner {
    min-width: 75vw;
    max-width: 75vw;
    padding: 24px 28px;
  }

  &.portrait &__text {
    font-size: 26px;
  }

  &.portrait &__dismiss-label {
    font-size: 20px;
    gap: 12px;
    margin-top: 14px;
  }

  &.portrait &__checkbox {
    width: 28px;
    height: 28px;

    &.checked::after {
      left: 5px;
      top: -1px;
      width: 10px;
      height: 16px;
    }
  }

  // Arrow pointing DOWN toward button (portrait: popup is above button)
  &.portrait &__inner::before {
    top: auto;
    bottom: -9px;
    border-top: none;
    border-left: none;
    border-right: 4px solid #8b1a1a;
    border-bottom: 4px solid #8b1a1a;
  }

  // Arrow pointing LEFT toward button (button is on left side of screen)
  &.left-side &__inner::before {
    top: 50%;
    left: -9px;
    right: auto;
    bottom: auto;
    transform: translateY(-50%) rotate(45deg);
    border-top: none;
    border-right: none;
    border-left: 4px solid #8b1a1a;
    border-bottom: 4px solid #8b1a1a;
  }

  &.left-side &__inner {
    animation: gsn-slide-in-left 0.4s ease-out;
  }

  &.left-side.dismissing &__inner {
    animation: gsn-slide-out-left 0.4s ease-in forwards;
  }

  &.dismissing &__inner {
    animation: gsn-slide-out 0.4s ease-in forwards;
  }

  &__text {
    font-family: 'robotoblack', sans-serif;
    font-size: 18px;
    color: #8b1a1a;
    //margin-bottom: 6px;
    line-height: 1.3;
    text-align: center;
  }

  &__dismiss-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    cursor: pointer;
    color: #8b1a1a;
    font-family: 'robotoblack', sans-serif;
    font-size: 14px;
  }

  &.portrait &__dismiss-label {
    justify-content: center;
  }

  &__checkbox {
    display: block;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    background: transparent;
    border: 2px solid #8b1a1a;
    border-radius: 4px;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    position: relative;

    &.checked {
      background: #8b1a1a;

      &::after {
        content: '';
        position: absolute;
        left: 3px;
        top: -1px;
        width: 7px;
        height: 11px;
        border-right: 2px solid #fef1cf;
        border-bottom: 2px solid #fef1cf;
        transform: rotate(45deg);
      }
    }
  }
}

@keyframes gsn-slide-in {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes gsn-slide-in-left {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes gsn-slide-out-left {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-40px);
  }
}

@keyframes gsn-slide-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(40px);
  }
}

.buy-feature-button {
  font-family: 'robotoblack', sans-serif;
  .bf-buy-text {
    transform: translateY(5px);
  }
  @media @portrait {
    left: 6% !important;
  }
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.noselect,
div,
span,
a,
p,
h1,
h2,
h3,
h4 {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.gameUI {

  .bf-feature-description {
    white-space: pre-line;
    text-align: left;
  }

  .paylines {
    display: inline-block;
    width: 600px;
    max-width: 90%;

    .flex-container {
      display: inline-block;
      margin: 15px;
    }
  }

  .paylines .square {
    display: inline-flex;
  }

  .replay {
    justify-content: center;
    font-size: 28px !important;
    margin-top: 30px !important;
  }

  .settings {

    h1,
    h2,
    h3,
    h4,
    p {
      font-family: 'Roboto', 'Segoe UI', 'Helvetica', sans-serif;
      font-weight: bold;
      margin: 3px 0;
    }

    h1 {
      font-size: 28px;
      margin: 5px 0;
    }

    h2 {
      font-size: 24px;
      margin: 4px 0;
    }

    h3 {
      font-size: 20px;
      margin: 3px 0;
    }

    .subtitle {
      color: lightgray;
    }

    ul {
      max-width: 90%;
      width: 100%;
      text-align: left;
      font-style: 18px;
      color: lightgray;

      li {
        margin: 4px 0;
      }
    }

    .symbol-group-payout {
      width: 100%;
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
    }

    .symbol-payout {
      margin: 20px 20px 5px;
      display: flex;
      flex-direction: column;
      align-items: center;
      img {
        max-width: 100%;
        max-height: 100px;
        margin: 5px;
      }

    }
  }

}

// BetSlip Promo Popup
@bspp-gold:       #f0c030;
@bspp-gold-dark:  #b07800;
@bspp-gold-light: #ffe066;
@bspp-green:      #2ec840;
@bspp-green-dark: #1a7a27;
@bspp-red:        #c81010;
@bspp-red-dark:   #8b0000;

@keyframes bspp-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(calc(var(--bspp-scale) * 0.93)); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(var(--bspp-scale)); }
}

@keyframes bspp-out {
  from { opacity: 1; transform: translate(-50%, -50%) scale(var(--bspp-scale)); }
  to   { opacity: 0; transform: translate(-50%, -50%) scale(calc(var(--bspp-scale) * 0.93)); }
}

@keyframes bspp-ticket-sway {
  0%   { transform: rotate(-1.5deg); }
  50%  { transform: rotate(1.5deg);  }
  100% { transform: rotate(-1.5deg); }
}


.bspp-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 600;
  background: rgba(0, 0, 0, 0.78);
  pointer-events: auto;
}

.bspp {
  position: absolute;
  top: 44%;
  left: 50%;
  will-change: transform, opacity;
  // scale = min(1, 90vw/660px, 80vh/441px) — tan(atan2(a,b)) divides two lengths into a unitless ratio
  --bspp-scale: ~"min(1, tan(atan2(90vw, 660px)), tan(atan2(72vh, 441px)))";
  @media @mobileLandscape { --bspp-scale: ~"min(1, tan(atan2(70vw, 660px)), tan(atan2(72vh, 441px)))"; }
  transform: translate(-50%, -50%) scale(var(--bspp-scale));
  transform-origin: center center;
  width: 660px;
  height: 441px;
  aspect-ratio: 954 / 638;
  display: flex;
  flex-direction: column;

  background: url('assets/bet-slip/bet_slip_feature_popup_frame_bg.png') center/cover no-repeat;
  border: none;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.9);

  &__frame {
    position: absolute;
    top: -6px;
    right: -6px;
    bottom: -6px;
    left: -6px;
    width: calc(100% + 12px);
    height: calc(100% + 12px);
    pointer-events: none;
    z-index: 2;
  }
  padding-top: 20px;
  overflow: visible;
  animation: bspp-in 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: auto;

  &.dismissing {
    animation: bspp-out 0.28s ease-in forwards;
    pointer-events: none;
  }

  &__confetti {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 14px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.55;
  }

  // SVG running light on border
  &__glow-svg {
    position: absolute;
    top: -6px;
    right: -6px;
    bottom: -6px;
    left: -6px;
    width: calc(100% + 12px);
    height: calc(100% + 12px);
    overflow: visible;
    pointer-events: none;
    z-index: 3;
  }

  &__glow-rect {
    x: 2px;
    y: 2px;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    fill: none;
    stroke: rgba(255, 80, 80, 0.9);
    stroke-width: 3;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
    stroke-dasharray: 80 3000;
    filter: drop-shadow(0 0 3px rgba(220, 20, 20, 1)) drop-shadow(0 0 7px rgba(180, 0, 0, 0.7));
  }

  &__glow-rect--btn {
    stroke-dasharray: 60 2000;
    x: 0;
    y: 0;
    width: 100%;
    height: 100%;
    rx: 10px;
    ry: 10px;
  }


  &__badge {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    background: url('assets/bet-slip/bet_slip_feature_popup_title_bg.png') center/100% 100% no-repeat;
    color: #ffffff;
    font-family: @fontFamilyGame, sans-serif;
    font-size: 20px;
    font-weight: normal;
    padding: 4px 32px 12px;
    white-space: nowrap;
    letter-spacing: 1.5px;
    z-index: 3;
  }

  &__close {
    position: absolute;
    top: -30px;
    right: -30px;
    width: 62px;
    height: 62px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 3;

    img {
      width: 100%;
      height: 100%;
      display: block;
      object-fit: contain;
    }
  }

  &__main {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 28px 12px;
    flex: 1;
  }

  &__left {
    flex: 1.6;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding-right: 220px;
  }

  &__headline {
    font-family: @fontFamilyGame, sans-serif;
    font-size: 38px;
    text-transform: uppercase;
    line-height: 1;
    letter-spacing: 0.5px;
    white-space: nowrap;
    -webkit-text-stroke: 1px #ffffff;
    paint-order: stroke fill;
    background: linear-gradient(to bottom, #9560c8 0%, #8347b1 40%, #5436a9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0px 0.05em 0px rgba(30, 10, 60, 0.5));
  }

  &__feature-name {
    font-family: @fontFamilyGame, sans-serif;
    font-size: 64px;
    text-transform: uppercase;
    line-height: 1;
    letter-spacing: 1px;
    margin-bottom: -4px;
    white-space: nowrap;
    -webkit-text-stroke: 3px #ab0018;
    paint-order: stroke fill;
    background: linear-gradient(to bottom, #ff7263 0%, #ff8080 20%, #ffe5e5 50%, #ffffff 70%, #fa4d49 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0px 0.05em 0px rgba(100, 0, 10, 0.5));
  }

  &__subtitle {
    font-family: @fontFamilyGame, sans-serif;
    font-size: 38px;
    text-transform: uppercase;
    line-height: 1;
    letter-spacing: 0.5px;
    white-space: nowrap;
    -webkit-text-stroke: 1px #ffffff;
    paint-order: stroke fill;
    background: linear-gradient(to bottom, #9560c8 0%, #8347b1 40%, #5436a9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0px 0.05em 0px rgba(30, 10, 60, 0.5));
  }

  &.ja_jp, &.zh_cn, &.zh_tw, &.th_th, &.ka_ge, &.km_kh {
    .bspp__headline,
    .bspp__subtitle {
      -webkit-text-stroke: 0;
      -webkit-text-fill-color: #9560c8;
      background: none;
      font-size: 30px;
    }
    .bspp__try {
      font-size: 28px;
    }
    .bspp__badge {
      -webkit-text-stroke: 0;
      font-size: 16px;
    }
  }

  &.ka_ge, &.el_gr, &.ko_kr, &.uk_ua, &.ru_ru {
    .bspp__try {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding-top: 0.25em;
      padding-bottom: 0.25em;
    }
  }

  &.tr_tr, &.ro_ro, &.cs_cz, &.hr_hr, &.hu_hu, &.ka_ge, &.lt_lt, &.lv_lv, &.pl_pl, &.sk_sk, &.vi_vn {
    .bspp__headline,
    .bspp__subtitle,
    .bspp__feature-name,
    .bspp__try,
    .bspp__badge,
    .bspp__ticket {
      font-family: 'robotoblack', sans-serif;
    }
  }

  &.ro_ro {
    .bspp__headline,
    .bspp__subtitle,
    .bspp__feature-name {
      padding-bottom: 0.12em;
    }
  }

  &.da_dk, &.no_no {
    .bspp__try {
      padding-bottom: 0.35em;
    }
  }

  &.km_kh {
    .bspp__try {
      font-size: 22px;
    }
  }

  &__right {
    position: absolute;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  &__ticket {
    font-size: 16px;
    background:
      linear-gradient(#fdf0e0, #fdf0e0) padding-box,
      repeating-linear-gradient(
        -45deg,
        #c91010 0px, #c91010 5px,
        #f5f5f5 5px, #f5f5f5 10px
      ) border-box;
    border: 5px solid transparent;
    border-radius: 0.6em;
    width: 13em;
    transform-origin: center top;
    animation: bspp-ticket-sway 14s ease-in-out infinite;
    box-shadow:
      0 0.6em 2em rgba(0,0,0,0.65),
      0 0.15em 0.5em rgba(0,0,0,0.35);
    overflow: hidden;
    font-family: @fontFamilyGame, sans-serif;
    text-align: center;
  }

  &__ticket-header {
    background: none;
    font-size: 1.1em;
    font-weight: bold;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.4em 0.5em 0.2em;
    color: #c91010;
  }

  &__ticket-symbol-wrap {
    display: flex;
    justify-content: center;
    padding: 0.8em 0.5em 0.6em;
  }

  &__ticket-symbol {
    width: 5.5em;
    height: 5.5em;
    object-fit: contain;
    flex-shrink: 0;
  }

  &__ticket-info {
    padding: 0.1em 0.5em 0.4em;
  }

  &__ticket-collect {
    font-size: 0.72em;
    font-weight: bold;
    color: #6a3fbf;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.35;
  }

  &__ticket-mult {
    font-size: 0.78em;
    font-weight: bold;
    color: #6a3fbf;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.2em;
  }

  &__ticket-divider {
    height: 0.08em;
    background: rgba(180,0,20,0.2);
    margin: 0 0.5em;
  }

  &__ticket-bet {
    font-size: 0.78em;
    font-weight: bold;
    color: #3a1010;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.35em 0.5em;
  }

  &__ticket-win-label {
    font-size: 0.68em;
    font-weight: bold;
    color: #c91010;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding-top: 0.4em;
  }

  &__ticket-win-amount {
    font-size: 1.5em;
    font-weight: bold;
    color: #c91010;
    letter-spacing: 0.04em;
    padding: 0.1em 0.5em 0.5em;
    border: 0.08em solid rgba(180,0,20,0.4);
    border-radius: 0.2em;
    margin: 0 0.6em 0.3em;
    text-shadow: 0 1px 0 rgba(255,255,255,0.5);
  }

  &__footer {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 28px 0;
  }

  &__try {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);
    width: auto;
    padding: 0.3em 2em 0.2em;
    border-radius: 10px;
    border: 3px solid #cc0000;
    font-family: @fontFamilyGame, sans-serif;
    font-size: 34px;
    line-height: 1;
    letter-spacing: 2px;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    -webkit-text-stroke: 0;
    -webkit-text-fill-color: #ffffff;
    background-clip: padding-box;
    -webkit-background-clip: padding-box;
    background-image: linear-gradient(180deg, #e84040 0%, @bspp-red 40%, @bspp-red-dark 100%);
    text-shadow: 0 3px 0 #790005;
    box-shadow:
      0 5px 0 #790005,
      0 8px 16px rgba(0,0,0,0.5),
      inset 0 2px 0 rgba(255,255,255,0.25),
      inset 0 -2px 0 rgba(0,0,0,0.15);
    transition: filter 0.12s, box-shadow 0.1s;

    &:hover { filter: brightness(1.1); }
    &:active {
      box-shadow:
        0 2px 0 #790005,
        0 4px 8px rgba(0,0,0,0.4),
        inset 0 3px 6px rgba(0,0,0,0.3),
        inset 0 -1px 0 rgba(0,0,0,0.1);
    }
  }

  &__later {
    position: absolute;
    bottom: -4em;
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
    border: none;
    color: #80aaa4;
    font-family: 'robotoblack', sans-serif;
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.15s;

    &:hover { color: #acd4ce; }

    @media @mobilePortrait { font-size: 1.5em; bottom: -3em; }
  }

}
