/*
 * Brief Marca Personal — Estilos del formulario
 * Todas las variables de color y diseño están centralizadas en .bmp-wrap.
 * Los estilos están completamente scoped bajo .bmp-wrap para no interferir
 * con los estilos del tema de WordPress.
 */

/* ══════════════════════════════════════════════════════════════════════════════
   VARIABLES — Edita aquí para cambiar colores, tamaños y tipografía
   ══════════════════════════════════════════════════════════════════════════════ */
.bmp-wrap {
  /* Paleta principal */
  --bmp-ink:        #0f0e0c;
  --bmp-paper:      #fff7f8;
  --bmp-cream:      #f6eeef;
  --bmp-gold:       #FC3549;
  --bmp-gold-light: #FF6B81;
  --bmp-gold-pale:  #FFE5EA;
  --bmp-muted:      #7b7270;
  --bmp-border:     #c9b9bc;

  /* Estados */
  --bmp-success:    #4a7c59;
  --bmp-error:      #b42318;

  /* Tipografía */
  --bmp-font-body:  'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bmp-font-serif: 'Fraunces', Georgia, serif;

  /* Geometría */
  --bmp-radius:     12px;
  --bmp-radius-sm:  8px;
  --bmp-max-w:      640px;

  /* Animación */
  --bmp-ease:       cubic-bezier(0.16, 1, 0.3, 1);
  --bmp-duration:   0.22s;
}

/* ══════════════════════════════════════════════════════════════════════════════
   RESET SCOPED
   ══════════════════════════════════════════════════════════════════════════════ */
.bmp-wrap *,
.bmp-wrap *::before,
.bmp-wrap *::after {
  box-sizing: border-box;
}

.bmp-wrap {
  font-family: var(--bmp-font-body);
  color: var(--bmp-ink);
  font-size: 16px;
  line-height: 1.5;
  padding: 2rem 1rem;
  position: relative;
}

/* ══════════════════════════════════════════════════════════════════════════════
   BARRA DE PROGRESO
   ══════════════════════════════════════════════════════════════════════════════ */
.bmp-progress-shell {
  width: 100%;
  height: 3px;
  background: var(--bmp-border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 28px;
}

.bmp-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--bmp-gold), #FF6B81);
  border-radius: 2px;
  transition: width 0.6s var(--bmp-ease);
  position: relative;
}

.bmp-progress-fill::after {
  content: '';
  position: absolute;
  right: -1px;
  top: -1px;
  bottom: -1px;
  width: 6px;
  background: #FF8EA0;
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 10px rgba(252, 53, 73, 0.35);
}

/* ══════════════════════════════════════════════════════════════════════════════
   CABECERA DEL FORMULARIO (dots + contador)
   ══════════════════════════════════════════════════════════════════════════════ */
.bmp-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}

.bmp-step-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.bmp-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bmp-border);
  transition: all 0.3s var(--bmp-ease);
  flex-shrink: 0;
}

.bmp-dot--done   { background: var(--bmp-gold-light); }
.bmp-dot--active {
  background: var(--bmp-gold);
  width: 20px;
  border-radius: 3px;
}

.bmp-step-counter {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--bmp-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ══════════════════════════════════════════════════════════════════════════════
   PASOS
   ══════════════════════════════════════════════════════════════════════════════ */
.bmp-step {
  display: none;
  max-width: var(--bmp-max-w);
  margin: 0 auto;
}

.bmp-step--active {
  display: block;
  animation: bmpStepIn 0.5s var(--bmp-ease) both;
}

@keyframes bmpStepIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes bmpShake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}

/* ── Cabecera del paso ── */
.bmp-step-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bmp-gold);
  margin-bottom: 10px;
}

.bmp-step-title {
  font-family: var(--bmp-font-serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 300;
  line-height: 1.15;
  color: var(--bmp-ink);
  margin: 0 0 8px;
}

.bmp-step-title em {
  font-style: italic;
  color: var(--bmp-gold);
}

.bmp-step-subtitle {
  font-size: 0.9rem;
  color: var(--bmp-muted);
  margin: 0 0 36px;
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════════════════════════════════
   CAMPO GENÉRICO
   ══════════════════════════════════════════════════════════════════════════════ */
.bmp-field-group {
  margin-bottom: 24px;
}

.bmp-field-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bmp-muted);
  margin-bottom: 8px;
}

.bmp-req {
  color: var(--bmp-gold);
  margin-left: 2px;
}

.bmp-field-hint {
  font-size: 0.8rem;
  color: var(--bmp-muted);
  margin-top: 6px;
  line-height: 1.5;
  font-style: italic;
}

