/**
 * MailzMazivo - Estilos del Formulario de Suscripción Frontend
 * Autor: Julian Duarte
 */

.mailzmazivo-form-container {
  width: 100%;
  max-width: 580px;
  margin: 30px auto;
  border-radius: 16px;
  overflow: hidden;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transition: all 0.3s ease;
}

/* Tema Moderno */
.mailzmazivo-form-container.theme-modern {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.08);
  padding: 36px 32px;
}

.mailzmazivo-form-container.theme-modern .mz-pub-title {
  color: #0f172a;
}
.mailzmazivo-form-container.theme-modern .mz-pub-subtitle {
  color: #64748b;
}

/* Tema Dark */
.mailzmazivo-form-container.theme-dark {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border: 1px solid #334155;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.4);
  padding: 36px 32px;
  color: #f8fafc;
}

.mailzmazivo-form-container.theme-dark .mz-pub-title {
  color: #ffffff;
}
.mailzmazivo-form-container.theme-dark .mz-pub-subtitle {
  color: #94a3b8;
}
.mailzmazivo-form-container.theme-dark .mz-pub-input {
  background: #1e293b;
  border-color: #475569;
  color: #ffffff;
}

/* Tema Minimal */
.mailzmazivo-form-container.theme-minimal {
  background: transparent;
  border: 1px dashed #cbd5e1;
  padding: 24px;
}

/* Encabezados del Formulario */
.mz-pub-header {
  text-align: center;
  margin-bottom: 24px;
}

.mz-pub-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.mz-pub-subtitle {
  font-size: 14px;
  margin: 0;
  line-height: 1.5;
}

/* Campos */
.mz-pub-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mz-pub-row {
  display: flex;
  gap: 12px;
}

@media (max-width: 600px) {
  .mz-pub-row {
    flex-direction: column;
  }
}

.mz-pub-input {
  flex: 1;
  padding: 13px 18px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 15px;
  box-sizing: border-box;
  transition: all 0.2s ease;
  outline: none;
}

.mz-pub-input:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}

.mz-pub-btn {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  color: #ffffff;
  padding: 14px 28px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.mz-pub-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.4);
}

.mz-pub-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Mensajes de Respuesta */
.mz-pub-message {
  display: none;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  margin-top: 14px;
  animation: mzFadeIn 0.3s ease;
}

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

.mz-pub-message.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.mz-pub-message.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Honeypot oculto */
.mz-hp-field {
  display: none !important;
  visibility: hidden !important;
}

/* ==========================================
   POPUP MODAL EMERGENTE (100% MOBILE FIRST)
   ========================================== */
.mz-pub-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  z-index: 9999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  animation: mzOverlayFade 0.3s ease-out;
}

@keyframes mzOverlayFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.mz-pub-modal-box {
  background: #ffffff;
  width: 100%;
  max-width: 440px;
  border-radius: 20px;
  padding: 32px 28px 24px 28px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.25);
  position: relative;
  box-sizing: border-box;
  animation: mzPopupSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  text-align: center;
}

@keyframes mzPopupSlideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.mz-pub-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.mz-pub-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

@media (max-width: 480px) {
  .mz-pub-modal-box {
    padding: 26px 18px 20px 18px;
    border-radius: 16px;
  }
}
