/* Khmer overrides on top of the original main.css.
   main.css is left byte-for-byte untouched so it stays easy to re-diff against
   the mirror in ../site/. Everything below either restyles a locale-baked image
   as live text, or styles the markup this build added. */

:root {
  --kh-font: "Noto Sans Khmer", "Khmer OS", system-ui, sans-serif;
  --kh-gold: #ffd400;
  --kh-red: #ff2400;
}

body,
.main,
.main__button,
.main__bonus-wrap-currency {
  font-family: var(--kh-font);
}

/* Khmer stacks subscript consonants (coeng) below the baseline and marks above
   it, so tight leading clips them. letter-spacing must stay `normal` — any
   tracking splits a cluster into loose pieces. */
body {
  line-height: 1.6;
  letter-spacing: normal;
}

.kh-bonus__title,
.kh-modal__title,
.kh-modal__subtitle,
.kh-modal__text,
.kh-modal__cta,
.kh-modal__note,
.main__button {
  letter-spacing: normal;
}

/* --------------------------------------------------------------------- header
   Branding removed. The element stays as an invisible spacer because the
   wheel's vertical position is measured from the bottom of the header — drop
   the box and the wheel rides up out of the viewport. */
.header__logo {
  background-image: none;
  pointer-events: none;
}

/* ---------------------------------------------------------------- bonus panel
   en-bonus.png has "YOU WON" baked into the artwork. Swap in the plain
   candy-frame panel and render the heading as real (translatable) text. */
.main__bonus,
body[data-lang=khmer] .main__bonus {
  background: url(img/bg-modal-mobile-small.png) 50% / 100% 100% no-repeat;
  /* The original panel was sized for two prize rows (cash + free spins). With a
     single row, let the content set the height. Padding is applied by app.js in
     px from the panel's own width — a % padding here would resolve against the
     PARENT's width (that is what the spec says) and collapse the content to 0. */
  height: auto;
  padding: 0;
  justify-content: center;
}

.kh-bonus__title {
  margin: 0 0 .35em;
  text-align: center;
  font-weight: 800;
  line-height: 1.55;
  color: #fff;
  text-shadow: 0 2px 0 #b41800, 0 0 12px rgba(255, 212, 0, .9);
  /* font-size is set by app.js from the panel's rendered width */
}

/* ec-grape-num.png is the literal string "5,300". Drop the image, print a number. */
.main__bonus-grape-num,
body[data-lang=khmer] .main__bonus-grape-num {
  background: none;
  color: #fff;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
  text-shadow: 0 2px 0 #b41800;
  /* font-size / line-height set by app.js to match the CSS-driven height */
}

.main__bonus-grape-gif-num,
body[data-lang=khmer] .main__bonus-grape-gif-num {
  background: none;
  width: auto;
  min-width: 76px;
  color: #fff;
  font-weight: 800;
  text-align: center;
  text-shadow: 0 2px 0 #b41800, 0 0 10px rgba(255, 212, 0, .9);
}

/* ------------------------------------------------------------------ spin CTA */
.main__button {
  font-family: var(--kh-font);
  font-weight: 800;
}

/* ---------------------------------------------------------------- claim modal
   Replaces #form-container: no inputs, one button. The original modal header /
   subheader were Spanish text baked into PNGs, so both are text here. */
.kh-modal {
  text-align: center;
  color: #fff;
}

.kh-modal__title {
  margin: 0 0 6px;
  font-size: 40px;
  font-weight: 800;
  line-height: 1.55;
  color: var(--kh-gold);
  text-shadow: 0 3px 0 #b41800, 0 0 18px rgba(255, 212, 0, .55);
}

.kh-modal__subtitle {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
}

.kh-modal__amount {
  margin: 0 0 18px;
  font-size: 54px;
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 3px 0 #b41800, 0 0 24px rgba(255, 212, 0, .8);
}

.kh-modal__text {
  margin: 0 0 26px;
  font-size: 17px;
  line-height: 1.75;
  color: #fff;
}

.kh-modal__cta {
  display: block;
  padding: 16px 20px;
  border-radius: 6px;
  background: linear-gradient(180deg, #ff5a2b, var(--kh-red));
  box-shadow: 0 5px 0 #a81800, 0 8px 20px rgba(0, 0, 0, .35);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.5;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
  animation: kh-cta-pulse 1.8s ease-in-out infinite;
}

.kh-modal__cta:hover { filter: brightness(1.08); }

.kh-modal__cta:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #a81800, 0 3px 10px rgba(0, 0, 0, .35);
  animation: none;
}

@keyframes kh-cta-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.035); }
}

.kh-modal__note {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: hsla(0, 0%, 100%, .78);
}

.modal__bottom-img { margin-top: 6px; }

@media screen and (max-width: 1365.9px) {
  .kh-modal__title  { font-size: 30px; }
  .kh-modal__subtitle { font-size: 17px; }
  .kh-modal__amount { font-size: 40px; }
  .kh-modal__text   { font-size: 15px; margin-bottom: 20px; }
  .kh-modal__cta    { font-size: 18px; padding: 13px 16px; }
}

@media screen and (max-width: 479.9px) {
  .kh-modal__title  { font-size: 25px; }
  .kh-modal__subtitle { font-size: 15px; }
  .kh-modal__amount { font-size: 34px; margin-bottom: 12px; }
  .kh-modal__text   { font-size: 14px; margin-bottom: 16px; }
  .kh-modal__cta    { font-size: 17px; padding: 12px 14px; }
  .kh-modal__note   { font-size: 12px; }
}

@media screen and (max-width: 320.9px) {
  .kh-modal__title  { font-size: 22px; }
  .kh-modal__amount { font-size: 29px; }
}
