.ec-wrapper {
  box-sizing: border-box;
}
.ec-wrapper *,
.ec-wrapper *::before,
.ec-wrapper *::after {
  box-sizing: inherit;
}

.ec-wrapper {
  --primary-text-color: rgb(19, 87, 128);
  --primary-bg-color: rgb(19, 87, 128);
  --primary-hover-color: rgb(131, 176, 204);
  --primary-border-color: rgb(68, 111, 137);

  --secondary-text-color: #fefefe;
  --secondary-bg-color: #fefefe;
  --secondary-border-color: #fefefe;

  --tertiary-bg-color: rgb(235, 242, 246);
}

.ec-wrapper .ec-container {
  margin: 0 auto;
  max-width: 1100px;
}

@media (max-width: 540px) {
  .ec-wrapper .ec-container {
    margin: 0 auto;
    max-width: 500px;
  }
}

.ec-wrapper .ec-service-calculator__title {
  color: var(--primary-text-color);
  font-size: 30px;
  text-align: center;
}

.ec-wrapper .ec-service-calculator__text {
  color: var(--primary-text-color);
}

@media (max-width: 540px) {
  .ec-wrapper .table {
    font-size: 12px;
  }
}

@media (max-width: 400px) {
  .ec-wrapper .table {
    font-size: 11px;
  }
}

.ec-wrapper .ec-table__title,
.ec-wrapper .ec-table__footer {
  color: var(--secondary-text-color);
  border: 2px solid var(--primary-border-color);
  background-color: var(--primary-bg-color);
  margin: 5px 0px;
}

.ec-wrapper .ec-row,
.ec-wrapper .ec-table__title,
.ec-wrapper .ec-table__footer {
  display: flex;
  align-items: center;
  padding: 2px 10px;
  min-height: 40px;
  border-radius: 5px;
}

.ec-wrapper .ec-accordion-content .ec-row {
  color: var(--primary-text-color);
  transition: background-color 0.3s ease-out;
}

.ec-wrapper .ec-accordion-content .ec-row:nth-child(even) {
  background-color: var(--tertiary-bg-color);
}

.ec-wrapper .ec-accordion-content .ec-row:nth-child(odd) .ec-quantity .ec-input-quantity {
  background-color: var(--tertiary-bg-color);
}

@media (hover: hover) {
  .ec-wrapper .ec-accordion-content .ec-row:hover {
    background-color: var(--primary-hover-color);
  }
}

.ec-wrapper .ec-work-type,
.ec-wrapper .ec-work-type-title {
  max-width: 700px;
  min-width: 270px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

@media (max-width: 540px) {
  .ec-wrapper .ec-work-type,
  .ec-wrapper .ec-work-type-title {
    min-width: 185px;
  }
}

@media (max-width: 400px) {
  .ec-wrapper .ec-work-type,
  .ec-wrapper .ec-work-type-title {
    min-width: 140px;
  }
}

.ec-wrapper .ec-unit,
.ec-wrapper .ec-unit-title {
  max-width: 50px;
  min-width: 40px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 450px) {
  .ec-wrapper .ec-unit,
  .ec-wrapper .ec-unit-title {
    min-width: 23px;
  }
}

@media (max-width: 400px) {
  .ec-wrapper .ec-unit,
  .ec-wrapper .ec-unit-title {
    min-width: 20px;
  }
}

.ec-wrapper .ec-cost,
.ec-wrapper .ec-cost-title {
  max-width: 70px;
  min-width: 60px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 450px) {
  .ec-wrapper .ec-cost,
  .ec-wrapper .ec-cost-title {
    min-width: 50px;
  }
}

@media (max-width: 400px) {
  .ec-wrapper .ec-cost,
  .ec-wrapper .ec-cost-title {
    min-width: 40px;
  }
}

.ec-wrapper .ec-quantity,
.ec-wrapper .ec-quantity-title {
  max-width: 180px;
  width: 100%;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 450px) {
  .ec-wrapper .ec-quantity,
  .ec-wrapper .ec-quantity-title {
    max-width: 90px;
  }
}

.ec-wrapper .ec-result,
.ec-wrapper .ec-result-title {
  max-width: 80px;
  min-width: 45px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 450px) {
  .ec-wrapper .ec-result,
  .ec-wrapper .ec-result-title {
    min-width: 40px;
  }
}

.ec-wrapper label {
  cursor: pointer;
}

.ec-wrapper .ec-accordion-radio {
  -webkit-appearance: none;
  appearance: none;
  height: 0;
  width: 0;
  position: absolute;
}

.ec-wrapper .ec-head {
  color: var(--primary-text-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--primary-border-color);
  border-radius: 5px;
  padding: 1rem;
  background-color: var(--secondary-bg-color);
  transition:
    color 0.5s ease-out,
    background-color 0.5s ease-out;
}

@media (hover: hover) {
  .ec-wrapper .ec-head:hover {
    color: var(--secondary-text-color);
    background-color: var(--primary-bg-color);
  }
}

.ec-wrapper .ec-arrow {
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 15px solid var(--primary-border-color);
  display: inline-block;
  opacity: 1;
  transition: all 0.5s ease-out;
}

.ec-wrapper .ec-accordion-radio:checked ~ .ec-accordion-title > .ec-head {
  border-radius: 5px 5px 0px 0px;
}

.ec-wrapper .ec-accordion-radio:checked ~ .ec-accordion-title > .ec-head > .ec-arrow {
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 15px solid var(--secondary-border-color);
  border-top: 0px solid var(--secondary-border-color);
}

@media (hover: hover) {
  .ec-wrapper .ec-table__block:hover .ec-accordion-title > .ec-head > .ec-arrow {
    border-block-color: var(--secondary-border-color);
  }
}

.ec-wrapper .ec-accordion-radio:checked ~ .ec-accordion-title > .ec-head {
  color: var(--secondary-text-color);
  background-color: var(--primary-bg-color);
}

.ec-wrapper .ec-body {
  display: none;
}

.ec-wrapper .ec-accordion-radio:checked ~ .ec-body {
  display: block;
  border: 1px solid var(--primary-border-color);
  border-radius: 0px 0px 5px 5px;
}

.ec-wrapper .ec-quantity > .ec-input-quantity {
  display: inline-flex;
  justify-content: center;
  text-align: center;
  /* max-height: 26px; */
  height: 100%;
  width: 100%;
  min-width: 35px;
  padding: 0px;
  margin: 0px;
  color: var(--primary-text-color);
  border: 0px solid var(--primary-border-color);
  background-color: var(--secondary-bg-color);
}

.ec-wrapper .ec-quantity > .ec-quantity-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;

  height: 100%;
  width: 100%;
  max-width: 30px;
  /* max-height: 26px; */

  padding: 10px;

  color: var(--secondary-text-color);

  background-color: var(--primary-bg-color);
  border: 1px solid var(--primary-border-color);

  cursor: pointer;

  transition:
    color 0.5s ease-out,
    background-color 0.5s ease-out;
}

