/* /assets/css/vote-popup.css */
/* Styles that match /templates/vote-popup.php markup exactly */

/* Container visibility helpers */
.vote-popup.hidden { display: none; }

.vote-popup {
  position: fixed;
  inset: 0;                       /* top/right/bottom/left: 0 */
  z-index: 10000;
  pointer-events: none;           /* only dialog/backdrop receive clicks */
}

/* Backdrop */
.vote-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.65);
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: auto;           /* allow click-to-close */
}

/* Dialog */
.vote-popup__dialog {
  position: relative;
  margin: 4vh auto 0;
  width: min(92vw, 560px);
  max-height: 88vh;
  overflow: auto;
  background: linear-gradient(180deg, #1b1b1d, #101014);
  color: #f1f1f3;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,.5);
  padding: 22px 22px 16px;
  transform: translateY(-10px);
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
  pointer-events: auto;           /* clickable */
}

/* When JS toggles .show on the root container */
.vote-popup.show .vote-popup__backdrop { opacity: 1; }
.vote-popup.show .vote-popup__dialog   { transform: translateY(0); opacity: 1; }

/* Close (X) */
.vote-popup__close {
  position: absolute;
  top: 15px; right: 18px;
  width: 38px; height: 50px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.14);
  background: transparent;
  color: #E1B929;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

/* Badge + headings */
.vote-popup__badge {
  display: inline-block;
  padding: 6px 10px;
  margin-bottom: 12px;
  border-radius: 999px;
  font-size: 12.5px;
  letter-spacing: .3px;
  color: #1a1a1a;
  background: linear-gradient(90deg, #E1B929, #ffd76a);
  font-weight: 700;
}

.vote-popup__title {
  margin: 6px 0 6px;
  font-size: 24px;
  line-height: 1.25;
  color: #fff;
}

.vote-popup__subtitle {
  margin: 0 0 16px;
  color: #d7d7df;
  font-size: 15px;
}

/* Countdown */
.vote-popup__countdown-label {
  margin: 0 0 10px;
  color: #cfcfe8;
  font-size: 13.5px;
  letter-spacing: .2px;
}

.vote-timer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.time-box {
  flex: 1;
  background: #141418;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
}

.time-box .num {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
}

.time-box .lab {
  font-size: 12px;
  color: #b8b8c8;
}

/* CTA mode */
.vote-popup__cta-text {
  margin: 8px 0 18px;
  color: #e7e7ef;
}

.vote-popup__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  padding: 12px 18px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: .2px;
  background: linear-gradient(90deg, #2180A2, #78A1BB);
  color: #0a0a0a;
  border: 0;
  cursor: pointer;
}
.vote-popup__button:focus { outline: 2px solid #E1B929; outline-offset: 2px; }

/* Footer buttons */
.vote-popup__footer {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.vote-popup__ghost {
  background: transparent;
  color: #c9c9d4;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
}

@media (max-width: 420px) {
  .vote-popup__dialog { padding: 18px 16px 12px; }
  .vote-popup__title { font-size: 20px; }
  .time-box .num     { font-size: 24px; }
}

/* (Optional) prevent page scroll while popup visible */
body.vote-popup-open { overflow: hidden; }


/* --- New hero layout for title/subtitle + right-aligned image --- */
.vote-popup__hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.vote-popup__copy { flex: 1; }

/* Right-side media container, fixed size */
.vote-popup__media {
  flex: 0 0 auto;
  width: 111px;
  height: 90px;
  border-radius: 10px;
  overflow: hidden;
}

.vote-popup__media img {
  display: block;
  width: 111px;
  height: 90px;
  object-fit: cover;
}

/* On very small screens you can hide or stack the image */
@media (max-width: 420px) {
  .vote-popup__hero { align-items: flex-start; }
  .vote-popup__media { display: none; } /* hide image on tiny screens */
}
