/* ALPLASTROY Stage 4 Wave 1 hotfix v1 — 2026-09-27 */

/* 1. Calculator: remove the legacy inner frame and align the final contact step. */
.alp-stage3-calculator .calc-block-body {
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

@media (min-width: 981px) {
  .alp-stage3-calculator form.ajax_form > .calc-block:last-of-type .calc-block-body {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

.alp-stage3-calculator form.ajax_form > .calc-block:last-of-type .calc-politics-block,
.alp-stage3-calculator form.ajax_form > .calc-block:last-of-type .calc-btn-block {
  grid-column: 1 / -1 !important;
}

.alp-stage3-calculator form.ajax_form > .calc-block:last-of-type .calc-politics-block .calc-elem.politics,
.alp-stage3-calculator form.ajax_form > .calc-block:last-of-type .calc-politics-block .calc-elem.politics:has(input:checked) {
  display: inline-flex !important;
  width: auto !important;
  min-height: 44px !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 9px 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transform: none !important;
}

.alp-stage3-calculator form.ajax_form > .calc-block:last-of-type .calc-politics-block .calc-elem-title {
  width: auto !important;
  font-size: 15px !important;
  line-height: 1.4 !important;
}

/* 2. Feedback drawer: modern close control and stable spacing on desktop/mobile. */
.layout--feedback .layout__wrapper {
  box-shadow: -18px 0 48px rgba(18, 48, 31, .18) !important;
}

.layout--feedback .layout__close-icon {
  position: absolute !important;
  z-index: 20 !important;
  top: 14px !important;
  right: 16px !important;
  display: flex !important;
  width: 42px !important;
  height: 42px !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  background: #fff !important;
  border: 1px solid #d5e2d9 !important;
  border-radius: 50% !important;
  box-shadow: 0 7px 20px rgba(18, 48, 31, .13) !important;
  cursor: pointer !important;
  transition: background-color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease !important;
}

.layout--feedback .layout__close-icon:hover,
.layout--feedback .layout__close-icon:focus-visible {
  background: #edf5ef !important;
  border-color: #79a889 !important;
  box-shadow: 0 9px 24px rgba(18, 48, 31, .18) !important;
  transform: rotate(4deg) scale(1.04) !important;
  outline: 0 !important;
}

.layout--feedback .layout__close-icon svg {
  width: 18px !important;
  height: 18px !important;
  max-width: none !important;
  max-height: none !important;
  pointer-events: none;
}

.layout--feedback .layout__close-icon svg path {
  fill: #173b27 !important;
}

.layout--feedback .scroller--sm-less-autoheight {
  box-sizing: border-box !important;
  min-height: 100% !important;
  margin-top: 0 !important;
  padding-top: 72px !important;
}

.layout--feedback .form_with_file .form-e.title {
  text-transform: none !important;
}

/* The proof CTA must open the complete form, not the compact two-field state. */
.layout--feedback.alp-stage4-full-form .alp-stage2-form-toggle {
  display: none !important;
}

.layout--feedback.alp-stage4-full-form .alp-stage2-form-optional,
.layout--feedback.alp-stage4-full-form .alp-stage2-form-optional[hidden] {
  display: block !important;
}

/* 3. File selector: stable custom surface; native filename can no longer clip. */
.alp-stage4-file-control {
  position: relative;
  display: grid;
  box-sizing: border-box;
  grid-template-columns: max-content minmax(0, 1fr);
  min-height: 56px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px;
  color: #33463a;
  background: #f7faf8;
  border: 1px dashed #9fc0aa;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.alp-stage4-file-control:hover {
  background: #f0f7f2;
  border-color: #1f6a3c;
}

.alp-stage4-file-control:focus-within {
  border-color: #1f6a3c;
  box-shadow: 0 0 0 3px rgba(31, 106, 60, .16);
}

.alp-stage4-file-control > input[type="file"] {
  position: absolute !important;
  z-index: 2 !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0 !important;
  cursor: pointer !important;
}

.alp-stage4-file-control__button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 9px 15px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  background: #1f6a3c;
  border-radius: 9px;
}

.alp-stage4-file-control__status {
  display: block;
  min-width: 0;
  color: #33463a;
  font-size: 15px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 4. The old two-photo door block becomes a compact horizontal gallery. */
.alp-stage4-compact-door-glass {
  display: grid !important;
  grid-template-columns: 1fr !important;
  align-items: start !important;
  gap: 18px !important;
  width: 100% !important;
  min-height: 0 !important;
  margin: 12px 0 34px !important;
  padding: 22px !important;
  background: #fff !important;
  border: 1px solid #dce7df !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 24px rgba(18, 48, 31, .06) !important;
  box-sizing: border-box !important;
}

.alp-stage4-compact-door-glass > .image-wrapper {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
  width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

.alp-stage4-compact-door-glass > .image-wrapper img {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: 270px !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 8px !important;
  object-fit: contain !important;
  background: #f3f7f4 !important;
  border-radius: 10px !important;
  box-sizing: border-box !important;
}

.alp-stage4-compact-door-glass > .catalog-content {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.alp-stage4-compact-door-glass > .catalog-content p {
  max-width: 920px;
  margin: 0 0 16px !important;
}

.alp-stage4-compact-door-glass > .catalog-content br {
  display: none;
}

/* 5. Restore correct contrast for real <a> buttons in the proof sections. */
html body .content-normalize .alp-stage4-proof a.alp-stage4-proof__action:not(.alp-stage4-proof__action--secondary),
html body .content-normalize .alp-stage4-proof a.alp-stage4-proof__action:not(.alp-stage4-proof__action--secondary):visited {
  color: #fff !important;
  background: #1f6a3c !important;
  border-color: #1f6a3c !important;
  opacity: 1 !important;
  text-decoration: none !important;
  background-image: none !important;
}

html body .content-normalize .alp-stage4-proof a.alp-stage4-proof__action:not(.alp-stage4-proof__action--secondary):hover,
html body .content-normalize .alp-stage4-proof a.alp-stage4-proof__action:not(.alp-stage4-proof__action--secondary):focus-visible {
  color: #fff !important;
  background: #185530 !important;
  border-color: #185530 !important;
}

html body .content-normalize .alp-stage4-proof a.alp-stage4-proof__action--secondary,
html body .content-normalize .alp-stage4-proof a.alp-stage4-proof__action--secondary:visited {
  color: #1f6a3c !important;
  background: #fff !important;
  border-color: #1f6a3c !important;
  background-image: none !important;
}

@media (max-width: 620px) {
  .alp-stage3-calculator form.ajax_form > .calc-block:last-of-type .calc-politics-block,
  .alp-stage3-calculator form.ajax_form > .calc-block:last-of-type .calc-btn-block {
    grid-column: auto !important;
  }

  .alp-stage3-calculator form.ajax_form > .calc-block:last-of-type .calc-politics-block .calc-elem.politics,
  .alp-stage3-calculator form.ajax_form > .calc-block:last-of-type .calc-politics-block .calc-elem.politics:has(input:checked) {
    align-items: flex-start !important;
    padding: 8px 0 !important;
  }

  .layout--feedback .layout__wrapper--max-w-500 {
    width: min(100%, 420px) !important;
    max-width: 100% !important;
  }

  .layout--feedback .layout__close-icon {
    top: 10px !important;
    right: 10px !important;
    width: 40px !important;
    height: 40px !important;
  }

  .layout--feedback .scroller--sm-less-autoheight {
    padding-top: 62px !important;
  }

  .alp-stage4-file-control {
    gap: 8px;
    min-height: 54px;
    padding: 6px;
  }

  .alp-stage4-file-control__button {
    min-height: 40px;
    padding: 9px 12px;
    font-size: 14px;
  }

  .alp-stage4-file-control__status {
    font-size: 14px;
  }

  .alp-stage4-compact-door-glass {
    gap: 14px !important;
    padding: 14px !important;
  }

  .alp-stage4-compact-door-glass > .image-wrapper {
    gap: 8px !important;
  }

  .alp-stage4-compact-door-glass > .image-wrapper img {
    height: 210px !important;
    padding: 5px !important;
  }
}

@media (max-width: 380px) {
  .alp-stage4-file-control__button {
    padding-right: 10px;
    padding-left: 10px;
    font-size: 13px;
  }

  .alp-stage4-file-control__status {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .layout--feedback .layout__close-icon,
  .alp-stage4-file-control {
    transition: none !important;
  }
}

/* ALPLASTROY Stage 4 Wave 1 hotfix v1.2 — compact two-photo block. */
html body .alp-stage3-richtext .alp-stage4-compact-door-glass > .image-wrapper.alp-cro-multi-photo {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  place-items: stretch !important;
  align-content: start !important;
  justify-content: center !important;
  gap: 12px !important;
  width: 100% !important;
  max-width: 420px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 auto !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-sizing: border-box !important;
}

html body .alp-stage3-richtext .alp-stage4-compact-door-glass > .image-wrapper.alp-cro-multi-photo > img {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: 210px !important;
  max-height: 210px !important;
  margin: 0 !important;
  padding: 6px !important;
  object-fit: contain !important;
  background: #f3f7f4 !important;
  border: 0 !important;
  border-radius: 10px !important;
  box-sizing: border-box !important;
}

/* Keep calculator links readable inside rich text blocks. */
html body .alp-stage3-richtext .alp-stage4-proof a.alp-stage4-proof__action:not(.alp-stage4-proof__action--secondary),
html body .alp-stage3-richtext .alp-stage4-proof a.alp-stage4-proof__action:not(.alp-stage4-proof__action--secondary):visited {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: #1f6a3c !important;
  border-color: #1f6a3c !important;
  opacity: 1 !important;
  filter: none !important;
  text-decoration: none !important;
}

html body .alp-stage3-richtext .alp-stage4-proof a.alp-stage4-proof__action:not(.alp-stage4-proof__action--secondary):hover,
html body .alp-stage3-richtext .alp-stage4-proof a.alp-stage4-proof__action:not(.alp-stage4-proof__action--secondary):focus-visible {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: #185530 !important;
  border-color: #185530 !important;
}

@media (max-width: 620px) {
  html body .alp-stage3-richtext .alp-stage4-compact-door-glass > .image-wrapper.alp-cro-multi-photo {
    max-width: 360px !important;
    gap: 8px !important;
  }

  html body .alp-stage3-richtext .alp-stage4-compact-door-glass > .image-wrapper.alp-cro-multi-photo > img {
    height: 175px !important;
    max-height: 175px !important;
    padding: 4px !important;
  }
}
