/* Кнопки действий под результатом */
.calc__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}
.calc__action_btn {
  font-family: "rb";
  font-size: 0.9rem;
  padding: 12px 18px;
  background: #fff;
  color: #007BFF;
  border: 0.5px solid #007BFF;
  cursor: pointer;
  transition: background 200ms, color 200ms;
}
.calc__action_btn:hover {
  background: #007BFF;
  color: #fff;
}

/* Таблица результата */
.calc__result_table {
  width: 100%;
  margin-top: 20px;
  border-collapse: collapse;
  font-family: "rb";
  font-size: 0.9rem;
}
.calc__result_table th,
.calc__result_table td {
  border: 0.5px solid #DDE2E5;
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}
.calc__result_table th {
  background: #f8f9fa;
  color: #0A2A66;
  font-weight: bold;
}
.calc__result_table td.calc__result_value {
  font-weight: bold;
  color: #041830;
}
.calc__result_table_wrap:empty {
  display: none;
}

/* Модальное окно «Поделиться» */
.share_modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 42, 102, 0.45);
  z-index: 20000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.share_modal.open {
  display: flex;
}
.share_modal__dialog {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  padding: 24px;
  font-family: "rb";
}
.share_modal__title {
  font-size: 1.1rem;
  font-weight: bold;
  color: #0A2A66;
  margin-bottom: 16px;
}
.share_modal__link {
  width: 100%;
  padding: 12px;
  border: 0.5px solid #DDE2E5;
  background: #f8f9fa;
  font-family: "rb";
  font-size: 0.85rem;
  color: #041830;
  margin-bottom: 16px;
}
.share_modal__btns {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.share_modal__btn {
  font-family: "rb";
  font-size: 0.9rem;
  padding: 10px 18px;
  border: 0.5px solid #007BFF;
  background: #fff;
  color: #007BFF;
  cursor: pointer;
}
.share_modal__btn:hover {
  background: #eaf4ff;
}
.share_modal__btn.primary {
  background: #007BFF;
  color: #fff;
}
.share_modal__btn.primary:hover {
  background: rgb(1, 110, 226);
}

/* Кнопки «+» и «-» справа по центру: компактные и неброские */
.split_btns {
  position: fixed;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 10001;
}
.split_btns button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0.5px solid #c3d3e6;
  background: rgba(255, 255, 255, 0.9);
  color: #4a5b70;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  opacity: 0.65;
  transition: background 200ms, color 200ms, opacity 200ms;
}
.split_btns button:hover {
  background: #007BFF;
  color: #fff;
  border-color: #007BFF;
  opacity: 1;
}
.split_btns button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.split_btns button:disabled:hover {
  background: rgba(255, 255, 255, 0.9);
  color: #4a5b70;
  border-color: #c3d3e6;
}

/* Выпадающее меню калькуляторов (открывается влево от кнопки «+») */
.split_menu {
  display: none;
  position: fixed;
  top: 50%;
  right: 52px;
  transform: translateY(-50%);
  min-width: 200px;
  background: #fff;
  border: 0.5px solid #DDE2E5;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  padding: 6px 0;
  z-index: 10002;
}
.split_menu.open {
  display: block;
}
.split_menu__empty {
  padding: 10px 16px;
  font-family: "rb";
  font-size: 14px;
  color: #6C757D;
}
.split_cat {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  font-family: "rb";
  font-size: 14px;
  color: #0A2A66;
  cursor: pointer;
  white-space: nowrap;
}
.split_cat:hover {
  background: #f0f4f7;
}
.split_sub {
  display: none;
  position: absolute;
  right: 100%;
  top: 0;
  min-width: 280px;
  max-height: 60vh;
  overflow-y: auto;
  background: #fff;
  border: 0.5px solid #DDE2E5;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  padding: 6px 0;
}
.split_cat:hover > .split_sub {
  display: block;
}
.split_item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 8px 16px;
  font-family: "rb";
  font-size: 14px;
  color: #041830;
  cursor: pointer;
  white-space: nowrap;
}
.split_item:hover {
  background: #eaf4ff;
  color: #007BFF;
}

/* Колонки с калькуляторами справа */
#split_wrap {
  display: none;
  position: fixed;
  top: 65px;
  right: 0;
  bottom: 0;
  width: calc(100% - 100% / var(--parts, 1));
  background: #f0f4f7;
  z-index: 5;
}
.split_pane {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid #DDE2E5;
  background: #fff;
}
.split_pane__bar {
  flex: 0 0 auto;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 8px 0 12px;
  background: #f8f9fa;
  border-bottom: 1px solid #DDE2E5;
}
.split_pane__name {
  font-family: "rb";
  font-size: 13px;
  font-weight: bold;
  color: #0A2A66;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.split_pane__close {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  color: #6C757D;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  border-radius: 3px;
}
.split_pane__close:hover {
  background: #e2e8ef;
  color: #041830;
}
.split_pane iframe {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  border: 0;
  background: #fff;
}

/* Режим разделённого экрана: левая часть (текущий калькулятор) */
body.split-on #split_wrap {
  display: flex;
}
body.split-on .container {
  width: calc(100% / var(--parts, 1));
}
/* Шапка всегда на всю ширину окна, в том числе в режиме разделения */
.container .header {
  width: 100% !important;
}
body.split-on .container .header {
  padding-left: 20px !important;
  padding-right: 20px !important;
  overflow: hidden;
}
body.split-on .container .header .logo__desc {
  display: none;
}
body.split-on .footer {
  width: calc(100% / var(--parts, 1));
}
body.split-on .calc {
  padding-left: 24px !important;
  padding-right: 24px !important;
}
body.split-on .calc .calc__content {
  flex-direction: column !important;
}
body.split-on .calc .calc__output,
body.split-on .calc .calc__fl {
  margin-left: 0 !important;
}

/* На узких экранах разделение и кнопки не показываем */
@media (max-width: 899px) {
  .split_btns,
  .split_menu,
  #split_wrap {
    display: none !important;
  }
}
