/* Spokojniejszy flow kalkulatora doboru zmywarki. Ładuje się po bazowych stylach. */

body:has(.dishwasher-calculator) {
  background: #65d9ff;
}

body:has(.dishwasher-calculator) .article-hero {
  padding-bottom: 28px;
}

body:has(.dishwasher-calculator) .article-stats {
  max-width: 920px;
  gap: 8px;
  margin-top: 18px;
}

body:has(.dishwasher-calculator) .article-stat {
  min-height: 0;
  padding: 12px 14px;
  border-width: 3px;
  box-shadow: 4px 4px 0 #111;
}

body:has(.dishwasher-calculator) .article-stat strong {
  font-size: clamp(30px, 4vw, 48px);
}

body:has(.dishwasher-calculator) .article-stat p {
  display: none;
}

.dishwasher-calculator {
  width: min(960px, calc(100% - 32px));
  margin: 22px auto 46px;
  border-width: 4px;
  box-shadow: 8px 8px 0 #111;
}

.dwcalc-head {
  display: block;
  padding: clamp(24px, 4vw, 38px);
  border-bottom-width: 4px;
  background: #fff5e9;
}

.dwcalc-head::before {
  display: block;
  width: 72px;
  height: 10px;
  margin-bottom: 18px;
  background: #65d9ff;
  content: '';
}

.dwcalc-head h2 {
  max-width: 700px;
  font-size: clamp(42px, 6vw, 68px);
}

.dwcalc-head p:last-child {
  max-width: 680px;
  margin-top: 14px;
  font-size: 15px;
  font-weight: 750;
}

.dwcalc-form {
  padding: clamp(18px, 3vw, 30px);
}

.dwcalc-flow {
  display: grid;
  gap: 18px;
}

.dwcalc-stage {
  padding: 0;
  border: 3px solid #111;
  background: #fff5e9;
}

.dwcalc-stage-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 3px solid #111;
  background: #fff;
}

.dwcalc-stage:nth-child(2) .dwcalc-stage-head {
  background: #f58220;
}

.dwcalc-stage-head > span {
  flex: 0 0 auto;
  font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
  font-size: 34px;
  line-height: 1;
}

.dwcalc-stage-head h3 {
  margin: 0;
  font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
  font-size: clamp(25px, 3vw, 36px);
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
}

.dwcalc-stage-head p {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 750;
}

.dwcalc-stage-grid,
.dwcalc-advanced-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: #111;
}

.dwcalc-card,
.dwcalc-card:nth-child(n) {
  min-width: 0;
  padding: 18px;
  border: 0;
  background: #fff5e9;
}

.dwcalc-stage-grid .dwcalc-card:nth-child(2) {
  background: #fff;
}

.dwcalc-label,
.dwcalc-card legend {
  margin-bottom: 5px;
  font-size: 15px;
  line-height: 1.2;
}

.dwcalc-help {
  margin-bottom: 12px;
  color: #4b4742;
  font-size: 11px;
  font-weight: 650;
}

.dwcalc-readout {
  margin-bottom: 8px;
}

.dwcalc-readout output {
  font-size: 46px;
}

.dwcalc-readout span {
  font-size: 13px;
}

.dwcalc-range {
  height: 13px;
  border-width: 3px;
}

.dwcalc-range::-webkit-slider-thumb {
  width: 24px;
  height: 24px;
  border-width: 3px;
}

.dwcalc-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-width: 3px;
}

.dwcalc-option {
  min-height: 46px;
  padding: 9px;
  border-width: 2px;
  font-size: 11px;
  text-align: center;
}

.dwcalc-option:hover,
.dwcalc-option:focus-visible {
  box-shadow: 3px 3px 0 #111;
}

.dwcalc-advanced {
  border: 3px solid #111;
  background: #fff;
}

.dwcalc-advanced summary {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 16px 52px 16px 16px;
  cursor: pointer;
  list-style: none;
}

.dwcalc-advanced summary::-webkit-details-marker {
  display: none;
}

.dwcalc-advanced summary::after {
  position: absolute;
  top: 50%;
  right: 18px;
  font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
  font-size: 30px;
  line-height: 1;
  content: '+';
  transform: translateY(-50%);
}

.dwcalc-advanced[open] summary::after {
  content: '−';
}

.dwcalc-advanced summary span {
  font-size: 13px;
  font-weight: 950;
  letter-spacing: .08em;
}

.dwcalc-advanced summary small {
  max-width: 680px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.4;
}

.dwcalc-advanced[open] summary {
  border-bottom: 3px solid #111;
  background: #65d9ff;
}

.dwcalc-advanced-grid .dwcalc-card:nth-child(2),
.dwcalc-advanced-grid .dwcalc-card:nth-child(3) {
  background: #fff;
}

.dwcalc-cost-fields {
  gap: 8px;
}

.dwcalc-cost-input {
  border-width: 2px;
}

.dwcalc-cost-input input {
  padding: 9px;
  font-size: 16px;
}

.dwcalc-submit {
  margin-top: 16px;
  padding: 14px;
  border-width: 3px;
}

.dwcalc-submit p {
  font-size: 11px;
  font-weight: 650;
}

.dwcalc-submit button,
.dwcalc-action {
  min-height: 48px;
  padding: 11px 16px;
  border-width: 3px;
  box-shadow: 4px 4px 0 #fff;
}

