/* Калькулятор інвестицій відпочинкового комплексу.
   Dense financial tables in the site's language: white ground, #333 ink, #ff4501 accent,
   uppercase section labels. Tables scroll inside their own box so the page never does. */

.rcalc { background: #fbfbfb; color: #333; }
.rcalc__inner {
  max-width: 1400px; margin: 0 auto;
  padding: clamp(40px, 6vw, 100px) clamp(16px, 4vw, 80px);
}

/* ---- headings ---- */
/* Ширший за форму, бо під ним таблиці на всю сторінку; решта — від .uform__desc. */
.rcalc__desc { max-width: 62ch; }
.rcalc__head { margin-bottom: clamp(28px, 3vw, 48px); }
.rcalc__section { margin-top: clamp(36px, 4vw, 72px); }
.rcalc__note {
  margin: clamp(10px, 1vw, 14px) 0 0; font-size: clamp(12px, 0.82vw, 14px);
  line-height: 1.5; color: rgba(51, 51, 51, 0.6);
}

/* ---- base parameters ---- */
.rcalc__params {
  display: grid; gap: clamp(12px, 1.2vw, 18px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  padding: clamp(18px, 2vw, 28px); background: #fff; border: 1px solid #ddd; border-top: 3px solid #ff4501;
}
.rcalc__param { display: flex; flex-direction: column; gap: 8px; }
.rcalc__param label {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  font-weight: 600; font-size: clamp(12px, 0.82vw, 14px); line-height: 1.3; color: #333;
}
.rcalc__unit { font-weight: 500; color: rgba(51, 51, 51, 0.45); white-space: nowrap; }
.rcalc__param input {
  width: 100%; height: clamp(42px, 2.6vw, 50px); padding: 0 12px; box-sizing: border-box;
  font-weight: 700; font-size: clamp(15px, 1vw, 17px); color: #232323;
  background: #f6f6f6; border: 1.5px solid rgba(51, 51, 51, 0.18); border-radius: 8px;
}
.rcalc__param input:focus { outline: none; border-color: #ff4501; background: #fff; box-shadow: 0 0 0 3px rgba(255, 69, 1, 0.15); }

/* ---- tables ---- */
.rcalc__scroll { overflow-x: auto; background: #fff; border: 1px solid #ddd; -webkit-overflow-scrolling: touch; }
.rcalc__table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: clamp(13px, 0.85vw, 15px); }
.rcalc__table th, .rcalc__table td { padding: clamp(8px, 0.8vw, 12px) clamp(8px, 0.9vw, 14px); text-align: left; vertical-align: middle; }
.rcalc__table thead th {
  position: sticky; top: 0; z-index: 1; background: #232323; color: #fff;
  font-weight: 600; font-size: clamp(11px, 0.72vw, 13px); letter-spacing: 0.06em; text-transform: uppercase;
}
.rcalc__table tbody tr + tr { border-top: 1px solid rgba(51, 51, 51, 0.08); }
.rcalc__table tbody tr:hover { background: rgba(255, 69, 1, 0.03); }
.rcalc__table .c-code { width: 68px; color: rgba(51, 51, 51, 0.5); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rcalc__table .c-unit { width: 130px; color: rgba(51, 51, 51, 0.6); white-space: nowrap; }
.rcalc__table .c-qty { width: 130px; }
.rcalc__table .c-price { width: 150px; }
.rcalc__table .c-sum { width: 140px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.rcalc__table tr.is-group { background: #f2f2f2; }
.rcalc__table tr.is-group td { font-weight: 700; text-transform: uppercase; font-size: clamp(12px, 0.78vw, 14px); letter-spacing: 0.04em; }
.rcalc__table tr.is-sub td { font-weight: 600; background: #fafafa; }
.rcalc__table tfoot tr.is-total td {
  background: #232323; color: #fff; font-weight: 600;
  text-transform: uppercase; font-size: clamp(12px, 0.8vw, 14px); letter-spacing: 0.05em;
}
.rcalc__table tfoot tr.is-total b { color: #ff4501; font-size: clamp(15px, 1.1vw, 19px); }
.rcalc__uah { display: block; font-weight: 500; font-size: clamp(11px, 0.72vw, 13px); color: rgba(255, 255, 255, 0.55); text-transform: none; letter-spacing: 0; }

/* cell inputs */
.rcalc__table input {
  width: 100%; max-width: 110px; height: clamp(34px, 2.1vw, 40px); padding: 0 8px; box-sizing: border-box;
  font-weight: 600; font-size: clamp(13px, 0.85vw, 15px); color: #232323; text-align: right;
  background: #fff; border: 1.5px solid rgba(51, 51, 51, 0.18); border-radius: 6px;
  font-variant-numeric: tabular-nums;
}
.rcalc__table input:focus { outline: none; border-color: #ff4501; box-shadow: 0 0 0 3px rgba(255, 69, 1, 0.15); }
.rcalc__suffix { margin-left: 6px; color: rgba(51, 51, 51, 0.45); font-size: 0.9em; }
/* values the calculator fills in itself */
.rcalc__table .is-derived {
  display: inline-block; min-width: 60px; padding: 0 8px; text-align: right;
  font-weight: 600; color: rgba(51, 51, 51, 0.55); font-variant-numeric: tabular-nums;
  border-bottom: 1px dashed rgba(51, 51, 51, 0.25); cursor: help;
}

/* ---- KPI cards ---- */
.rcalc__kpis {
  display: grid; gap: clamp(12px, 1.2vw, 18px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}
.rcalc__kpi { padding: clamp(18px, 1.8vw, 26px); background: #fff; border: 1px solid #ddd; }
.rcalc__kpi--accent { background: #232323; border-color: #232323; }
.rcalc__kpi-label {
  font-weight: 600; font-size: clamp(11px, 0.78vw, 13px); letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(51, 51, 51, 0.55);
}
.rcalc__kpi--accent .rcalc__kpi-label { color: rgba(255, 255, 255, 0.6); }
.rcalc__kpi-value {
  margin: clamp(8px, 0.9vw, 14px) 0 6px; font-weight: 700; line-height: 1.05;
  font-size: clamp(26px, 2.3vw, 42px); color: #333; font-variant-numeric: tabular-nums;
}
.rcalc__kpi-value i { font-style: normal; font-size: 0.5em; font-weight: 600; color: rgba(51, 51, 51, 0.5); }
.rcalc__kpi--accent .rcalc__kpi-value { color: #ff4501; }
.rcalc__kpi--accent .rcalc__kpi-value i { color: rgba(255, 255, 255, 0.5); }
.rcalc__kpi-sub { font-size: clamp(11px, 0.75vw, 13px); color: rgba(51, 51, 51, 0.5); }
.rcalc__kpi--accent .rcalc__kpi-sub { color: rgba(255, 255, 255, 0.45); }

@media (max-width: 700px) {
  .rcalc__table .c-code { width: 52px; }
  .rcalc__table .c-unit { width: 110px; }
}
