/* =========================================================
   POPUP DE NOVIDADES — EMPERIAL BLOXX
   ========================================================= */

.site-update-popup {
  position: fixed;
  inset: 0;
  z-index: 99999;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 20px;
}

.site-update-popup.is-open {
  display: flex;
}

/* =========================================================
   FUNDO ESCURO
   ========================================================= */

.site-update-popup__overlay {
  position: absolute;
  inset: 0;

  background:
    radial-gradient(
      circle at center,
      rgba(250, 204, 21, 0.08),
      transparent 45%
    ),
    rgba(0, 0, 0, 0.78);

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  animation: siteUpdateOverlayIn 0.25s ease;
}

/* =========================================================
   CARD PRINCIPAL
   ========================================================= */

.site-update-popup__card {
  position: relative;
  z-index: 2;

  width: min(560px, 100%);
  max-height: calc(100vh - 40px);

  overflow-y: auto;

  padding: 28px;

  border: 1px solid rgba(250, 204, 21, 0.28);
  border-radius: 24px;

  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.035),
      rgba(255, 255, 255, 0.01)
    ),
    rgba(10, 10, 12, 0.98);

  box-shadow:
    0 25px 80px rgba(0, 0, 0, 0.65),
    0 0 40px rgba(250, 204, 21, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);

  animation: siteUpdateCardIn 0.38s ease;
}

/* brilho no topo */

.site-update-popup__card::before {
  content: "";

  position: absolute;
  top: 0;
  left: 50%;

  width: 72%;
  height: 2px;

  transform: translateX(-50%);

  background:
    linear-gradient(
      90deg,
      transparent,
      #facc15,
      #ffe889,
      #facc15,
      transparent
    );

  box-shadow: 0 0 18px rgba(250, 204, 21, 0.75);
}

/* =========================================================
   BOTÃO FECHAR
   ========================================================= */

.site-update-popup__close {
  position: absolute;
  top: 16px;
  right: 16px;

  width: 38px;
  height: 38px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;

  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.65);

  font-size: 16px;

  cursor: pointer;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.site-update-popup__close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(250, 204, 21, 0.28);
  transform: rotate(4deg);
}

/* =========================================================
   CONTEÚDO
   ========================================================= */

.site-update-popup__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 28px;

  padding: 0 12px;
  margin-bottom: 14px;

  border: 1px solid rgba(250, 204, 21, 0.34);
  border-radius: 999px;

  background: rgba(250, 204, 21, 0.1);
  color: #facc15;

  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-update-popup__card h2 {
  margin: 0 48px 8px 0;

  color: #ffffff;

  font-family: "Kanit", sans-serif;
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 800;
  line-height: 1.05;
}

.site-update-popup__subtitle {
  margin: 0 0 20px;

  color: rgba(255, 255, 255, 0.58);

  font-size: 14px;
  line-height: 1.6;
}

/* =========================================================
   IMAGEM
   ========================================================= */

.site-update-popup__image {
  display: none;

  width: 100%;
  max-height: 250px;

  margin-bottom: 20px;

  object-fit: cover;

  border: 1px solid rgba(250, 204, 21, 0.18);
  border-radius: 16px;

  background: rgba(255, 255, 255, 0.03);
}

.site-update-popup__image.has-image {
  display: block;
}

/* =========================================================
   LISTA DE NOVIDADES
   ========================================================= */

.site-update-popup__list {
  display: flex;
  flex-direction: column;
  gap: 10px;

  margin: 0 0 24px;
  padding: 0;

  list-style: none;
}

.site-update-popup__list li {
  position: relative;

  padding: 13px 14px 13px 42px;

  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;

  background: rgba(255, 255, 255, 0.025);

  color: rgba(255, 255, 255, 0.82);

  font-size: 14px;
  line-height: 1.45;
}

.site-update-popup__list li::before {
  content: "✓";

  position: absolute;
  top: 50%;
  left: 14px;

  width: 20px;
  height: 20px;

  display: flex;
  align-items: center;
  justify-content: center;

  transform: translateY(-50%);

  border-radius: 7px;

  background: rgba(250, 204, 21, 0.12);
  color: #facc15;

  font-size: 11px;
  font-weight: 900;
}

