/* RTP LIVE – portal helper UI
   Scoped by class names; never touches body/html.
*/

.rtp-live-page .elementor-location-header,
.rtp-live-page .elementor-location-footer{
  display:none !important;
}

/* --- Embedded controls (must sit inside the motor status block) --- */
.rtp-live-controls{
  width: 100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 10px 12px;
  margin-top: 12px;
  border-radius: 14px;
  background: rgba(0,0,0,.32);
  border: 1px solid rgba(255,255,255,.08);

  /* Force non-sticky even if theme has generic sticky rules */
  position: static !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
}

.rtp-live-controls__left{
  display:flex;
  align-items:center;
  gap: 10px;
  min-width: 0;
}

.rtp-live-controls__right{
  display:flex;
  align-items:center;
  gap: 8px;
  flex: 0 0 auto;
}

.rtp-live-controls__dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #24b35a;
  box-shadow: 0 0 0 3px rgba(36,179,90,.15);
  flex: 0 0 auto;
}

.rtp-live-controls[data-state="warn"] .rtp-live-controls__dot{
  background: #f6c343;
  box-shadow: 0 0 0 3px rgba(246,195,67,.16);
}

.rtp-live-controls[data-state="bad"] .rtp-live-controls__dot{
  background: #ff5c5c;
  box-shadow: 0 0 0 3px rgba(255,92,92,.16);
}

.rtp-live-controls__text{
  font-size: 12px;
  font-weight: 700;
  color:#fff;
  white-space: nowrap;
}

.rtp-live-controls__meta{
  font-size: 12px;
  color: rgba(255,255,255,.70);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 52vw;
}

/* Admin-only debug line (paused / inflight / backoff) */
.rtp-live-controls__debug{
  font-size: 11px;
  color: rgba(255,255,255,.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 52vw;
}

/* small, non-bold buttons */
.rtp-live-mini-btn{
  font-size: 12px;
  line-height: 1;
  padding: 7px 10px;
  border-radius: 10px;
  font-weight: 500 !important;
}

.rtp-live-controls .rt-btn{
  font-weight: 500 !important;
}

@media (max-width: 720px){
  .rtp-live-controls{
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .rtp-live-controls__right{ width: 100%; justify-content:flex-end; }
  .rtp-live-controls__meta{ max-width: 92vw; }
}

/* --- Portal overlay (Go LIVE) --- */
.rtp-live-overlay{
  position: fixed;
  inset: 0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
  background: rgba(0,0,0,.72);
  z-index: 999999;
}

.rtp-live-overlay__card{
  width: min(560px, 100%);
  background: rgba(15,15,18,.92);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
}

.rtp-live-overlay__pill{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  color: rgba(255,255,255,.8);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(0,0,0,.25);
}

.rtp-live-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #24b35a;
  box-shadow: 0 0 0 3px rgba(36,179,90,.15);
}

.rtp-live-overlay__title{
  margin: 10px 0 6px 0;
  font-size: 22px;
  font-weight: 900;
  color:#fff;
}

.rtp-live-overlay__text{
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255,255,255,.72);
}

.rtp-live-overlay__actions{
  display:flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.rtp-live-overlay .rt-btn{
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 15px;
}

@media (max-width: 520px){
  .rtp-live-overlay__actions .rt-btn{ width: 100%; }
}

/* Hide any leftover legacy FAB/controls from older builds */
#rtp-live-fab,
.rtp-live-fab,
.rt-live-fab,
.rt-live-fullscreen,
.rt-live-fs{
  display:none !important;
}

/* --- Winner modal (Cup final complete) --- */
.rtp-winner-open{ overflow: hidden !important; }

.rtp-winner-modal{
  position: fixed;
  inset: 0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
  background: rgba(0,0,0,.76);
  z-index: 1000000;
}

/* --- Session/nonce expired modal (LIVE hardening) --- */
.rtp-session-open{ overflow: hidden !important; }

.rtp-session-modal{
  position: fixed;
  inset: 0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
  background: rgba(0,0,0,.78);
  z-index: 1000002;
}

.rtp-session-modal__card{
  width: min(560px, 100%);
  background: rgba(15,15,18,.94);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  padding: 18px 18px 16px 18px;
  box-shadow: 0 24px 80px rgba(0,0,0,.55);
  position: relative;
  outline: none;
}

.rtp-session-modal__badge{
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,92,92,.14);
  border: 1px solid rgba(255,92,92,.25);
  font-size: 20px;
  margin-bottom: 10px;
}

