/* CARMOND-CODEX-CHANGE 2026-07-28: high-contrast light CARMOND form surface. */
.carmond-form {
  margin: 32px 0;
  padding: 24px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #fff;
  color: #172033;
  box-shadow: none;
}

/* CARMOND-CODEX-CHANGE 2026-07-27: progressive single-contact UI and accessible interaction states. */
.carmond-form [hidden] {
  display: none !important;
}

.carmond-form__heading h2 {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.25;
  color: #172033;
}

.carmond-form__heading p {
  margin: 0;
  color: #526176;
  line-height: 1.45;
}

.carmond-form__heading::after {
  display: block;
  width: 44px;
  height: 3px;
  margin: 14px 0 20px;
  border-radius: 2px;
  background: #ea580c;
  content: "";
}

/* CARMOND-CODEX-CHANGE 2026-07-29: owner-approved light variant A for product selection only. */
.carmond-form--product_selection {
  overflow: hidden;
  padding: 0;
  border-color: #93c5fd;
  box-shadow: 0 13px 30px rgba(37, 99, 235, .16);
}

.carmond-form--product_selection .carmond-form__heading {
  position: relative;
  min-height: 148px;
  padding: 24px 88px 22px 20px;
  background: #2563eb;
  color: #fff;
}

.carmond-form--product_selection .carmond-form__heading h2 {
  position: relative;
  z-index: 1;
  margin-bottom: 8px;
  color: #fff;
  letter-spacing: -.02em;
}

.carmond-form--product_selection .carmond-form__heading p {
  position: relative;
  z-index: 1;
  color: #dbeafe;
}

.carmond-form--product_selection .carmond-form__heading::after {
  display: none;
}

.carmond-form__hero-visual {
  position: absolute;
  right: 12px;
  bottom: 14px;
  width: 72px;
  height: 72px;
  color: #fff;
}

.carmond-form__benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 18px 20px 0;
  background: #fff;
}

.carmond-form__benefit {
  display: flex;
  min-width: 0;
  min-height: 68px;
  padding: 8px 5px;
  border-radius: 8px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-align: center;
}

.carmond-form__benefit svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  color: #2563eb;
}

.carmond-form--product_selection > form {
  padding: 16px 20px 20px;
}

.carmond-form__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.carmond-form__field {
  min-width: 0;
}

.carmond-form__field label,
.carmond-form__field legend {
  display: block;
  margin: 0 0 7px;
  color: #263142;
  font-weight: 700;
  line-height: 1.35;
}

.carmond-form__field input[type="text"],
.carmond-form__field input[type="tel"],
.carmond-form__field input[type="email"],
.carmond-form__field input[type="url"],
.carmond-form__field input[type="number"],
.carmond-form__field input[type="date"],
.carmond-form__field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid #aebccd;
  border-radius: 7px;
  background: #f8fafc;
  color: #172033;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.carmond-form__field input::placeholder,
.carmond-form__field textarea::placeholder {
  color: #66758c;
  opacity: 1;
}

.carmond-form__field textarea {
  min-height: 104px;
  resize: vertical;
}

.carmond-form__field input:focus-visible,
.carmond-form__field textarea:focus-visible,
.carmond-form__choices input:focus-visible,
.carmond-form__submit:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .28);
  outline-offset: 2px;
}

