/* IM_CONTACT_FORM_POLISH_V1_START
   Mejora visual del formulario de contacto.
   Botón coral + checkbox/legal links mejor alineados.
   No toca legal-pages.css.
*/

/* Botón principal del formulario */
body .cn-contact button[type="submit"],
body .contact-page button[type="submit"],
body .contact-form button[type="submit"],
body form[action*="contacto"] button[type="submit"],
body main button[type="submit"].cn-btn,
body main .cn-btn.cn-btn-primary,
body main .btn.btn-primary,
body main .button-primary {
  min-height: 46px !important;
  padding: 0 24px !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;

  border: 0 !important;
  border-radius: 999px !important;

  color: #ffffff !important;
  background: linear-gradient(135deg, #ff6a3d 0%, #ff4438 100%) !important;
  box-shadow:
    0 16px 34px rgba(255, 87, 51, .24),
    0 1px 0 rgba(255, 255, 255, .28) inset !important;

  font-weight: 900 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition:
    transform .16s ease,
    box-shadow .16s ease,
    filter .16s ease !important;
}

body .cn-contact button[type="submit"]:hover,
body .contact-page button[type="submit"]:hover,
body .contact-form button[type="submit"]:hover,
body form[action*="contacto"] button[type="submit"]:hover,
body main button[type="submit"].cn-btn:hover,
body main .cn-btn.cn-btn-primary:hover,
body main .btn.btn-primary:hover,
body main .button-primary:hover {
  transform: translateY(-1px) !important;
  filter: saturate(1.04) !important;
  box-shadow:
    0 20px 42px rgba(255, 87, 51, .30),
    0 1px 0 rgba(255, 255, 255, .30) inset !important;
}

body .cn-contact button[type="submit"]:active,
body .contact-page button[type="submit"]:active,
body .contact-form button[type="submit"]:active,
body form[action*="contacto"] button[type="submit"]:active,
body main button[type="submit"].cn-btn:active,
body main .cn-btn.cn-btn-primary:active,
body main .btn.btn-primary:active,
body main .button-primary:active {
  transform: translateY(0) !important;
}

/* Caja del consentimiento/legal */
body .cn-contact label:has(input[type="checkbox"]),
body .contact-page label:has(input[type="checkbox"]),
body .contact-form label:has(input[type="checkbox"]),
body form[action*="contacto"] label:has(input[type="checkbox"]),
body main label:has(input[type="checkbox"]) {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 48px !important;

  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr) !important;
  align-items: start !important;
  column-gap: 12px !important;

  margin: 14px 0 16px !important;
  padding: 13px 15px !important;

  border-radius: 18px !important;
  border: 1px solid rgba(226, 232, 240, .95) !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(248, 250, 252, .88)) !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .055) !important;

  color: #334155 !important;
  font-size: 14px !important;
  font-weight: 650 !important;
  line-height: 1.45 !important;
  text-align: left !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
}

/* Checkbox */
body .cn-contact label:has(input[type="checkbox"]) input[type="checkbox"],
body .contact-page label:has(input[type="checkbox"]) input[type="checkbox"],
body .contact-form label:has(input[type="checkbox"]) input[type="checkbox"],
body form[action*="contacto"] label:has(input[type="checkbox"]) input[type="checkbox"],
body main label:has(input[type="checkbox"]) input[type="checkbox"] {
  grid-column: 1 !important;
  width: 17px !important;
  height: 17px !important;
  margin: 2px 0 0 !important;
  accent-color: #ff5733 !important;
  cursor: pointer !important;
}

/* Texto y enlaces legales */
body .cn-contact label:has(input[type="checkbox"]) a,
body .contact-page label:has(input[type="checkbox"]) a,
body .contact-form label:has(input[type="checkbox"]) a,
body form[action*="contacto"] label:has(input[type="checkbox"]) a,
body main label:has(input[type="checkbox"]) a {
  color: #0f766e !important;
  font-weight: 900 !important;
  text-decoration: none !important;
  border-bottom: 1px solid rgba(15, 118, 110, .28) !important;
  box-shadow: inset 0 -5px 0 rgba(15, 118, 110, .07) !important;
  line-height: 1.25 !important;
}