.rtp-session-modal__title{
  margin: 0 0 8px 0;
  font-size: 22px;
  font-weight: 900;
  color: #fff;
}

.rtp-session-modal__text{
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255,255,255,.74);
}

.rtp-session-modal__actions{
  display:flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.rtp-session-modal__actions .rt-btn{
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 15px;
}

.rtp-session-modal__hint{
  margin-top: 10px;
  font-size: 12px;
  color: rgba(255,255,255,.55);
}

@media (max-width: 520px){
  .rtp-session-modal__actions .rt-btn{ width: 100%; }
}

.rtp-winner-modal__card{
  width: min(65vw, 980px);
  height: min(65vh, 720px);
  background: rgba(15,15,18,.94);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 22px;
  padding: 22px 22px 18px 22px;
  box-shadow: 0 24px 80px rgba(0,0,0,.55);
  position: relative;
  display:flex;
  flex-direction: column;
  align-items:center;
  justify-content:flex-start;
  gap: 16px;
}

.rtp-winner-modal__close{
  position:absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.25);
  color: rgba(255,255,255,.92);
  font-size: 22px;
  line-height: 34px;
  cursor: pointer;
}

.rtp-winner-modal__close:hover{
  background: rgba(255,255,255,.08);
}

.rtp-winner-modal__sound{
  position:absolute;
  top: 14px;
  right: 58px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.25);
  color: rgba(255,255,255,.92);
  font-size: 18px;
  line-height: 34px;
  cursor: pointer;
}
.rtp-winner-modal__sound:hover{
  background: rgba(255,255,255,.08);
}
.rtp-winner-modal__sound[aria-pressed="true"]{
  border-color: rgba(255,255,255,.28);
}

.rtp-winner-modal__kicker{
  margin-top: 8px;
  font-size: 22px;
  font-weight: 900;
  color: rgba(255,255,255,.92);
  text-align:center;
}

.rtp-winner-modal__name{
  font-size: 52px;
  font-weight: 900;
  color: #24963F !important;
  text-align:center;
  line-height: 1.05;
}

.rtp-winner-modal__trophy{
  width: min(360px, 60%);
  max-height: 48%;
  object-fit: contain;
  margin-top: 4px;
  filter: drop-shadow(0 18px 30px rgba(0,0,0,.45));
}

@media (max-width: 820px){
  .rtp-winner-modal__card{
    width: min(94vw, 760px);
    height: auto;
    max-height: 90vh;
  }
  .rtp-winner-modal__name{ font-size: 38px; }
  .rtp-winner-modal__kicker{ font-size: 18px; }
  .rtp-winner-modal__trophy{ width: min(320px, 76%); max-height: 42vh; }
}

/* --- Winner modal animations (polish) --- */
@keyframes rtpWinnerFadeIn{
  from{ opacity: 0; }
  to{ opacity: 1; }
}

@keyframes rtpWinnerPopIn{
  from{ transform: translateY(12px) scale(.985); opacity: 0; }
  to{ transform: translateY(0) scale(1); opacity: 1; }
}

.rtp-winner-modal{ animation: rtpWinnerFadeIn .18s ease-out; }
.rtp-winner-modal__card{ animation: rtpWinnerPopIn .22s cubic-bezier(.2,.9,.2,1); }

@media (prefers-reduced-motion: reduce){
  .rtp-winner-modal,
  .rtp-winner-modal__card{ animation: none !important; }
}


/* --- Winner celebration (MS4): confetti --- */
.rtp-winner-confetti{
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.rtp-winner-modal__card{ z-index: 1; }

.rtp-winner-confetti__piece{
  position: absolute;
  top: -20px;
  width: 10px;
  height: 16px;
  border-radius: 2px;
  opacity: .95;
  transform: translate3d(0,0,0) rotate(0deg);
  will-change: transform, opacity;
  animation-name: rtpConfettiFall;
  animation-timing-function: cubic-bezier(.12,.6,.2,1);
  animation-iteration-count: 1;
  animation-fill-mode: forwards;
}

@keyframes rtpConfettiFall{
  0%   { transform: translate3d(0,-10vh,0) rotate(0deg); opacity: 0; }
  10%  { opacity: 1; }
  100% { transform: translate3d(var(--dx, 0px), 110vh, 0) rotate(720deg); opacity: 1; }
}

@media (prefers-reduced-motion: reduce){
  .rtp-winner-confetti{ display:none !important; }
}