.carmond-form__field input:focus,
.carmond-form__field textarea:focus {
  border-color: #2563eb;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}

.carmond-form__contact-feedback {
  display: block;
  min-height: 18px;
  margin-top: 5px;
  color: #526176;
  font-size: 13px;
  line-height: 1.35;
}

.carmond-form.is-contact-telephone .carmond-form__contact-feedback,
.carmond-form.is-contact-telegram .carmond-form__contact-feedback,
.carmond-form.is-contact-email .carmond-form__contact-feedback {
  color: #1e6d46;
}

.carmond-form__field.has-error input,
.carmond-form__field.has-error textarea,
.carmond-form.is-contact-invalid [data-carmond-form-field="contact"] input {
  border-color: #b42318;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, .1);
}

.carmond-form__field.has-error .carmond-form__contact-feedback,
.carmond-form.is-contact-invalid .carmond-form__contact-feedback {
  color: #b42318;
}

.carmond-form__field fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.carmond-form__choices {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.carmond-form__choices label {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 7px;
  margin: 0;
  padding: 9px 11px;
  border: 1px solid #aebccd;
  border-radius: 7px;
  background: #fff;
  color: #263142;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.carmond-form__preferred-contact {
  grid-column: 1 / -1;
  padding: 14px;
  border: 1px solid #d7e0ea;
  border-radius: 10px;
  background: #f8fafc;
  box-shadow: none;
}

.carmond-form__preferred-contact .carmond-form__choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.carmond-form__preferred-contact .carmond-form__choices label {
  justify-content: center;
  min-width: 0;
  padding: 8px 6px;
  font-size: 14px;
  line-height: 1.2;
  text-align: center;
}

.carmond-form__choices input[type="radio"],
.carmond-form__choices input[type="checkbox"] {
  /* CARMOND-CODEX-CHANGE 2026-07-28: neutralize ProStore's absolute native-control positioning inside CARMOND FORM. */
  position: static !important;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin: 0;
  opacity: 1 !important;
  appearance: auto !important;
  accent-color: #2563eb;
}

.carmond-form__choices label:has(input:checked) {
  border-color: #2563eb;
  background: #eff6ff;
  color: #172033;
}

.carmond-form__consent {
  display: grid !important;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  margin: 0 !important;
  color: #263142;
  line-height: 1.4;
  cursor: pointer;
}

.carmond-form__consent input[type="checkbox"] {
  position: static !important;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  opacity: 1 !important;
  appearance: auto !important;
  accent-color: #2563eb;
}

.carmond-form__consent > span {
  grid-column: 2;
  min-width: 0;
  width: auto;
}

.carmond-form__privacy-note {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #526176;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.carmond-form__privacy-note::before {
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  place-items: center;
  border-radius: 50%;
  background: #dcfce7;
  color: #15803d;
  content: "✓";
  font-size: 12px;
  font-weight: 800;
}

.carmond-form--product_selection [data-carmond-form-field="requirements"] input {
  min-height: 46px;
}

.carmond-form__field-error {
  display: block;
  min-height: 18px;
  margin-top: 5px;
  color: #b42318;
  font-size: 13px;
}

.carmond-form__status {
  min-height: 24px;
  margin: 16px 0 8px;
  color: #1e6d46;
  font-weight: 600;
}

/* CARMOND-CODEX-CHANGE 2026-07-28: empty feedback must not inflate compact embedded forms. */
.carmond-form__field-error:empty,
.carmond-form__status:empty {
  display: none;
}

.carmond-form__submit {
  width: 100%;
  min-height: 52px;
  margin-top: 18px;
  padding: 12px 22px;
  border: 0;
  border-radius: 7px;
  background: #ea580c;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

.carmond-form__submit:hover {
  background: #c2410c;
}

.carmond-form__submit:active {
  background: #9a3412;
}

.carmond-form__submit:disabled {
  cursor: wait;
  opacity: .55;
}

.carmond-form__honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* CARMOND-CODEX-CHANGE 2026-07-27: approved non-overlay product-card placement. */
.carmond-product-layout__form {
  flex: 0 0 100%;
  order: 3;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 24px;
  padding-right: 12px;
  padding-left: 12px;
}

.carmond-product-layout__form .carmond-form {
  margin: 0;
}

.carmond-product-layout__form .carmond-form__fields {
  grid-template-columns: minmax(0, 1fr);
}

.carmond-product-layout__form .carmond-form__preferred-contact {
  grid-column: auto;
}

.carmond-product-layout__form .carmond-form__choices {
  flex-direction: column;
}

.carmond-product-layout__form .carmond-form__choices label {
  width: 100%;
}

@media (min-width: 1280px) {
  /* CARMOND-CODEX-CHANGE 2026-07-27: Bootstrap row clearfix must not become grid cells. */
  .carmond-product-layout::before,
  .carmond-product-layout::after {
    display: none;
    content: none;
  }

  .carmond-product-layout {
    display: grid;
    grid-template-columns: minmax(0, 44fr) minmax(0, 29fr) minmax(320px, 27fr);
    align-items: start;
    gap: clamp(16px, 1.5vw, 24px);
    margin-right: 0;
    margin-left: 0;
  }

  .carmond-product-layout__gallery,
  .carmond-product-layout__details,
  .carmond-product-layout__form {
    flex: none;
    width: auto;
    max-width: none;
    min-width: 0;
    margin-top: 0;
    padding-right: 0;
    padding-left: 0;
  }

  .carmond-product-layout__details .sku__details-table {
    width: 100%;
    table-layout: fixed;
  }

  .carmond-product-layout__details .sku__details-table td {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  /* CARMOND-CODEX-CHANGE 2026-07-28: keep native brand and actions from overlapping in the narrowed details column. */
  .carmond-product-layout__details .sku__brand {
    position: static;
    width: auto;
    margin: 0 0 16px;
  }

  .carmond-product-layout__form .carmond-form:not(.carmond-form--product_selection) {
    padding: 20px 18px;
    border-radius: 14px;
  }

  .carmond-product-layout__form .carmond-form__choices {
    flex-direction: row;
  }

  .carmond-product-layout__form .carmond-form__choices label {
    flex: 1 1 84px;
    width: auto;
  }

  .carmond-product-layout__form .carmond-form__heading h2 {
    font-size: 21px;
    line-height: 1.25;
  }

  .carmond-product-layout__form .carmond-form__heading p {
    font-size: 14px;
  }
}

@media (max-width: 1279px) {
  .carmond-product-layout__gallery {
    order: 1;
  }

  .carmond-product-layout__details {
    order: 2;
  }

  .carmond-product-layout__form {
    order: 3;
  }
}

@media (max-width: 767px) {
  .carmond-form {
    margin: 20px 0;
    padding: 20px 16px;
    border-radius: 12px;
  }

  .carmond-form--product_selection {
    padding: 0;
  }

  .carmond-form--product_selection .carmond-form__heading {
    min-height: 138px;
    padding: 20px 82px 19px 16px;
  }

  .carmond-form__hero-visual {
    right: 10px;
    width: 66px;
    height: 66px;
  }

  .carmond-form__benefits {
    padding: 16px 16px 0;
  }

  .carmond-form--product_selection > form {
    padding: 16px;
  }

  .carmond-form__fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .carmond-form__preferred-contact {
    grid-column: auto;
  }

  .carmond-form__choices {
    flex-direction: column;
  }

  .carmond-form__field input[type="text"],
  .carmond-form__field input[type="tel"],
  .carmond-form__field input[type="email"],
  .carmond-form__field input[type="url"],
  .carmond-form__field input[type="number"],
  .carmond-form__field input[type="date"] {
    min-height: 48px;
    font-size: 16px;
  }

  .carmond-form__choices label {
    min-height: 48px;
  }

  .carmond-form__preferred-contact .carmond-form__choices label {
    min-height: 44px;
    padding-right: 4px;
    padding-left: 4px;
    font-size: 14px;
  }

  .carmond-form__field textarea {
    min-height: 112px;
  }

  .carmond-form__heading h2 {
    font-size: 23px;
  }

  .carmond-product-layout__gallery,
  .carmond-product-layout__details,
  .carmond-product-layout__form {
    min-width: 0;
  }

  .carmond-product-layout__form {
    margin-top: 20px;
    padding-right: 0;
    padding-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .carmond-form__field input,
  .carmond-form__field textarea,
  .carmond-form__choices label,
  .carmond-form__submit {
    transition: none;
  }
}