@media (hover: hover) {
  .ec-wrapper .ec-quantity > .ec-quantity-button:hover {
    background-color: var(--primary-hover-color);
  }
}

.ec-wrapper .ec-quantity > .ec-quantity-button:active {
  color: var(--primary-text-color);
  background-color: var(--secondary-bg-color);
}

.ec-wrapper .ec-quantity > .ec-quantity-down {
  border-radius: 5px 0px 0px 5px;
}

.ec-wrapper .ec-quantity > .ec-quantity-up {
  border-radius: 0px 5px 5px 0px;
}

@media (max-width: 450px) {
  .ec-wrapper .ec-quantity > .ec-input-quantity {
    min-width: 25px;
  }

  .ec-wrapper .ec-quantity > .ec-quantity-button {
    max-height: 30px;
    max-width: 20px;
    padding: 10px;
  }
}

@media (max-width: 450px) {
  .ec-wrapper .ec-quantity > .ec-input-quantity {
    min-width: 20px;
  }

  .ec-wrapper .ec-quantity > .ec-quantity-button {
    max-height: 30px;
    max-width: 18px;
    padding: 8px;
  }
}

.ec-wrapper .ec-block-all-summa {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  font-size: 20px;
  margin: 0px 10px;
}

.ec-wrapper input[type='number']::-webkit-inner-spin-button,
.ec-wrapper input[type='number']::-webkit-outer-spin-button {
  opacity: 0;
  display: none;
}

.ec-wrapper .ec-table__buttons {
  padding: 10px 10px;
}

.ec-wrapper .ec-table__buttons > .ec-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 20px 20px;
  font-size: 17px;
  color: var(--secondary-text-color);
  background-color: var(--primary-bg-color);
  border: 2px solid var(--primary-border-color);
  border-radius: 10px;
  cursor: pointer;

  transition:
    color 0.5s ease-out,
    background-color 0.5s ease-out;
}

@media (hover: hover) {
  .ec-wrapper .ec-table__buttons > .ec-button:hover {
    color: var(--primary-text-color);
    background-color: var(--secondary-bg-color);
  }
}

.ec-wrapper .ec-additional-works {
  max-width: 800px;
}

.ec-wrapper .ec-additional-works__block {
  display: flex;
  flex-direction: column;
  color: var(--primary-text-color);
  border: 2px solid var(--primary-border-color);
  border-radius: 5px;
}
.ec-wrapper .ec-additional-works__title {
  font-size: 18px;
}

.ec-wrapper .ec-table__block {
  margin: 4px 0px 0px 0px;
}
.ec-wrapper .ec-button:disabled {
  background-color: #7c7c7c;
}
.ec-wrapper .ec-button:disabled:hover {
  cursor: not-allowed;

}

/* ── Sums block ─────────────────────────────────────────────── */
.ec-wrapper .ec-sums-block {
  padding: 12px 20px;
  background: #f8f9fa;
  border-top: 1px solid #e0e0e0;
  border-radius: 0 0 6px 6px;
}

.ec-wrapper .ec-base-sum-row,
.ec-wrapper .ec-total-sum-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  padding: 3px 0;
}

.ec-wrapper .ec-base-sum-row {
  color: #888;
  font-size: 13px;
}

.ec-wrapper .ec-total-sum-row {
  font-weight: 700;
  font-size: 18px;
  color: #1d2327;
}

.ec-wrapper .ec-sums-block__label {
  color: #646970;
  font-weight: 400;
  font-size: 0.85em;
}

.ec-wrapper .ec-summa {
  color: #00a32a;
  font-variant-numeric: tabular-nums;
}

.ec-wrapper .ec-base-summa {
  font-variant-numeric: tabular-nums;
}

/* ── Minimum price warning ──────────────────────────────────── */
.ec-wrapper .ec-min-price-warning {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff8e5;
  border: 1px solid #f0c040;
  border-left: 4px solid #f0a500;
  border-radius: 6px;
  padding: 12px 16px;
  margin: 12px 0 16px;
  font-size: 14px;
  color: #5a3e00;
  line-height: 1.5;
  animation: ecMinWarnIn .25s ease;
}

@keyframes ecMinWarnIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ec-wrapper .ec-min-price-warning__icon {
  font-size: 20px;
  flex-shrink: 0;
}

.ec-wrapper .ec-min-price-warning__text {
  font-weight: 500;
}
