/* AUTUNEO -- Modal "Regala S/30 en tu primera compra" (2026-08-28) */

.autuneo-fp-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, .58);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.autuneo-fp-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.autuneo-fp-modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 20px;
  padding: 36px 28px 28px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, .28);
  transform: translateY(12px) scale(.98);
  transition: transform 180ms ease;
  text-align: center;
}

.autuneo-fp-overlay.is-open .autuneo-fp-modal {
  transform: translateY(0) scale(1);
}

.autuneo-fp-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #F6F7F9;
  color: #667085;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 140ms ease;
}

.autuneo-fp-close:hover {
  background: #e9edf3;
}

.autuneo-fp-icon {
  font-size: 44px;
  line-height: 1;
  margin-bottom: 12px;
}

.autuneo-fp-title {
  font-size: 22px;
  font-weight: 800;
  color: #1A1A1A;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.autuneo-fp-subtitle {
  font-size: 14px;
  color: #667085;
  margin: 0 0 22px;
  line-height: 1.4;
}

.autuneo-fp-field {
  text-align: left;
  margin-bottom: 14px;
}

.autuneo-fp-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: #344054;
  margin-bottom: 5px;
}

.autuneo-fp-field input {
  width: 100%;
  box-sizing: border-box;
  height: 46px;
  padding: 0 14px;
  border: 1.5px solid #d7dee8;
  border-radius: 10px;
  font-size: 15px;
  color: #1A1A1A;
  transition: border-color 140ms ease;
}

.autuneo-fp-field input:focus {
  outline: none;
  border-color: #B81A20;
}

.autuneo-fp-phone-row {
  display: flex;
  gap: 8px;
}

.autuneo-fp-phone-prefix {
  flex: none;
  display: flex;
  align-items: center;
  height: 46px;
  padding: 0 12px;
  border-radius: 10px;
  background: #F6F7F9;
  font-size: 14px;
  font-weight: 700;
  color: #344054;
  white-space: nowrap;
}

.autuneo-fp-phone-row input {
  flex: 1;
  min-width: 0;
}

.autuneo-fp-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  text-align: left;
  margin: 4px 0 18px;
  cursor: pointer;
}

.autuneo-fp-consent input {
  margin-top: 3px;
  flex: none;
  width: 16px;
  height: 16px;
  accent-color: #B81A20;
  cursor: pointer;
}

.autuneo-fp-consent span {
  font-size: 12px;
  line-height: 1.45;
  color: #667085;
}

.autuneo-fp-consent a {
  color: #B81A20;
  font-weight: 600;
  text-decoration: underline;
}

.autuneo-fp-error {
  background: #FEECEB;
  color: #B42318;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 8px;
  margin: 0 0 14px;
  text-align: left;
}

.autuneo-fp-submit {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 12px;
  background: #B81A20;
  color: #fff;
  font-size: 15.5px;
  font-weight: 800;
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.autuneo-fp-submit:hover {
  background: #95151A;
}

.autuneo-fp-submit:active {
  transform: scale(.98);
}

.autuneo-fp-submit:disabled {
  opacity: .7;
  cursor: default;
}

.autuneo-fp-submit .autuneo-fp-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  animation: autuneo-fp-spin .7s linear infinite;
  display: none;
}

.autuneo-fp-submit.is-loading .autuneo-fp-spinner {
  display: inline-block;
}

.autuneo-fp-submit.is-loading .autuneo-fp-submit-label {
  opacity: .85;
}

@keyframes autuneo-fp-spin {
  to { transform: rotate(360deg); }
}

.autuneo-fp-hint {
  font-size: 12.5px;
  color: #667085;
  margin: 0 0 20px;
}

@media (max-width: 480px) {
  .autuneo-fp-modal {
    padding: 30px 20px 22px;
    border-radius: 18px;
  }

  .autuneo-fp-title {
    font-size: 19px;
  }
}

/* -------------------------------------------------------------------------
 * Variante con imagen (estilo Kallma): dos columnas en desktop -- imagen a
 * la izquierda, contenido a la derecha. Se activa sólo si hay imagen
 * cargada desde el BO (autuneofirstpurchase -> "Imagen del modal").
 * ---------------------------------------------------------------------- */
.autuneo-fp-modal--with-media {
  max-width: 760px;
  padding: 0;
  display: flex;
  overflow: hidden;
  text-align: left;
}

.autuneo-fp-modal--with-media .autuneo-fp-media {
  flex: 0 0 44%;
  min-height: 100%;
  background-color: #f6f7f9;
  background-size: cover;
  background-position: center;
}

.autuneo-fp-modal--with-media .autuneo-fp-body {
  flex: 1 1 auto;
  min-width: 0;
  padding: 40px 32px 30px;
  overflow-y: auto;
  max-height: 90vh;
}

.autuneo-fp-modal--with-media .autuneo-fp-icon {
  text-align: left;
}

.autuneo-fp-modal--with-media .autuneo-fp-close {
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 2px 8px rgba(15, 23, 42, .18);
}

@media (max-width: 640px) {
  .autuneo-fp-modal--with-media {
    display: block;
    max-width: 420px;
  }

  .autuneo-fp-modal--with-media .autuneo-fp-media {
    width: 100%;
    height: 150px;
    min-height: 0;
  }

  .autuneo-fp-modal--with-media .autuneo-fp-body {
    padding: 26px 22px 22px;
    max-height: none;
  }
}