/* ══════════════════════════════════════════════════════════════════════════════
   INPUTS, TEXTAREA, SELECT
   ══════════════════════════════════════════════════════════════════════════════ */
.bmp-wrap input[type="text"],
.bmp-wrap input[type="email"],
.bmp-wrap input[type="tel"],
.bmp-wrap input[type="url"],
.bmp-wrap textarea,
.bmp-wrap select {
  width: 100%;
  padding: 14px 18px;
  background: #fff;
  border: 1.5px solid var(--bmp-border);
  border-radius: var(--bmp-radius);
  font-family: var(--bmp-font-body);
  font-size: 0.95rem;
  color: var(--bmp-ink);
  transition:
    border-color var(--bmp-duration),
    box-shadow   var(--bmp-duration),
    background   var(--bmp-duration);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.bmp-wrap input:focus,
.bmp-wrap textarea:focus,
.bmp-wrap select:focus {
  border-color: var(--bmp-gold);
  box-shadow: 0 0 0 4px rgba(252, 53, 73, 0.12);
  background: #fff5f6;
}

.bmp-wrap input.bmp--error,
.bmp-wrap textarea.bmp--error {
  border-color: var(--bmp-error);
}

.bmp-wrap input::placeholder,
.bmp-wrap textarea::placeholder {
  color: #b9aeb0;
}

.bmp-wrap textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.6;
}

/* Textarea con contador de caracteres */
.bmp-textarea-wrapper {
  position: relative;
}

.bmp-char-count {
  position: absolute;
  bottom: 10px;
  right: 14px;
  font-size: 0.72rem;
  color: var(--bmp-muted);
  pointer-events: none;
  transition: color var(--bmp-duration);
  font-family: var(--bmp-font-body);
}

.bmp-char-count--warn { color: var(--bmp-gold); }

/* ══════════════════════════════════════════════════════════════════════════════
   GRILLAS DE CAMPOS
   ══════════════════════════════════════════════════════════════════════════════ */
.bmp-field-row {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

.bmp-cols-2 { grid-template-columns: 1fr 1fr; }
.bmp-cols-3 { grid-template-columns: 1fr 1fr 1fr; }

.bmp-field-row .bmp-field-group {
  margin-bottom: 0;
}

/* ══════════════════════════════════════════════════════════════════════════════
   3 PALABRAS
   ══════════════════════════════════════════════════════════════════════════════ */
.bmp-three-words {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.bmp-word-input {
  position: relative;
}

.bmp-word-num {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--bmp-font-serif);
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--bmp-gold-light);
  pointer-events: none;
  transition: opacity var(--bmp-duration);
}

.bmp-word-input input {
  padding-left: 46px;
}

.bmp-word-input input:not(:placeholder-shown) ~ .bmp-word-num {
  opacity: 0;
}

/* ══════════════════════════════════════════════════════════════════════════════
   CHECKBOXES Y RADIOS VISUALES
   ══════════════════════════════════════════════════════════════════════════════ */
.bmp-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.bmp-check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #fff;
  border: 1.5px solid var(--bmp-border);
  border-radius: var(--bmp-radius);
  cursor: pointer;
  transition: all 0.18s;
  user-select: none;
  font-family: var(--bmp-font-body);
}

.bmp-check-item:hover {
  border-color: var(--bmp-gold-light);
  background: var(--bmp-gold-pale);
}

.bmp-check-item--selected,
.bmp-check-item.bmp--selected {
  border-color: var(--bmp-gold);
  background: var(--bmp-gold-pale);
}

/* Ocultar input nativo */
.bmp-check-item input[type="checkbox"],
.bmp-check-item input[type="radio"] {
  display: none;
  width: auto;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

/* Caja visual del checkbox */
.bmp-check-box {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 1.5px solid var(--bmp-border);
  border-radius: 5px;
  position: relative;
  transition: all 0.18s;
  background: #fff;
}

.bmp-check-box--radio {
  border-radius: 50%;
}

.bmp-check-item.bmp--selected .bmp-check-box {
  background: var(--bmp-gold);
  border-color: var(--bmp-gold);
}

.bmp-check-item.bmp--selected .bmp-check-box::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 2px;
  width: 8px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}

.bmp-check-item.bmp--selected .bmp-check-box--radio::after {
  width: 6px;
  height: 6px;
  background: #fff;
  border: none;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.bmp-social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
}

.bmp-social-icon .bmp-icon-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.bmp-check-item .bmp-social-icon {
  color: var(--bmp-muted);
  transition: color 0.18s;
}

