/* ==========================================================================
   # FORMS - CONTACT FORM 7 ADAPTATION (PURE CSS)
   ========================================================================== */

/* Contenedor general de CF7 */
.wpcf7 {
    position: relative;
}

/* Etiquetas (CF7 suele envolver los inputs en <label>) */
label {
    color: var(--mwm-text-on-dark);
    cursor: pointer;
    display: block;
    font-family: var(--mwm-font-body);
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

/* FIELDS (Inputs de texto, textareas y selects de CF7) */
.wpcf7-form-control:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
textarea,
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    
    background-color: var(--mwm-surface-elevated);
    border: 2px solid rgba(255,255,255,0.25);
    border-radius: .25rem;
    box-sizing: border-box;
    color: var(--mwm-text-on-dark);
    display: block;
    padding: 18px 28px;
    transition: transform 0.18s, background 0.18s, border-color 0.18s, box-shadow 0.18s;
    width: 100%;
}

/* Efecto Focus para Inputs */
.wpcf7-form-control:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
    border-color: var(--mwm-red-glow);
    box-shadow: 0 0 8px rgba(230, 57, 70, 0.2); /* Sutil brillo rojo del tema */
    outline: none;
}

/* TEXTAREA */
textarea.wpcf7-textarea {
    height: auto;
    min-height: 150px;
    resize: vertical;
}

/* SELECT */
select.wpcf7-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'%3E%3Cpath fill='%23a8a8b0' d='M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z'%3E%3C/path%3E%3C/svg%3E");
    background-position: right 1.5rem center;
    background-repeat: no-repeat;
    background-size: 1.25rem 0.75rem;
    padding-right: 3rem;
}

/* CHECKBOXES & RADIO BUTTONS (Estructura de CF7) */
.wpcf7-checkbox,
.wpcf7-radio {
    display: block;
    margin-top: 0.5rem;
}

.wpcf7-checkbox .wpcf7-list-item,
.wpcf7-radio .wpcf7-list-item {
    align-items: center;
    display: inline-flex;
    margin: 0 1.5rem 0.5rem 0;
}

.wpcf7-checkbox input[type="checkbox"],
.wpcf7-radio input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    background-color: var(--mwm-surface-elevated);
    border: 1px solid var(--mwm-surface-line);
    cursor: pointer;
    flex-shrink: 0;
    height: 1.25rem;
    margin-right: 0.5rem;
    position: relative;
    transition: background 0.2s, border-color 0.2s;
    width: 1.25rem;
}

/* Estilo específico circular para Radios */
.wpcf7-radio input[type="radio"] {
    border-radius: 50%;
}

/* Estilo específico semi-cuadrado para Checkboxes */
.wpcf7-checkbox input[type="checkbox"] {
    border-radius: 0.25rem;
}

/* Estados Checkeados */
.wpcf7-checkbox input[type="checkbox"]:checked,
.wpcf7-radio input[type="radio"]:checked {
    background-color: var(--mwm-red);
    border-color: var(--mwm-red-glow);
}

/* Punto/Indicador central al marcar */
.wpcf7-checkbox input[type="checkbox"]:checked::after,
.wpcf7-radio input[type="radio"]:checked::after {
    background: var(--mwm-white);
    content: "";
    display: block;
    height: 0.5rem;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 0.5rem;
}

.wpcf7-radio input[type="radio"]:checked::after {
    border-radius: 50%;
}

.wpcf7-checkbox input[type="checkbox"]:checked::after {
    border-radius: 0;
    height: 0.4rem;
    width: 0.4rem;
}

/* Texto de las opciones de radio/checkbox */
.wpcf7-checkbox .wpcf7-list-item-label,
.wpcf7-radio .wpcf7-list-item-label {
    color: var(--mwm-text-on-dark-muted);
    font-size: 0.95rem;
}

/* PLACEHOLDERS */
::-webkit-input-placeholder { color: var(--mwm-text-on-dark-dim); opacity: 1; }
:-moz-placeholder           { color: var(--mwm-text-on-dark-dim); opacity: 1; }
::-moz-placeholder          { color: var(--mwm-text-on-dark-dim); opacity: 1; }
:-ms-input-placeholder      { color: var(--mwm-text-on-dark-dim); opacity: 1; }

/* BOTÓN DE ENVÍO DE CF7 */
.wpcf7-submit {
  align-items: center;
  border: 2px solid transparent;
  border-radius: 4px;
  display: inline-flex;
  font-family: var(--mwm-font-body);
  font-size: 14px;
  font-weight: 700;
  gap: 12px;
  justify-content: center;
  letter-spacing: 0.08em;
  padding: 18px 28px;
  text-transform: uppercase;
  transition: transform 0.18s, background 0.18s, border-color 0.18s, box-shadow 0.18s;
  white-space: nowrap;
  background: var(--mwm-red);
  color: var(--mwm-white);
}

.wpcf7-submit:hover {
  background: var(--mwm-red-glow);
  box-shadow: 0 12px 32px rgba(230,57,70,0.35), 0 0 0 1px rgba(230,57,70,0.5);
  transform: translateY(-2px);
}

/* ERRORES Y VALIDACIONES NATIVAS DE CONTACT FORM 7 */

/* Mensaje global en la parte inferior (Éxito / Error) */
.wpcf7-response-output {
    border: 2px solid transparent !important;
    border-radius: 0.5rem !important;
    font-size: 0.95rem;
    margin: 2rem 0 0 0 !important;
    padding: 1rem 1.5rem !important;
}

/* Estado: Error en el envío */
.wpcf7.invalid .wpcf7-response-output,
.wpcf7.unsubstitutable .wpcf7-response-output {
    background-color: rgba(167, 27, 39, 0.1) !important;
    border-color: var(--mwm-red) !important;
    color: var(--mwm-white) !important;
}

/* Estado: Envío Exitoso */
.wpcf7.sent .wpcf7-response-output {
    background-color: rgba(37, 211, 102, 0.1) !important;
    border-color: var(--mwm-green-wa) !important;
    color: var(--mwm-white) !important;
}

/* Avisos de error debajo de cada input vacío/incorrecto */
.wpcf7-not-valid-tip {
    color: var(--mwm-red-glow);
    display: block;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

