/* MKO MASTER FORM LAYOUT 6E — stałe sekcje: Podstawowe -> Specyfikacja -> Opis */
#wStep3 > #mkoBasicSection,
#wStep3 > #mkoSpecificationSlot,
#wStep3 > #mkoDescriptionSection {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
}

#wStep3 #mkoSpecificationSlot {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
}

#wStep3 .mko-master-basic-heading,
#wStep3 .mko-master-description-heading {
  margin: 0 !important;
  padding: 12px 0 10px !important;
  border-top: 1px solid var(--line, #dfe3e8) !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #172033 !important;
}

#wStep3 .mko-master-basic-heading {
  padding-top: 0 !important;
  border-top: 0 !important;
}

#wStep3 .mko-master-basic-heading > div,
#wStep3 .mko-master-description-heading > div {
  margin: 0 !important;
  color: #172033 !important;
  opacity: 1 !important;
  font-family: inherit !important;
  font-size: 16px !important;
  line-height: 1.35 !important;
  font-weight: 800 !important;
}

#wStep3 .mko-master-hide-subtitle {
  display: none !important;
}

#wStep3 #mkoSpecificationSlot > .mko-master-specification {
  display: block;
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: #172033 !important;
  box-sizing: border-box !important;
}

/* Wyłączamy dekoracyjne hero/panele lokalnych modułów, bez ruszania pól. */
#wStep3 #mkoSpecificationSlot .mko-master-spec-headbox,
#wStep3 #mkoSpecificationSlot [class*="hero" i]:has(.mko-master-spec-title),
#wStep3 #mkoSpecificationSlot [class*="header" i]:has(.mko-master-spec-title),
#wStep3 #mkoSpecificationSlot [class*="head" i]:has(.mko-master-spec-title) {
  display: block !important;
  width: 100% !important;
  margin: 16px 0 10px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: #172033 !important;
  overflow: visible !important;
}

#wStep3 #mkoSpecificationSlot .mko-master-spec-title {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 14px 0 12px !important;
  border: 0 !important;
  border-top: 1px solid var(--line, #dfe3e8) !important;
  border-bottom: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: #172033 !important;
  opacity: 1 !important;
  font-family: inherit !important;
  font-size: 18px !important;
  line-height: 1.35 !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

#wStep3 #mkoSpecificationSlot .mko-master-section-title,
#wStep3 #mkoSpecificationSlot h3,
#wStep3 #mkoSpecificationSlot h4,
#wStep3 #mkoSpecificationSlot h5 {
  color: #172033 !important;
  opacity: 1 !important;
  font-family: inherit !important;
  font-weight: 750 !important;
  line-height: 1.35 !important;
}

#wStep3 #mkoSpecificationSlot label,
#wStep3 #mkoSpecificationSlot .label,
#wStep3 #mkoSpecificationSlot .field-label {
  color: #4b5563 !important;
  opacity: 1 !important;
  font-family: inherit !important;
  font-weight: 650 !important;
}

#wStep3 #mkoSpecificationSlot small,
#wStep3 #mkoSpecificationSlot .hint,
#wStep3 #mkoSpecificationSlot .help,
#wStep3 #mkoSpecificationSlot .subtitle {
  color: #64748b !important;
  opacity: 1 !important;
}

#wStep3 #mkoDescriptionSection {
  margin-top: 12px !important;
}

@media (max-width: 700px) {
  #wStep3 #mkoSpecificationSlot .mko-master-spec-title {
    font-size: 17px !important;
  }
}

/* =========================================================
   MKO MOBILE CHECKBOX FIX
   Naprawa siatek checkboxów w specyfikacjach — tylko telefon
   ========================================================= */

@media (max-width: 700px) {

  /* Każda wykryta grupa checkboxów mieści się w ekranie */
  #wStep3 #mkoSpecificationSlot .mko-master-check-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  /* Pojedyncza pozycja checkbox + tekst */
  #wStep3 #mkoSpecificationSlot .mko-master-check-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 9px !important;

    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    margin: 0 !important;
    padding: 4px 0 !important;

    box-sizing: border-box !important;
    overflow: visible !important;
  }

  /* NAJWAŻNIEJSZE:
     checkbox nie może dziedziczyć szerokości/wysokości inputa formularza */
  #wStep3 #mkoSpecificationSlot
  .mko-master-check-item input[type="checkbox"] {
    appearance: auto !important;
    -webkit-appearance: checkbox !important;

    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;

    flex: 0 0 18px !important;

    margin: 2px 0 0 0 !important;
    padding: 0 !important;

    border-radius: 3px !important;
    box-shadow: none !important;
  }

  /* Tekst przy checkboxie */
  #wStep3 #mkoSpecificationSlot
  .mko-master-check-item label,
  #wStep3 #mkoSpecificationSlot
  label.mko-master-check-item {
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    font-size: 14px !important;
    line-height: 1.3 !important;
    font-weight: 650 !important;

    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;

    box-sizing: border-box !important;
  }

  /* Awaryjne zabezpieczenie również dla checkboxów,
     które lokalny moduł zbudował trochę inaczej */
  #wStep3 #mkoSpecificationSlot
  .mko-master-check-grid input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;

    margin: 2px 8px 0 0 !important;
    padding: 0 !important;

    box-sizing: border-box !important;
  }

  #wStep3 #mkoSpecificationSlot
  .mko-master-check-grid > * {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

