/**
 * Popup Frontend Styles
 * Estilo similar a las modales existentes del sistema (warning-modal)
 */

/* Prevenir scroll cuando hay popup */
body.popup-open {
  overflow: hidden;
}

/* Overlay - similar a warning-modal */
.popup-overlay {
  display: none;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999999;
}

.popup-overlay.popup-visible {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999999;
  padding: 20px;
  box-sizing: border-box;
}

/* Contenedor del popup - similar a warning-modal-container */
.popup-container {
  background-color: var(--primary, #992d2d);
  font-family: Montserrat, sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  width: 90%;
  max-width: 600px;
  min-height: 280px;
  max-height: 90vh;
  padding: 0px;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  animation: popupSlideIn 0.3s ease;
}

@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 600px) {
  .popup-container {
    width: 100%;
    height: 100%;
    max-height: 100%;
    justify-content: center;
    border-radius: 0;
  }
}

/* Botón de cerrar - similar al closeWarningModal */
.popup-close {
  position: absolute;
  top: 5px;
  right: 10px;
  background-color: transparent;
  border: none;
  font-size: 50px;
  cursor: pointer;
  color: white;
  font-family: "Montserrat", sans-serif;
  font-weight: 200;
  line-height: 1;
  padding: 0;
  z-index: 10;
  transition: opacity 0.2s;
  width: auto;
  height: auto;
  border-radius: 0;
}

.popup-close:hover {
  opacity: 0.7;
  background: transparent;
  transform: none;
}

@media (max-width: 736px) {
  .popup-close {
    font-size: 40px;
    top: 5px;
    right: 10px;
  }
}

/* Contenido del popup */
.popup-content {
  padding: 50px 40px 40px;
  overflow-y: auto;
  max-height: calc(90vh - 40px);
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .popup-content {
    padding: 50px 25px 35px;
    width: 90%;
  }
}

/* Título - similar a .warning-modal .title */
.popup-title {
  font-family: "Montserrat", sans-serif;
  font-size: 2.5em;
  margin: 0 0 20px 0;
  color: white;
  font-weight: 700;
  line-height: 1.2;
  padding-right: 0;
}

@media (max-width: 736px) {
  .popup-title {
    font-size: 1.888em;
    line-height: 1.3;
    margin-bottom: 15px;
  }
}

/* Estilos cuando no hay título - contenido más grande */
.popup-no-title .popup-body {
  font-size: 2.5em;
  font-weight: 700;
  line-height: 1.2;
}

@media (max-width: 736px) {
  .popup-no-title .popup-body {
    font-size: 1.888em;
    line-height: 1.3;
  }
}

/* Cuerpo del mensaje - similar a .warning-modal .subtitle */
.popup-body {
  font-family: "Montserrat", sans-serif;
  font-size: 1.125em;
  font-weight: 400;
  margin: 10px 0px 20px 0px;
  color: white;
  line-height: 1.6;
}

.popup-body p {
  margin: 0 0 15px;
}

.popup-body p:last-child {
  margin-bottom: 0;
}

.popup-body a {
  color: white;
  text-decoration: underline;
}

.popup-body a:hover {
  opacity: 0.8;
}

.popup-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 15px 0;
}

.popup-body ul,
.popup-body ol {
  margin: 15px 0;
  padding-left: 25px;
  text-align: left;
}

.popup-body li {
  margin-bottom: 8px;
}

@media (max-width: 736px) {
  .popup-body {
    font-size: 1em;
    font-weight: 300;
    line-height: 1.5;
  }
}

/* Acciones / Botón - similar a .btn-warning */
.popup-actions {
  margin-top: 25px;
  padding-top: 0;
  border-top: none;
}

.popup-action-btn {
  min-width: 161px;
  border: none;
  padding: 12px 30px;
  border-radius: 20px;
  background-color: white;
  color: var(--primary, #992d2d);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.88em;
  font-family: "Montserrat", sans-serif;
  transition:
    background-color 0.2s,
    transform 0.1s;
  width: auto;
}

.popup-action-btn:hover {
  background-color: #f0f0f0;
  transform: translateY(-1px);
}

.popup-action-btn:active {
  transform: translateY(0);
}

@media (max-width: 736px) {
  .popup-action-btn {
    padding: 10px 25px;
    width: auto;
    min-width: 140px;
  }
}

/* ============================================
   ESTILOS DE TEMA
   ============================================ */

/* Tema oscuro */
.popup-style-dark .popup-container {
  background-color: #1d2327;
}

.popup-style-dark .popup-title {
  color: #ffffff;
}

.popup-style-dark .popup-body {
  color: #e0e0e0;
}

.popup-style-dark .popup-close {
  color: #ffffff;
}

.popup-style-dark .popup-action-btn {
  background-color: #ffffff;
  color: #1d2327;
}

.popup-style-dark .popup-action-btn:hover {
  background-color: #f0f0f0;
}

/* Tema claro */
.popup-style-light .popup-container {
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.popup-style-light .popup-action-btn {
  background-color: #1d2327;
}

.popup-style-light .popup-action-btn:hover {
  background-color: #3c434a;
}

/* Tema branded (gradiente con colores de marca) */
.popup-style-branded .popup-container {
  background: linear-gradient(135deg, var(--primary, #992d2d) 0%, #c44545 100%);
}

.popup-style-branded .popup-title,
.popup-style-branded .popup-body {
  color: #ffffff;
}

.popup-style-branded .popup-close {
  color: #ffffff;
}

.popup-style-branded .popup-action-btn {
  background-color: #ffffff;
  color: var(--primary, #992d2d);
}

.popup-style-branded .popup-action-btn:hover {
  background-color: #f0f0f0;
}

/* Tema minimalista */
.popup-style-minimal .popup-container {
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  min-height: auto;
}

.popup-style-minimal .popup-content {
  padding: 35px 25px 30px;
}

.popup-style-minimal .popup-title {
  font-size: 1.5em;
  margin-bottom: 15px;
}

.popup-style-minimal .popup-body {
  font-size: 1em;
}

.popup-style-minimal .popup-actions {
  margin-top: 20px;
}

.popup-style-minimal .popup-action-btn {
  padding: 10px 20px;
  font-size: 0.85em;
  border-radius: 4px;
}

.popup-style-minimal .popup-close {
  top: 5px;
  right: 10px;
  font-size: 40px;
}