/* =========================================================
   VERSÃO E DATA DA ATUALIZAÇÃO
   ========================================================= */

.site-update-popup__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;

  margin: -10px 0 20px;

  color: rgba(255, 255, 255, 0.42);

  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.03em;
}

#siteUpdateVersion {
  color: rgba(250, 204, 21, 0.82);
}

.site-update-popup__meta-dot {
  color: rgba(255, 255, 255, 0.2);
}

/* =========================================================
   NÃO MOSTRAR NOVAMENTE
   ========================================================= */

.site-update-popup__never-show {
  display: flex;
  align-items: center;
  gap: 10px;

  width: fit-content;

  margin: -4px 0 18px;

  color: rgba(255, 255, 255, 0.55);

  font-size: 12px;
  font-weight: 550;

  cursor: pointer;
  user-select: none;
}

.site-update-popup__never-show input {
  position: absolute;

  width: 1px;
  height: 1px;

  opacity: 0;
  pointer-events: none;
}

.site-update-popup__checkbox {
  width: 20px;
  height: 20px;

  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;

  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;

  background: rgba(255, 255, 255, 0.035);
  color: transparent;

  font-size: 11px;
  font-weight: 900;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.site-update-popup__never-show:hover {
  color: rgba(255, 255, 255, 0.78);
}

.site-update-popup__never-show:hover
.site-update-popup__checkbox {
  border-color: rgba(250, 204, 21, 0.38);
}

.site-update-popup__never-show input:checked
+ .site-update-popup__checkbox {
  border-color: #facc15;

  background:
    linear-gradient(
      135deg,
      #ffe46b,
      #facc15,
      #d9a700
    );

  color: #111111;

  box-shadow:
    0 0 14px rgba(250, 204, 21, 0.2);
}

.site-update-popup__never-show input:focus-visible
+ .site-update-popup__checkbox {
  outline: 2px solid rgba(250, 204, 21, 0.65);
  outline-offset: 3px;
}

/* =========================================================
   BOTÕES
   ========================================================= */

.site-update-popup__buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.site-update-popup__button {
  min-height: 46px;

  padding: 0 18px;

  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;

  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.78);

  font-size: 14px;
  font-weight: 750;

  cursor: pointer;

  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.site-update-popup__button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
}

.site-update-popup__button--gold {
  border-color: rgba(250, 204, 21, 0.55);

  background:
    linear-gradient(
      135deg,
      #ffe46b,
      #facc15,
      #d9a700
    );

  color: #111111;

  box-shadow:
    0 10px 25px rgba(250, 204, 21, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.site-update-popup__button--gold:hover {
  background:
    linear-gradient(
      135deg,
      #ffeb8d,
      #ffd52f,
      #e2b300
    );

  box-shadow:
    0 12px 30px rgba(250, 204, 21, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

/* =========================================================
   ANIMAÇÕES
   ========================================================= */

@keyframes siteUpdateOverlayIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes siteUpdateCardIn {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 640px) {
  .site-update-popup {
    padding: 12px;
  }

  .site-update-popup__meta {
  gap: 5px;
  margin-bottom: 17px;
  font-size: 10px;
}

.site-update-popup__never-show {
  align-items: flex-start;
  font-size: 11px;
  line-height: 1.4;
}

  .site-update-popup__card {
    padding: 22px 18px 18px;
    border-radius: 20px;
  }

  .site-update-popup__card h2 {
    margin-right: 42px;
    font-size: 28px;
  }

  .site-update-popup__close {
    top: 12px;
    right: 12px;

    width: 36px;
    height: 36px;
  }

  .site-update-popup__buttons {
    grid-template-columns: 1fr;
  }

  .site-update-popup__button--gold {
    order: 1;
  }

  .site-update-popup__button:not(
    .site-update-popup__button--gold
  ) {
    order: 2;
  }

  .site-update-popup__image {
    max-height: 190px;
  }
}

/* =========================================================
   ACESSIBILIDADE
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .site-update-popup__overlay,
  .site-update-popup__card {
    animation: none !important;
  }
}