/* =========================================================
   CALC — калькулятор стоимости
   =========================================================
 */

ul.calc-button-group {
  list-style-type: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  gap: 14px;
}

.calc-btn,
.calc-link-load {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  line-height: 1;
  font-weight: 500;
  font-size: 18px;
  padding: 2px 10px;
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease,
    opacity 0.3s ease;
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #d5d5d5;
  text-align: center;
}

.calc-btn.is-active,
.calc-link-load {
  background: var(--te-red, #e00032);
  border: 1px solid var(--te-red, #e00032);
  color: #ffffff;
}

.calc-top-row {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  display: none;
}

.calc-top-row.is-active {
  display: flex;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#auto_link .calc-top-col {
  width: calc(100% - 20px);
}

.calc-link-load {
  margin: 14px auto 0;
  min-width: 177px;
  width: 100%;
  max-width: 177px;
}

.calc-top-col-city.hide,
.calc-top-col-city-link.hide {
  display: none;
}

.calc-top-col input:disabled,
.calc-top-col input:placeholder-shown {
  background: linear-gradient(45deg, #d9d9d9, #e4e4e4);
}

.calc-top-col input:not(:disabled):focus {
  background: #ffffff;
}

.calc-top-col-dop {
  width: 100%;
  display: flex;
}

@media (max-width: 767.98px) {
  .calc-top-col-dop {
    display: block;
  }
}

/* ===== Slim Select в калькуляторе ===== */

.calc-top .custom-select .ss-main,
.calc-detail .calc-detail__subtitle .ss-main {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d5d5d5;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: none;
}

/* Видимый фокус (a11y): раньше состояние совпадало с покоем */
.calc-top .custom-select .ss-main:focus-visible,
.calc-top .custom-select .ss-main.ss-focus,
.calc-top .custom-select .ss-main.ss-open-below,
.calc-top .custom-select .ss-main.ss-open-above,
.calc-detail .calc-detail__subtitle .ss-main:focus-visible,
.calc-detail .calc-detail__subtitle .ss-main.ss-focus,
.calc-detail .calc-detail__subtitle .ss-main.ss-open-below,
.calc-detail .calc-detail__subtitle .ss-main.ss-open-above {
  border-color: var(--te-red, #e00032);
  box-shadow: 0 0 0 3px rgba(224, 0, 50, 0.12);
  outline: none;
}

.calc-top .custom-select .ss-single,
.calc-detail .calc-detail__subtitle .ss-single {
  padding: 10px 38px 10px 12px;
  font-size: 16px;
  line-height: 1.2;
  color: #000;
}

.calc-top .custom-select .ss-arrow,
.calc-detail .calc-detail__subtitle .ss-arrow {
  margin-right: 10px;
}

.calc-top .custom-select .ss-content,
.calc-detail .calc-detail__subtitle .ss-content {
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.calc-top .custom-select .ss-option,
.calc-detail .calc-detail__subtitle .ss-option {
  padding: 10px 12px;
  font-size: 15px;
  color: #000;
  line-height: 1.2;
}

.calc-top .custom-select .ss-option.ss-highlighted,
.calc-top .custom-select .ss-option:hover,
.calc-detail .calc-detail__subtitle .ss-option.ss-highlighted,
.calc-detail .calc-detail__subtitle .ss-option:hover {
  background: #f5f5f5;
  color: #000;
}

.calc-top .custom-select .ss-option.ss-selected,
.calc-detail .calc-detail__subtitle .ss-option.ss-selected {
  background: #ececec;
  color: #000;
}

.calc-top-col .ss-main.ss-disabled,
.calc-detail .calc-detail__subtitle .ss-main.ss-disabled {
  background: linear-gradient(45deg, #d9d9d9, #e4e4e4);
  border-color: #d9d9d9;
  opacity: 1;
  cursor: not-allowed;
}

.calc-top .custom-select .ss-values,
.calc-detail .calc-detail__subtitle .ss-values {
  color: #000;
}

.calc-detail__subtitle .ss-main {
  display: inline-flex;
  vertical-align: middle;
  min-width: 220px;
  width: auto;
  margin-top: 10px;
}
