/* RC ESPACIO ALUMNADO v1.4.2 - estilos principales y extensiones */

/* Contenedor principal CF7 */
.wpcf7 { background-color: whitesmoke; color: #111; border: 5px solid #850065; box-sizing: border-box; }
.wpcf7-form { margin: 20px; }

/* Botón submit */
.wpcf7-submit {
  background-color: #850065;
  color: #fff;
  border: 2px solid #850065;
  font-size: 16px;
  font-weight: 700;
  width: 200px;
  height: 40px;
  margin-right: 8px;
  cursor: pointer;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
  line-height: 1;
  transition: background .15s ease, border-color .15s ease, transform .06s ease;
}
@media (max-width: 480px){
  .wpcf7-submit {
    font-size: 15px;
    padding: 8px 12px;
    display: block;
    width: 100%;
    margin-right: 0;
    margin-bottom: 8px;
    box-sizing: border-box;
  }
}

/* Grupos flex */
.wpcf7 .cf-row-nie,
.wpcf7 .cf-row-direccion,
.wpcf7 .cf-row-cuenta {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  column-gap: 0;
  margin: 0;
  box-sizing: border-box;
}

/* Espaciado horizontal solo entre campos de dirección */
.wpcf7 .cf-row-direccion { column-gap: 13px; }

.wpcf7 .cf-row-nie .cf-col,
.wpcf7 .cf-row-direccion .cf-col,
.wpcf7 .cf-row-cuenta .cf-col { min-width: 0; box-sizing: border-box; }

/* Comportamiento exclusivo en móviles */
@media (max-width: 540px) {
  .wpcf7 input[type="text"]:not([name="text-Nie"]):not([name="text-Horainicio"]):not([name="text-Horafin"]),
  .wpcf7 input[type="tel"]:not([name="CUENTA"]):not([name="CODBAN"]):not([name="CODOFI"]):not([name="DIGCON"]):not([name="NUMCUE"]),
  .wpcf7 input[type="email"],
  .wpcf7 textarea,
  .wpcf7 select {
    width: 100%;
  }
}

/* Label de grupo */
.wpcf7 .cf-group-label { display:block; margin:0 0 2px 0; padding:0; line-height:1; }

/* Asegurar que la fila agrupada quede pegada al label */
.wpcf7 .cf-group-label + .cf-row-cuenta,
.wpcf7 p > .cf-group-label + .cf-row-cuenta,
.wpcf7 .cf-group-label + .cf-row-direccion,
.wpcf7 p > .cf-group-label + .cf-row-direccion,
.wpcf7 .cf-group-label + .cf-row-nie,
.wpcf7 p > .cf-group-label + .cf-row-nie {
  margin-top: 0;
  padding-top: 0;
  display: flex;
  align-items: center;
}

/* Evitar que labels internos empujen hacia abajo */
.wpcf7 .cf-row-cuenta .cf-col > label,
.wpcf7 .cf-row-direccion .cf-col > label,
.wpcf7 .cf-row-nie .cf-col > label {
  margin: 0;
  padding: 0;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
}

/* Alinear inputs del grupo con el label superior */
.wpcf7 .cf-row-cuenta .cf-col input,
.wpcf7 .cf-row-direccion .cf-col input,
.wpcf7 .cf-row-nie .cf-col input,
.wpcf7 .cf-row-cuenta .cf-col .wpcf7-form-control,
.wpcf7 .cf-row-direccion .cf-col .wpcf7-form-control,
.wpcf7 .cf-row-nie .cf-col .wpcf7-form-control {
  margin: 0;
  box-sizing: border-box;
  vertical-align: middle;
}

/* Fallback para navegadores que no soporten :has */
.wpcf7 p > .cf-group-label { margin-bottom: 2px; }

/* ===== Solución Plugin: estilos readonly ===== */
.rc-readonly,
[data-rc-readonly="1"] {
  background-color: #f8f8f8 !important;
  cursor: not-allowed !important;
  color: #333 !important;
  box-shadow: none !important;
}

/* Inputs readonly se ven distintos y no reciben foco visible */
input[readonly].rc-readonly,
textarea[readonly].rc-readonly,
select.rc-readonly {
  outline: none;
}

/* Ocultar elementos auxiliares creados por JS de sustitución solo visual */
input[data-rc-replaced="1"],
input[data-rc-select-for] { display: none !important; }

/* ===== Mensajes y fallback ===== */
.cf7-rb-mensaje,
#cf7-rb-mensaje-general,
.rc-plugin-expired {
  display: block;
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.06);
  font-weight: 700;
  background: #fff;
  color: #111;
}

/* Variante visual para mensaje bloque (error) */
.rc-plugin-expired { background: #fff0f0; border-color: #f2c6c6; color: #c00; }

/* ===== Summit: reglas rápidas (toggleable) =====
   Estas reglas son neutrales y pueden habilitarse desde la pestaña Estilos
   si el admin marca "Habilitar styles Summit". Mantener compactas y no invasivas.
*/
.summit-wrap .wpcf7-form { max-width: 980px; margin-left: auto; margin-right: auto; }
.summit-wrap .cf-row-direccion { column-gap: 18px; }
.summit-wrap .cf-row-nie { gap: 10px; }
.summit-wrap .wpcf7-submit { border-radius: 8px; }

/* ===== Accesibilidad: focus visible para controles interactivos ===== */
a:focus, button:focus, .wpcf7-submit:focus, input:focus, textarea:focus {
  outline: 3px solid rgba(133,0,101,0.12);
  outline-offset: 2px;
}

/* ===== Utilidades ligeras ===== */
.hidden-inline { display: none !important; }