body .cn-contact label:has(input[type="checkbox"]) a:hover,
body .contact-page label:has(input[type="checkbox"]) a:hover,
body .contact-form label:has(input[type="checkbox"]) a:hover,
body form[action*="contacto"] label:has(input[type="checkbox"]) a:hover,
body main label:has(input[type="checkbox"]) a:hover {
  color: #0b5f59 !important;
  border-bottom-color: rgba(15, 118, 110, .48) !important;
  box-shadow: inset 0 -7px 0 rgba(15, 118, 110, .11) !important;
}

/* Evita cortes raros de palabras en el consentimiento */
body .cn-contact label:has(input[type="checkbox"]) *,
body .contact-page label:has(input[type="checkbox"]) *,
body .contact-form label:has(input[type="checkbox"]) *,
body form[action*="contacto"] label:has(input[type="checkbox"]) *,
body main label:has(input[type="checkbox"]) * {
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
}

/* Inputs del formulario un poco más premium */
body .cn-contact input:not([type="checkbox"]),
body .cn-contact textarea,
body .contact-page input:not([type="checkbox"]),
body .contact-page textarea,
body .contact-form input:not([type="checkbox"]),
body .contact-form textarea,
body form[action*="contacto"] input:not([type="checkbox"]),
body form[action*="contacto"] textarea {
  border-color: rgba(203, 213, 225, .95) !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .045) !important;
}

body .cn-contact input:not([type="checkbox"]):focus,
body .cn-contact textarea:focus,
body .contact-page input:not([type="checkbox"]):focus,
body .contact-page textarea:focus,
body .contact-form input:not([type="checkbox"]):focus,
body .contact-form textarea:focus,
body form[action*="contacto"] input:not([type="checkbox"]):focus,
body form[action*="contacto"] textarea:focus {
  border-color: rgba(255, 87, 51, .58) !important;
  box-shadow:
    0 0 0 4px rgba(255, 87, 51, .12),
    0 12px 30px rgba(15, 23, 42, .06) !important;
  outline: none !important;
}

@media (max-width: 640px) {
  body .cn-contact label:has(input[type="checkbox"]),
  body .contact-page label:has(input[type="checkbox"]),
  body .contact-form label:has(input[type="checkbox"]),
  body form[action*="contacto"] label:has(input[type="checkbox"]),
  body main label:has(input[type="checkbox"]) {
    padding: 12px 13px !important;
    font-size: 13.5px !important;
    border-radius: 16px !important;
  }

  body .cn-contact button[type="submit"],
  body .contact-page button[type="submit"],
  body .contact-form button[type="submit"],
  body form[action*="contacto"] button[type="submit"],
  body main button[type="submit"].cn-btn,
  body main .cn-btn.cn-btn-primary,
  body main .btn.btn-primary,
  body main .button-primary {
    width: 100% !important;
  }
}

/* IM_CONTACT_FORM_POLISH_V1_END */


/* IM_CONTACT_CHECKBOX_FIX_V2_START
   Repara el consentimiento legal del formulario de contacto.
   El V1 usaba grid y rompía los enlaces en varias líneas.
*/
body .cn-contact label:has(input[type="checkbox"]),
body .contact-page label:has(input[type="checkbox"]),
body .contact-form label:has(input[type="checkbox"]),
body form[action*="contacto"] label:has(input[type="checkbox"]),
body main label:has(input[type="checkbox"]) {
  position: relative !important;
  display: block !important;

  width: 100% !important;
  max-width: 100% !important;
  min-height: 52px !important;

  margin: 14px 0 18px !important;
  padding: 14px 16px 14px 46px !important;

  border-radius: 18px !important;
  border: 1px solid rgba(226, 232, 240, .95) !important;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(248,250,252,.90)) !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .055) !important;

  color: #334155 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.55 !important;
  text-align: left !important;

  cursor: pointer !important;
  box-sizing: border-box !important;

  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
}

