/* Patch 120: sdílené CSS pro kostru wizardu a obecné výběrové prvky. */

.ap-calc-shell {
  background: #fff;
  border: 1px solid var(--ap-border);
  border-radius: 30px;
  box-shadow: var(--ap-shadow);
  padding: clamp(18px, 3vw, 32px);
  overflow: hidden;
}
.ap-stage {
  border-top: 1px solid var(--ap-border);
  padding-top: 24px;
  animation: apFade .18s ease-out;
  scroll-margin-top: 130px;
}
.ap-stage + .ap-stage { margin-top: 18px; }
.ap-stage-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 13px;
  align-items: start;
  margin-bottom: 20px;
}
.ap-stage-num {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--ap-blue);
  color: #fff;
  border-radius: 999px;
  font-weight: 900;
}
.ap-stage h3 {
  margin: 0 0 .2rem;
  color: var(--ap-blue-dark);
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  letter-spacing: -.02em;
}
.ap-stage-head p { margin: 0; color: var(--ap-muted); }
.ap-subtitle {
  color: var(--ap-blue-dark);
  font-size: 1.1rem;
  letter-spacing: .04em;
  margin: 22px 0 14px;
  text-transform: uppercase;
}
.ap-subtitle::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 1.15em;
  background: var(--ap-green);
  margin-right: 10px;
  vertical-align: -2px;
}
.ap-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.ap-option-grid.compact { grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); }
.ap-choice {
  min-height: 104px;
  border: 1px solid var(--ap-border);
  background: #fff;
  border-radius: 18px;
  padding: 15px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease, box-shadow .15s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: .3rem;
  font-weight: 800;
}
.ap-choice .choice-icon { font-size: 1.55rem; line-height: 1; }
.ap-choice small { color: var(--ap-muted); font-weight: 700; }
.ap-choice:hover { transform: translateY(-1px); border-color: rgba(16,185,129,.65); }
.ap-choice.is-selected {
  background: var(--ap-green-soft);
  border-color: var(--ap-green);
  color: #064e3b;
  box-shadow: 0 12px 25px rgba(16,185,129,.12);
}
.ap-next { margin-top: 8px; min-width: 260px; }
.ap-access-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  align-items: start;
}
.ap-access-block {
  border: 1px solid var(--ap-border);
  border-radius: 22px;
  padding: 18px;
  background: #fff;
}
.ap-access-block h4 { margin: 0 0 14px; color: var(--ap-blue-dark); }

/* Patch 112 – vizuální zpřívětivění bytové kalkulačky, sdílené prvky wizardu. */
.ap-wizard,
.ap-calculator-shell,
[data-apartment-calc] .ap-wizard {
  border-radius: 30px;
}

.ap-calc-card,
.ap-wizard-card,
[data-apartment-calc] {
  --ap-local-shadow: 0 22px 70px rgba(15, 23, 42, .075);
}

.ap-stage h2,
.ap-stage h3,
.ap-stage-title {
  letter-spacing: -0.035em;
}

.ap-stage > p,
.ap-stage .ap-helper,
.ap-lead,
.ap-muted {
  color: #64748b;
}

.ap-choice {
  border-radius: 20px;
  min-height: 112px;
  padding: 18px 16px;
  background: #fff;
  border-color: #dfe8f0;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .035);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background-color .16s ease;
}

.ap-choice:hover {
  transform: translateY(-1px);
  border-color: rgba(16, 185, 129, .55);
  box-shadow: 0 16px 34px rgba(15, 23, 42, .065);
}

.ap-choice.is-selected {
  background: linear-gradient(180deg, #d7fae7 0%, #c9f7dc 100%);
  border-color: var(--ap-green);
  box-shadow: 0 16px 38px rgba(16, 185, 129, .16);
}

.ap-choice strong {
  line-height: 1.18;
}

.ap-choice small {
  color: #64748b;
  font-weight: 700;
}

@media (max-width: 820px) {
  .ap-access-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .ap-choice {
    min-height: 96px;
  }
}

@media (max-width: 540px) {
  .ap-calc-shell { border-radius: 20px; padding: 14px; }
  .ap-option-grid { grid-template-columns: 1fr; }
  .ap-next { width: 100%; min-width: 0; }
}
