/* =============================================
   Cleaning Calculator — Стили
   Тема: TOP Cleaning | Bootstrap 5 + Montserrat
   ============================================= */

/* --- Обёртка --- */
.clcalc {
  font-family: "Montserrat", sans-serif;
  max-width: 860px;
  margin: 0 auto;
  padding: 0;
}

/* --- Шаг --- */
.clcalc__step {
  background: #fff;
  border: 1px solid #e8ecf0;
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.clcalc__step-title {
  font-size: 17px;
  font-weight: 700;
  color: #1a2332;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.clcalc__step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: #0d6efd;
  color: #fff;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.clcalc__optional {
  font-size: 13px;
  font-weight: 400;
  color: #8a9ab0;
  margin-left: 4px;
}

/* --- Тип объекта --- */
.clcalc__object-types {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.clcalc__type-card {
  flex: 1;
  min-width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 16px;
  border: 2px solid #e8ecf0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #f8fafc;
  user-select: none;
}

.clcalc__type-card input[type="radio"] {
  display: none;
}

.clcalc__type-card:hover {
  border-color: #0d6efd;
  background: #f0f5ff;
}

.clcalc__type-card--active,
.clcalc__type-card.active {
  border-color: #0d6efd;
  background: #e8f0fe;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.12);
}

.clcalc__type-icon {
  font-size: 36px;
  line-height: 1;
}

.clcalc__type-label {
  font-size: 14px;
  font-weight: 600;
  color: #1a2332;
  text-align: center;
}

/* --- Метраж --- */
.clcalc__area-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.clcalc__area-display {
  font-size: 42px;
  font-weight: 800;
  color: #0d6efd;
  text-align: center;
  line-height: 1;
}

.clcalc__range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(
    to right,
    #0d6efd 0%,
    #0d6efd var(--range-pct, 10%),
    #e0e7ef var(--range-pct, 10%),
    #e0e7ef 100%
  );
  outline: none;
  cursor: pointer;
}

.clcalc__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0d6efd;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.4);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.clcalc__range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.clcalc__range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0d6efd;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.4);
  cursor: pointer;
}

.clcalc__area-limits {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #8a9ab0;
  margin-top: -8px;
}

.clcalc__area-manual {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.clcalc__area-manual label {
  font-size: 13px;
  color: #5a6a7e;
  margin: 0;
  white-space: nowrap;
}

.clcalc__area-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.clcalc__input {
  width: 100px;
  padding: 8px 36px 8px 12px;
  border: 1.5px solid #d0d9e4;
  border-radius: 8px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #1a2332;
  outline: none;
  transition: border-color 0.2s;
}

.clcalc__input:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.12);
}

.clcalc__area-unit {
  position: absolute;
  right: 10px;
  font-size: 13px;
  color: #8a9ab0;
  pointer-events: none;
}