.dwcalc-result {
  margin: 0 clamp(18px, 3vw, 30px) clamp(20px, 3vw, 32px);
  border-width: 4px;
}

.dwcalc-result-top {
  grid-template-columns: minmax(0, 1.5fr) minmax(210px, .5fr);
  gap: 18px;
  padding: clamp(20px, 3vw, 30px);
  border-bottom-width: 3px;
}

.dwcalc-result h3 {
  font-size: clamp(40px, 6vw, 66px);
}

.dwcalc-result-summary {
  font-size: 15px;
}

.dwcalc-fit {
  padding: 14px;
  border-width: 3px;
}

.dwcalc-fit strong {
  font-size: 28px;
}

.dwcalc-metrics {
  gap: 1px;
  padding: 1px;
  border-bottom: 0;
  background: #fff;
}

.dwcalc-metric {
  min-height: 96px;
  padding: 14px;
  border: 0;
  background: #111;
}

.dwcalc-metric strong {
  font-size: clamp(23px, 3vw, 34px);
}

.dwcalc-result-details {
  margin: 18px clamp(18px, 3vw, 28px) 0;
  border: 2px solid #fff;
}

.dwcalc-result-details > summary {
  position: relative;
  padding: 14px 48px 14px 14px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .06em;
  list-style: none;
  text-transform: uppercase;
}

.dwcalc-result-details > summary::-webkit-details-marker {
  display: none;
}

.dwcalc-result-details > summary::after {
  position: absolute;
  right: 16px;
  content: '+';
}

.dwcalc-result-details[open] > summary::after {
  content: '−';
}

.dwcalc-analysis {
  grid-template-columns: 1fr;
  gap: 1px;
  padding: 1px;
  border-top: 2px solid #fff;
  background: #fff;
}

.dwcalc-analysis section {
  padding: 16px;
  border: 0;
  background: #111;
}

.dwcalc-analysis .dwcalc-warning {
  background: #f58220;
}

.dwcalc-result-actions {
  padding-top: 18px;
}

.dwcalc-reading-more {
  width: min(960px, calc(100% - 32px));
  margin: 24px auto 64px;
  border: 4px solid #111;
  background: #fff5e9;
  box-shadow: 8px 8px 0 #111;
}

.dwcalc-reading-more > summary {
  position: relative;
  padding: 20px 58px 20px 20px;
  cursor: pointer;
  list-style: none;
}

.dwcalc-reading-more > summary::-webkit-details-marker {
  display: none;
}

.dwcalc-reading-more > summary::after {
  position: absolute;
  top: 50%;
  right: 20px;
  font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
  font-size: 32px;
  content: '+';
  transform: translateY(-50%);
}

.dwcalc-reading-more[open] > summary::after {
  content: '−';
}

.dwcalc-reading-more > summary strong {
  display: block;
  font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
}

.dwcalc-reading-more > summary span {
  display: block;
  max-width: 680px;
  margin-top: 7px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.dwcalc-reading-more-content {
  padding: 0 18px 24px;
  border-top: 3px solid #111;
}

.dwcalc-reading-more-content > .article-visual,
.dwcalc-reading-more-content > .article-body {
  width: 100%;
  margin-right: 0;
  margin-left: 0;
}

@media (max-width: 760px) {
  .dwcalc-stage-grid,
  .dwcalc-advanced-grid,
  .dwcalc-result-top {
    grid-template-columns: 1fr;
  }

  .dwcalc-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .dishwasher-calculator,
  .dwcalc-reading-more {
    width: calc(100% - 18px);
    border-width: 3px;
    box-shadow: 5px 5px 0 #111;
  }

  .dwcalc-form {
    padding: 12px;
  }

  .dwcalc-stage-grid,
  .dwcalc-advanced-grid,
  .dwcalc-metrics {
    grid-template-columns: 1fr;
  }

  .dwcalc-submit {
    grid-template-columns: 1fr;
  }

  .dwcalc-submit button,
  .dwcalc-action {
    width: 100%;
    text-align: center;
  }

  .dwcalc-result {
    margin-right: 12px;
    margin-left: 12px;
  }
}

/* Mobile recovery: make the dishwasher flow lighter and unambiguous. */
@media (max-width: 560px) {
  .dishwasher-calculator {
    width: calc(100% - 16px);
    margin-top: 34px;
  }

  .dwcalc-header,
  .dwcalc-form,
  .dwcalc-result {
    padding-right: 14px;
    padding-left: 14px;
  }

  .dwcalc-stage {
    margin-top: 14px;
  }

  .dwcalc-option {
    min-height: 48px;
    border-width: 3px;
    background: #fff5e9;
    color: #111;
    font-size: 12px;
  }

  .dwcalc-option.is-selected {
    background: #111 !important;
    color: #fff5e9 !important;
  }

  .dwcalc-submit {
    margin-top: 12px;
    padding: 12px;
  }
  .dwcalc-submit button,
  .dwcalc-action {
    min-height: 52px;
    background: #f58220 !important;
    color: #111 !important;
    border-color: #111 !important;
  }

  .dwcalc-result {
    margin-right: 8px;
    margin-left: 8px;
  }

  .dwcalc-reading-more summary {
    min-height: 50px;
    padding: 12px 14px;
  }
}
