/* FDI Checkout Hotfix - alinhamento definitivo de radios/checks */

/* Opções de frete/pagamento reorganizadas por JS */
body.page-id-7 .fdi-radio-fixed,
body.page-id-8 .fdi-radio-fixed,
body.page-id-7 label.fdi-radio-fixed,
body.page-id-8 label.fdi-radio-fixed,
body.page-id-7 .wc-block-components-radio-control__option.fdi-radio-fixed,
body.page-id-8 .wc-block-components-radio-control__option.fdi-radio-fixed {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-height: 54px !important;
  padding: 14px 18px !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

body.page-id-7 .fdi-radio-fixed > input[type="radio"],
body.page-id-8 .fdi-radio-fixed > input[type="radio"],
body.page-id-7 .fdi-radio-fixed .wc-block-components-radio-control__input,
body.page-id-8 .fdi-radio-fixed .wc-block-components-radio-control__input {
  position: absolute !important;
  inset: auto !important;
  left: 18px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  display: block !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0 !important;
  z-index: 4 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

body.page-id-7 .fdi-radio-fixed::before,
body.page-id-8 .fdi-radio-fixed::before {
  content: "" !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  border-radius: 999px !important;
  border: 1.5px solid rgba(123,47,190,.38) !important;
  background: #fff !important;
  box-sizing: border-box !important;
  display: inline-block !important;
  flex: 0 0 18px !important;
}

body.page-id-7 .fdi-radio-fixed.is-checked::before,
body.page-id-8 .fdi-radio-fixed.is-checked::before {
  border-color: #3D1A6E !important;
  box-shadow: inset 0 0 0 4px #fff !important;
  background: #3D1A6E !important;
}

body.page-id-7 .fdi-radio-content,
body.page-id-8 .fdi-radio-content {
  display: block !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  color: #514963 !important;
  line-height: 1.42 !important;
  white-space: normal !important;
}

body.page-id-7 .fdi-radio-content *,
body.page-id-8 .fdi-radio-content * {
  max-width: 100% !important;
  min-width: 0 !important;
  margin-left: 0 !important;
  padding-left: 0 !important;
  transform: none !important;
  overflow: visible !important;
  white-space: normal !important;
  text-overflow: unset !important;
}

body.page-id-7 .fdi-radio-content .wc-block-components-radio-control__label,
body.page-id-8 .fdi-radio-content .wc-block-components-radio-control__label,
body.page-id-7 .fdi-radio-content .wc-block-components-radio-control__secondary-label,
body.page-id-8 .fdi-radio-content .wc-block-components-radio-control__secondary-label,
body.page-id-7 .fdi-radio-text,
body.page-id-8 .fdi-radio-text {
  display: block !important;
  color: #514963 !important;
  line-height: 1.42 !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.page-id-7 .wc-block-components-radio-control__option:not(.fdi-radio-fixed),
body.page-id-8 .wc-block-components-radio-control__option:not(.fdi-radio-fixed) {
  padding-left: 52px !important;
}

/* Checkbox reorganizado */
body.page-id-7 .fdi-checkbox-fixed,
body.page-id-8 .fdi-checkbox-fixed,
body.page-id-7 .wc-block-components-checkbox.fdi-checkbox-fixed,
body.page-id-8 .wc-block-components-checkbox.fdi-checkbox-fixed {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 42px !important;
  padding: 0 !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

body.page-id-7 .fdi-checkbox-fixed input[type="checkbox"],
body.page-id-8 .fdi-checkbox-fixed input[type="checkbox"],
body.page-id-7 .fdi-checkbox-fixed .wc-block-components-checkbox__input[type="checkbox"],
body.page-id-8 .fdi-checkbox-fixed .wc-block-components-checkbox__input[type="checkbox"] {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 0 0 18px !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  opacity: 1 !important;
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
  accent-color: #7B2FBE !important;
}

body.page-id-7 .wc-block-components-checkbox__label,
body.page-id-8 .wc-block-components-checkbox__label {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: visible !important;
  white-space: normal !important;
  line-height: 1.45 !important;
}

/* Boleto/Mercado Livre recusado em iframe */
.fdi-boleto-fallback {
  margin: 24px auto !important;
  max-width: 760px !important;
  padding: 26px !important;
  border-radius: 24px !important;
  background: linear-gradient(180deg, #FFFFFF 0%, #FBF8FF 100%) !important;
  border: 1px solid rgba(123,47,190,.12) !important;
  box-shadow: 0 18px 48px rgba(61,26,110,.07) !important;
  text-align: center !important;
  color: #514963 !important;
}

.fdi-boleto-fallback h2 {
  margin: 0 0 10px !important;
  color: #3D1A6E !important;
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  font-size: clamp(1.8rem, 3vw, 2.6rem) !important;
}

.fdi-boleto-fallback p {
  margin: 0 auto 18px !important;
  max-width: 560px !important;
  line-height: 1.7 !important;
}

.fdi-boleto-fallback a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 48px !important;
  padding: 0 22px !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #7B2FBE 0%, #9C52DE 100%) !important;
  color: #FFFFFF !important;
  font-weight: 900 !important;
  text-decoration: none !important;
  box-shadow: 0 14px 32px rgba(123,47,190,.24) !important;
}

/* Corrige campo número + sem número em layouts lado a lado */
body.page-id-8 .wc-block-components-address-form,
body.page-id-8 .wc-block-components-address-form__address_2-toggle,
body.page-id-8 .wc-block-components-address-form__address_2,
body.page-id-8 .wc-block-components-address-form > div,
body.page-id-8 .wc-block-components-checkout-step__content,
body.page-id-8 .wc-block-components-form {
  overflow: visible !important;
  min-width: 0 !important;
}

body.page-id-8 .wc-block-components-address-form .wc-block-components-text-input,
body.page-id-8 .wc-block-components-address-form .wc-block-components-checkbox,
body.page-id-8 .wc-block-components-form .wc-block-components-text-input,
body.page-id-8 .wc-block-components-form .wc-block-components-checkbox {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: visible !important;
}

body.page-id-8 .wc-block-components-address-form .wc-block-components-text-input input,
body.page-id-8 .wc-block-components-form .wc-block-components-text-input input {
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
}

body.page-id-8 .wc-block-components-address-form .wc-block-components-checkbox label,
body.page-id-8 .wc-block-components-form .wc-block-components-checkbox label {
  white-space: normal !important;
}

body.page-id-8 .wc-block-components-text-input.has-error input,
body.page-id-8 .wc-block-components-text-input input:focus,
body.page-id-8 .wc-block-components-combobox input:focus,
body.page-id-8 .wc-block-components-radio-control:focus-within {
  outline: 3px solid rgba(123,47,190,.10) !important;
  outline-offset: 0 !important;
  box-shadow: none !important;
}

body.page-id-8 .wc-block-components-text-input.has-error input {
  border-color: #C62828 !important;
}