/* --- Вид уборки / Срочность --- */
.clcalc__cleaning-types,
.clcalc__urgency-types {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.clcalc__radio-card {
  flex: 1;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 12px;
  border: 2px solid #e8ecf0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #f8fafc;
  user-select: none;
  text-align: center;
}

.clcalc__radio-card input[type="radio"] {
  display: none;
}

.clcalc__radio-card:hover {
  border-color: #0d6efd;
  background: #f0f5ff;
}

.clcalc__radio-card--active,
.clcalc__radio-card.active {
  border-color: #0d6efd;
  background: #e8f0fe;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.12);
}

.clcalc__radio-label {
  font-size: 13px;
  font-weight: 600;
  color: #1a2332;
}

.clcalc__radio-coef {
  font-size: 12px;
  font-weight: 700;
  color: #0d6efd;
  background: rgba(13, 110, 253, 0.1);
  padding: 2px 8px;
  border-radius: 20px;
}

.clcalc__radio-coef--warn {
  color: #e65c00;
  background: rgba(230, 92, 0, 0.1);
}

/* Срочность — цветовые акценты */
.clcalc__urgency-express.active,
.clcalc__urgency-express.clcalc__radio-card--active {
  border-color: #f59e0b;
  background: #fffbeb;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.clcalc__urgency-urgent.active,
.clcalc__urgency-urgent.clcalc__radio-card--active {
  border-color: #ef4444;
  background: #fff5f5;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

/* --- Доп. услуги --- */
.clcalc__extras {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.clcalc__extra-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid #e8ecf0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #f8fafc;
  user-select: none;
}

.clcalc__extra-item:hover {
  border-color: #0d6efd;
  background: #f0f5ff;
}

.clcalc__extra-item input[type="checkbox"] {
  display: none;
}

.clcalc__extra-check {
  width: 20px;
  height: 20px;
  border: 2px solid #d0d9e4;
  border-radius: 5px;
  flex-shrink: 0;
  transition: all 0.2s ease;
  position: relative;
  background: #fff;
}

.clcalc__extra-check::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 5px;
  width: 6px;
  height: 10px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.clcalc__extra-item.active .clcalc__extra-check {
  background: #0d6efd;
  border-color: #0d6efd;
}

.clcalc__extra-item.active .clcalc__extra-check::after {
  opacity: 1;
}

.clcalc__extra-item.active {
  border-color: #0d6efd;
  background: #e8f0fe;
}

.clcalc__extra-label {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: #1a2332;
}

.clcalc__extra-price {
  font-size: 13px;
  font-weight: 700;
  color: #0d6efd;
  white-space: nowrap;
}

/* --- Итог --- */
.clcalc__result {
  background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
  border-radius: 20px;
  padding: 36px 40px;
  text-align: center;
  color: #fff;
  box-shadow: 0 8px 32px rgba(13, 110, 253, 0.3);
  margin-top: 8px;
}

.clcalc__result-label {
  font-size: 15px;
  font-weight: 600;
  opacity: 0.85;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.clcalc__result-price {
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}

.clcalc__result-currency {
  font-size: 32px;
  font-weight: 700;
  opacity: 0.9;
}

.clcalc__result-note {
  font-size: 13px;
  opacity: 0.7;
  margin-bottom: 28px;
}

/* --- Кнопки --- */
.clcalc__result-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.clcalc__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  border: 2px solid transparent;
}

.clcalc__btn--wa {
  background: #25d366;
  color: #fff;
  border-color: #25d366;
}

.clcalc__btn--wa:hover {
  background: #1ebe5d;
  border-color: #1ebe5d;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.clcalc__btn--tg {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.clcalc__btn--tg:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* --- Анимация обновления цены --- */
@keyframes clcalc-pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
  100% {
    transform: scale(1);
  }
}

.clcalc__result-price.updating {
  animation: clcalc-pulse 0.3s ease;
}

/* --- Адаптив --- */
@media (max-width: 768px) {
  .clcalc__step {
    padding: 20px 18px;
  }
  .clcalc__object-types {
    gap: 10px;
  }
  .clcalc__type-card {
    min-width: 90px;
    padding: 14px 10px;
  }
  .clcalc__type-icon {
    font-size: 28px;
  }
  .clcalc__area-display {
    font-size: 32px;
  }
  .clcalc__cleaning-types,
  .clcalc__urgency-types {
    gap: 8px;
  }
  .clcalc__radio-card {
    min-width: 120px;
    padding: 12px 10px;
  }
  .clcalc__extras {
    grid-template-columns: 1fr;
  }
  .clcalc__result {
    padding: 24px 20px;
    border-radius: 16px;
  }
  .clcalc__result-price {
    font-size: 34px;
  }
  .clcalc__result-currency {
    font-size: 24px;
  }
  .clcalc__result-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .clcalc__btn {
    justify-content: center;
    padding: 14px 20px;
  }
}

@media (max-width: 480px) {
  .clcalc__object-types {
    flex-direction: column;
  }
  .clcalc__type-card {
    flex-direction: row;
    justify-content: flex-start;
    padding: 12px 16px;
  }
  .clcalc__cleaning-types,
  .clcalc__urgency-types {
    flex-direction: column;
  }
  .clcalc__radio-card {
    flex-direction: row;
    justify-content: space-between;
    min-width: unset;
  }
}