.bmp-check-item:hover .bmp-social-icon,
.bmp-check-item.bmp--selected .bmp-social-icon {
  color: var(--bmp-gold);
}

.bmp-check-label {
  font-size: 0.88rem;
  color: var(--bmp-muted);
  line-height: 1.3;
}

.bmp-check-item.bmp--selected .bmp-check-label {
  color: var(--bmp-ink);
  font-weight: 500;
}

/* Campo "Otro" */
.bmp-otro-field {
  display: none;
  margin-top: 10px;
}

.bmp-otro-field--visible { display: block; }

/* ══════════════════════════════════════════════════════════════════════════════
   TAG SELECTOR
   ══════════════════════════════════════════════════════════════════════════════ */
.bmp-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bmp-tag {
  padding: 8px 16px;
  background: #fff;
  border: 1.5px solid var(--bmp-border);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--bmp-muted);
  cursor: pointer;
  transition: all 0.18s;
  user-select: none;
  white-space: nowrap;
  font-family: var(--bmp-font-body);
}

.bmp-tag:hover {
  border-color: var(--bmp-gold-light);
  color: var(--bmp-ink);
  background: var(--bmp-gold-pale);
}

.bmp-tag--selected {
  background: var(--bmp-gold);
  border-color: var(--bmp-gold);
  color: #fff;
  font-weight: 500;
}

/* ══════════════════════════════════════════════════════════════════════════════
   CARD SELECTOR
   ══════════════════════════════════════════════════════════════════════════════ */
.bmp-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.bmp-card-grid--sm {
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.bmp-card-option {
  padding: 20px 16px;
  background: #fff;
  border: 1.5px solid var(--bmp-border);
  border-radius: var(--bmp-radius);
  cursor: pointer;
  text-align: center;
  transition: all var(--bmp-duration) var(--bmp-ease);
  user-select: none;
  position: relative;
  overflow: hidden;
  font-family: var(--bmp-font-body);
}

.bmp-card-option::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bmp-gold-pale);
  opacity: 0;
  transition: opacity 0.18s;
}

.bmp-card-option:hover::before { opacity: 1; }

.bmp-card-option--selected {
  border-color: var(--bmp-gold);
  box-shadow: 0 10px 25px rgba(15, 14, 12, 0.08), 0 0 0 3px rgba(252, 53, 73, 0.18);
}

.bmp-card-option--selected::before { opacity: 1; }

.bmp-card-icon {
  font-size: 1.8rem;
  margin-bottom: 8px;
  position: relative;
}

.bmp-card-title {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--bmp-ink);
  position: relative;
}

.bmp-card-option--selected .bmp-card-title {
  color: var(--bmp-gold);
}

.bmp-card-desc {
  font-size: 0.75rem;
  color: var(--bmp-muted);
  margin-top: 4px;
  line-height: 1.4;
  position: relative;
}

/* ══════════════════════════════════════════════════════════════════════════════
   SWATCHES DE COLOR
   ══════════════════════════════════════════════════════════════════════════════ */
.bmp-color-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.bmp-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  flex-shrink: 0;
}

.bmp-swatch:hover {
  transform: scale(1.15);
}

.bmp-swatch--selected {
  border-color: var(--bmp-ink);
  box-shadow: 0 0 0 3px rgba(15, 14, 12, 0.15);
  transform: scale(1.1);
}

/* ══════════════════════════════════════════════════════════════════════════════
   LISTA DINÁMICA DE URLS
   ══════════════════════════════════════════════════════════════════════════════ */
.bmp-url-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bmp-url-item {
  display: flex;
  gap: 8px;
  align-items: center;
}

.bmp-url-item input {
  flex: 1;
}

.bmp-btn-remove-url {
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--bmp-muted);
  font-size: 1rem;
  border-radius: var(--bmp-radius-sm);
  transition: all 0.15s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--bmp-font-body);
}

.bmp-btn-remove-url:hover {
  background: #fee;
  color: var(--bmp-error);
}

.bmp-btn-add-url {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--bmp-gold);
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px 0;
  transition: opacity 0.15s;
  font-family: var(--bmp-font-body);
}

.bmp-btn-add-url:hover { opacity: 0.7; }

/* ══════════════════════════════════════════════════════════════════════════════
   DIVISOR DE SECCIÓN
   ══════════════════════════════════════════════════════════════════════════════ */
.bmp-section-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 28px 0 24px;
}

.bmp-divider-line {
  flex: 1;
  height: 1px;
  background: var(--bmp-border);
}

.bmp-divider-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bmp-muted);
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════════════════════
   MENSAJES DE ERROR INLINE
   ══════════════════════════════════════════════════════════════════════════════ */