/* Checkbox colocado a la izquierda, sin romper el texto */
body .cn-contact label:has(input[type="checkbox"]) input[type="checkbox"],
body .contact-page label:has(input[type="checkbox"]) input[type="checkbox"],
body .contact-form label:has(input[type="checkbox"]) input[type="checkbox"],
body form[action*="contacto"] label:has(input[type="checkbox"]) input[type="checkbox"],
body main label:has(input[type="checkbox"]) input[type="checkbox"] {
  position: absolute !important;
  left: 16px !important;
  top: 17px !important;

  width: 17px !important;
  height: 17px !important;
  margin: 0 !important;

  accent-color: #ff5733 !important;
  cursor: pointer !important;
}

/* Enlaces legales inline, legibles y sin partirse raro */
body .cn-contact label:has(input[type="checkbox"]) a,
body .contact-page label:has(input[type="checkbox"]) a,
body .contact-form label:has(input[type="checkbox"]) a,
body form[action*="contacto"] label:has(input[type="checkbox"]) a,
body main label:has(input[type="checkbox"]) a {
  display: inline !important;
  color: #0f766e !important;
  font-weight: 900 !important;
  text-decoration: none !important;

  border-bottom: 1px solid rgba(15, 118, 110, .32) !important;
  box-shadow: inset 0 -5px 0 rgba(15, 118, 110, .08) !important;

  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
}

body .cn-contact label:has(input[type="checkbox"]) a:hover,
body .contact-page label:has(input[type="checkbox"]) a:hover,
body .contact-form label:has(input[type="checkbox"]) a:hover,
body form[action*="contacto"] label:has(input[type="checkbox"]) a:hover,
body main label:has(input[type="checkbox"]) a:hover {
  color: #0b5f59 !important;
  border-bottom-color: rgba(15, 118, 110, .52) !important;
  box-shadow: inset 0 -7px 0 rgba(15, 118, 110, .12) !important;
}

/* Botón coral reforzado */
body .cn-contact button[type="submit"],
body .contact-page button[type="submit"],
body .contact-form button[type="submit"],
body form[action*="contacto"] button[type="submit"],
body main button[type="submit"].cn-btn,
body main .cn-btn.cn-btn-primary,
body main .btn.btn-primary,
body main .button-primary {
  color: #fff !important;
  background: linear-gradient(135deg, #ff6a3d 0%, #ff4438 100%) !important;
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow:
    0 16px 34px rgba(255, 87, 51, .25),
    0 1px 0 rgba(255,255,255,.28) inset !important;
}

@media (max-width: 640px) {
  body .cn-contact label:has(input[type="checkbox"]),
  body .contact-page label:has(input[type="checkbox"]),
  body .contact-form label:has(input[type="checkbox"]),
  body form[action*="contacto"] label:has(input[type="checkbox"]),
  body main label:has(input[type="checkbox"]) {
    padding: 13px 14px 13px 42px !important;
    font-size: 13.5px !important;
    line-height: 1.5 !important;
    border-radius: 16px !important;
  }

  body .cn-contact label:has(input[type="checkbox"]) input[type="checkbox"],
  body .contact-page label:has(input[type="checkbox"]) input[type="checkbox"],
  body .contact-form label:has(input[type="checkbox"]) input[type="checkbox"],
  body form[action*="contacto"] label:has(input[type="checkbox"]) input[type="checkbox"],
  body main label:has(input[type="checkbox"]) input[type="checkbox"] {
    left: 14px !important;
    top: 16px !important;
  }
}
/* IM_CONTACT_CHECKBOX_FIX_V2_END */

