/* Modal YouTube (Controle de cookies e vídeo) */
.modal-yt {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, .72);
  z-index: 99999;
}

.modal-yt.is-open {
  display: flex; /* Garante que o modal seja exibido */
}

/* Ajuste do tamanho do modal */
.modal-yt__box {
  width: 96vw;  /* Responsivo */
  max-width: 720px;
  max-height: 86vh;  /* Tamanho máximo da altura */
  height: auto;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .55);
}
/* Ajuste do iframe dentro do modal */
#modalYtFrameHolder {
  position: relative;
  width: 100%;
  height: 100%;
}
#modalYtFrameHolder iframe {
  width: 100% !important;
  height: 100% !important;
  border: 0;
  display: block;
}

.modal-yt__close {
  position: absolute;
  top: 10px; right: 10px;
  width: 42px; height: 42px;
  border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, .15);
  color: #fff; font-size: 22px;
  cursor: pointer;
  z-index: 2;
}

#yt-frame-holder {
  position: relative;
}


/* Modal de consentimento de cookies */
.cookie-video-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, .72);
  z-index: 10000;  /* Garantir que o consentimento fique na frente do vídeo */
}

.cookie-video-modal {
  background: #fff;
  padding: 20px;
  max-width: 600px;
  width: 100%;
  border-radius: 8px;
  text-align: center;
}

.cookie-video-actions {
  margin-top: 20px;
}

.cookie-video-actions button {
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
}

.cookie-video-actions button#cookie-video-accept {
  background: #007bff;
  color: white;
  border: none;
}

.cookie-video-actions button#cookie-video-decline {
  background: #f1f1f1;
  color: black;
  border: none;
}

.cookie-video-legal {
  margin-top: 10px;
  font-size: 12px;
}

/* Modal de vídeo */
.modal-yt {
  position: fixed;
  inset: 0;
  display: none; /* Começa oculto */
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, .72);
  z-index: 9999;  /* O modal de vídeo deve ficar atrás do modal de consentimento */
}

.modal-yt__box {
  width: 96vw;
  max-width: 720px;
  max-height: 86vh;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .55);
}

#modalYtFrameHolder {
  position: relative;
  width: 100%;
  height: 100%;
}

.modal-yt__close {
  position: absolute;
  top: 10px; right: 10px;
  width: 42px; height: 42px;
  border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, .15);
  color: #fff; font-size: 22px;
  cursor: pointer;
  z-index: 2;
}

/* Responsividade */
@media (max-width: 768px) {
  .modal-yt__box {
    width: 96vw;
    height: auto;
    aspect-ratio: auto;
    max-height: 86vh;
  }
}