.bmp-field-error {
  font-size: 0.78rem;
  color: var(--bmp-error);
  margin-top: 6px;
  display: none;
  align-items: center;
  gap: 4px;
  font-family: var(--bmp-font-body);
}

.bmp-field-error--visible {
  display: flex;
}

/* Error global (AJAX) */
.bmp-global-error {
  margin-top: 20px;
  padding: 14px 18px;
  background: #fdf2f0;
  border: 1.5px solid var(--bmp-error);
  border-radius: var(--bmp-radius);
  color: var(--bmp-error);
  font-size: 0.9rem;
  max-width: var(--bmp-max-w);
  margin-left: auto;
  margin-right: auto;
}

/* ══════════════════════════════════════════════════════════════════════════════
   NAVEGACIÓN DE PASOS
   ══════════════════════════════════════════════════════════════════════════════ */
.bmp-step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--bmp-border);
}

/* Botón Atrás */
.bmp-btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--bmp-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 0;
  font-family: var(--bmp-font-body);
  transition: color 0.2s;
  line-height: 1;
}

.bmp-btn-back:hover { color: var(--bmp-ink); }

.bmp-btn-back svg {
  transition: transform 0.2s;
}

.bmp-btn-back:hover svg {
  transform: translateX(-3px);
}

/* Botón Continuar */
.bmp-btn-next {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: var(--bmp-ink);
  color: #fff;
  border: none;
  border-radius: 100px;
  font-family: var(--bmp-font-body);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--bmp-duration) var(--bmp-ease);
  position: relative;
  overflow: hidden;
  line-height: 1;
}

.bmp-btn-next::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--bmp-gold), #FF6B81);
  opacity: 0;
  transition: opacity 0.3s;
}

.bmp-btn-next:hover::before { opacity: 1; }

.bmp-btn-next span,
.bmp-btn-next svg {
  position: relative;
}

.bmp-btn-next svg {
  transition: transform 0.2s;
}

.bmp-btn-next:hover svg {
  transform: translateX(3px);
}

.bmp-btn-next--shake {
  animation: bmpShake 0.4s ease;
}

/* Botón Enviar */
.bmp-btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 36px;
  background: linear-gradient(135deg, var(--bmp-gold), #FF6B81);
  color: #fff;
  border: none;
  border-radius: 100px;
  font-family: var(--bmp-font-body);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--bmp-duration) var(--bmp-ease);
  box-shadow: 0 6px 22px rgba(252, 53, 73, 0.3);
  line-height: 1;
}

.bmp-btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(252, 53, 73, 0.38);
}

.bmp-btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ══════════════════════════════════════════════════════════════════════════════
   SPINNER DE CARGA
   ══════════════════════════════════════════════════════════════════════════════ */
@keyframes bmpSpin {
  to { transform: rotate(360deg); }
}

.bmp-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: bmpSpin 0.8s linear infinite;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════════════════════
   PANTALLA DE ÉXITO
   ══════════════════════════════════════════════════════════════════════════════ */
.bmp-success {
  display: none;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
  padding: 48px 0;
  animation: bmpStepIn 0.6s var(--bmp-ease) both;
}

.bmp-success--visible { display: block; }

.bmp-success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bmp-gold-pale), var(--bmp-gold-light));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 2rem;
}

.bmp-success-title {
  font-family: var(--bmp-font-serif);
  font-size: 2.2rem;
  font-weight: 300;
  margin: 0 0 12px;
  color: var(--bmp-ink);
  line-height: 1.2;
}

.bmp-success-subtitle {
  color: var(--bmp-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.bmp-success-subtitle strong {
  color: var(--bmp-ink);
}

/* ══════════════════════════════════════════════════════════════════════════════
   HONEYPOT
   ══════════════════════════════════════════════════════════════════════════════ */
.bmp-hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .bmp-cols-2,
  .bmp-cols-3 {
    grid-template-columns: 1fr;
  }

  .bmp-three-words {
    grid-template-columns: 1fr;
  }

  .bmp-card-grid {
    grid-template-columns: 1fr 1fr;
  }

  .bmp-card-grid--sm {
    grid-template-columns: 1fr 1fr;
  }

  .bmp-step-nav {
    flex-direction: column-reverse;
    gap: 12px;
  }

  .bmp-btn-next,
  .bmp-btn-submit {
    width: 100%;
    justify-content: center;
  }

  .bmp-btn-back {
    align-self: flex-start;
  }

  .bmp-step-title {
    font-size: 1.8rem;
  }
}

@media (max-width: 380px) {
  .bmp-checkbox-grid {
    grid-template-columns: 1fr;
  }
}
