/* =========================
   CHS JackPAWT Live Jackpot
   Widget + Banner + Popup
========================= */

/* ---------- Ticket widget ---------- */
.jackpawt-ticket{
  position: relative;
  display: inline-block;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg,#F07AC8 0%,#D95DBB 35%,#B547AE 100%);
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  text-align: center;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.jackpawt-ticket::before,
.jackpawt-ticket::after{
  content:'';
  position:absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.85);
  top: 50%;
  transform: translateY(-50%);
}
.jackpawt-ticket::before{ left: -11px; }
.jackpawt-ticket::after{ right: -11px; }

.ticket-inner{
  background: rgba(255,255,255,0.94);
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: inset 0 0 0 2px #8C2E8F;
}

.ticket-label{
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8C2E8F;
  margin-bottom: 6px;
}

.ticket-jackpot{
  font-size: clamp(2.4rem, 4.5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.05;
  color: #5A0F5F;
  margin-bottom: 4px;
}

.ticket-sub{
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #8C2E8F;
}

.jackpawt-ticket:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.28),
              inset 0 0 0 2px rgba(255,255,255,0.4);
  filter: brightness(1.02);
  cursor: pointer;
}

.jackpawt-ticket:focus-visible{
  outline: 3px solid rgba(255,255,255,0.95);
  outline-offset: 4px;
}


/* ---------- Banner ---------- */
.jackpawt-banner{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;

  padding: 14px 16px;
  border-radius: 16px;

  background: linear-gradient(
    90deg,
    var(--jp-grad-top, #F07AC8) 0%,
    var(--jp-grad-mid, #D95DBB) 40%,
    var(--jp-grad-bot, #B547AE) 100%
  );

  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  color: #fff;

  cursor: pointer;
  transition: transform .18s ease, filter .18s ease;
}

.jackpawt-banner:focus-visible{
  outline: 3px solid rgba(255,255,255,0.95);
  outline-offset: 4px;
}

.jackpawt-banner__left{
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 140px;
}

.jackpawt-banner__label{
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.jackpawt-banner__sub{
  margin-top: 4px;
  font-weight: 800;
  opacity: 0.92;
  letter-spacing: 0.06em;
}

.jackpawt-banner__amount{
  font-weight: 1000;
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  line-height: 1;
  white-space: nowrap;

  padding: 10px 14px;
  border-radius: 12px;

  background: rgba(255,255,255,0.92);
  color: var(--jp-text-main, #5A0F5F);
  box-shadow: inset 0 0 0 2px var(--jp-frame, #8C2E8F);
}

.jackpawt-banner__cta{
  font-weight: 900;
  letter-spacing: 0.04em;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0,0,0,0.22);
  white-space: nowrap;
}

@media (max-width: 520px){
  .jackpawt-banner{
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }
  .jackpawt-banner__left{
    min-width: auto;
    align-items: center;
  }
}

/* Sitewide placement (in flow, under header, scrolls away) */
.jackpawt-banner--sitewide{
  position: relative;
  z-index: 5;
  border-radius: 0;
  margin: 0;
}


/* =========================================================
   POPUP
========================================================= */

.chs-jp-sheet{
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: none;
}
.chs-jp-sheet.is-open{ display: block; }

.chs-jp-sheet__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
}

/* Sheet panel: 80% height, slides up */
.chs-jp-sheet__panel{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  height: 80vh;
  max-height: 80vh;

  padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));

  transform: translateY(100%);
  transition: transform 320ms cubic-bezier(.2,.9,.2,1);
  will-change: transform;

  /* keep panel itself invisible; ticket card provides the visuals */
  background: transparent;

  overflow: hidden; /* crop vibe */
}

.chs-jp-sheet.is-open .chs-jp-sheet__panel{
  transform: translateY(0);
}

/* Close button floats above everything */
.chs-jp-sheet__close{
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 10;

  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;

  background: rgba(0,0,0,0.35);
  color: #fff;
  font-size: 26px;
  line-height: 40px;
}

/* Ticket-shaped card (this is the visible “popup”) */
.chs-jp-popup{
  position: relative;
  width: 100%;
  max-width: 420px;

  /* center inside the 80vh sheet */
  margin: auto;

  /* keep proportions consistent */
  aspect-ratio: 500 / 723;

  background: var(--jp-pop-bg, #ffffff);
  color: var(--jp-pop-text, #2b0030);

  /* ticket mask (no distortion) */
  -webkit-mask-image: url('/wp-content/plugins/chs-jackpawt-live-jackpot/assets/svg/ticket-blank.svg');
  mask-image: url('/wp-content/plugins/chs-jackpawt-live-jackpot/assets/svg/ticket-blank.svg');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;

  box-shadow: 0 18px 45px rgba(0,0,0,0.35);
  border-style: solid;
  border-width:5px;
}

/* Content layout inside ticket */
.chs-jp-popup__head{
  padding: 54px 26px 0;
  text-align: center;
  border:5px solid var(--jp-pop-title-border, #2b0030);
    box-shadow: inset 0 0 0 5px var(--jp-frame, #8C2E8F);
  
}

.chs-jp-popup__title{
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 2rem;
  padding: 0.5rem;
  margin-top:2.5rem;
  border:5px solid var(--jp-pop-title-border, #2b0030);
    box-shadow: inset 0 0 0 5px var(--jp-frame, #8C2E8F);
}


.chs-jp-popup__sub{
  margin: 17px 0 0;
  opacity: 0.9;
  font-weight: 700;
  font-size: 1rem;
}

.chs-jp-popup__body{
  padding: 18px 26px 48px;
  text-align: center;
  border:5px solid var(--jp-pop-title-border, #2b0030);
      box-shadow: inset 0 0px 0 5px var(--jp-frame, #8C2E8F);
}

.chs-jp-popup__amount{
  font-weight: 1000;
  font-size: clamp(2.4rem, 7vw, 3.2rem);
  line-height: 1;
  margin: 18px 0 18px;
  color: var(--jp-pop-amount, #2b0030);
}

.chs-jp-popup__btn{
  display: inline-flex;
  width: 100%;
  justify-content: center;
  align-items: center;

  padding: 16px 14px;
  border-radius: 14px;
  text-decoration: none;

  background: var(--jp-pop-btn-bg, #f2f0f6);
  color: var(--jp-pop-btn-text, #2b0030);
  font-weight: 900;
}

.chs-jp-popup__fine{
  margin-top: 12px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
}
/* === Close button ON the ticket === */
.chs-jp-sheet__close{
  position: absolute;              /* stays inside the ticket */
  top: 14px;
  right: 14px;

  width: 80px;
  height: 40px;

  display: flex;                   /* 👈 THIS fixes it */
  align-items: center;             /* vertical center */
  justify-content: center;         /* horizontal center */

  border-radius: 999px;
  border: 0;
  cursor: pointer;

  background: var(--jp-pop-btn-bg, #f2f0f6);
  color: var(--jp-pop-btn-text, #2b0030);

  font-size: 26px;
  line-height: 1;                  /* 👈 important */
}


/* Wrapper becomes the positioning context */
.chs-jp-popup-wrap{
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: auto;
}

/* Make ticket fill wrapper */
.chs-jp-popup{
  width: 100%;
}

/* X sits on top of the ticket */
.chs-jp-popup-wrap .chs-jp-sheet__close{
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 999;

  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;

  background: rgba(0,0,0,0.35);
  color: #fff;
  font-size: 24px;
  line-height: 36px;
}

