/**
 * calculator.css — Deviz Zugrav v4.4.0
 */

/* ============================================================
   STATS BAR
   ============================================================ */
.calc-stats-bar { padding: 56px 0; }

.cstat-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.cstat {
  text-align: center;
  padding: 0 40px;
  flex: 1;
  min-width: 160px;
}

.cstat-sep {
  width: 1px;
  height: 56px;
  background: var(--g2);
  flex-shrink: 0;
}

.cstat-num {
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 800;
  color: var(--b5);
  line-height: 1;
  letter-spacing: -.03em;
  display: inline;
}

.cstat-unit {
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 700;
  color: var(--o6);
  margin-left: 4px;
  display: inline;
}

.cstat-lbl {
  font-size: 13px;
  color: var(--g5);
  margin-top: 8px;
  line-height: 1.4;
}

/* ============================================================
   CALCULATOR LAYOUT
   ============================================================ */
.calc-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  margin-top: 48px;
}

.calc-left  { display: flex; flex-direction: column; gap: 28px; }
.calc-field { display: flex; flex-direction: column; gap: 10px; }

.calc-field label {
  font-size: 14px;
  font-weight: 700;
  color: var(--dk);
}

.calc-field label strong { color: var(--b7); font-size: 16px; }

.calc-field select {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  font-family: var(--f);
  font-weight: 600;
  color: var(--dk);
  background: var(--w);
  border: 1.5px solid var(--g2);
  border-radius: var(--r);
  outline: none;
  cursor: pointer;
  transition: border-color .15s ease;
}

.calc-field select:focus { border-color: var(--b5); }

.calc-field input[type="range"] {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(to right, var(--b5) 24%, var(--g2) 24%);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.calc-field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--w);
  border: 3px solid var(--b5);
  box-shadow: 0 2px 8px rgba(33,150,243,.25);
  cursor: pointer;
  transition: transform .1s ease;
}

.calc-field input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }

.calc-field input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--w); border: 3px solid var(--b5); cursor: pointer;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--g5);
  margin-top: -4px;
}

/* Grafic bare timp */
.calc-bar-chart {
  background: var(--g0);
  border: 1px solid var(--g2);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cbc-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--g5);
}

.cbc-row { display: flex; align-items: center; gap: 12px; }

.cbc-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--g7);
  width: 100px;
  flex-shrink: 0;
}

.cbc-track {
  flex: 1;
  background: var(--g2);
  border-radius: 4px;
  height: 28px;
  overflow: hidden;
}

.cbc-fill {
  height: 100%;
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  transition: width .6s cubic-bezier(.22,1,.36,1);
  min-width: 52px;
}

.cbc-fill--bad  { background: #fee2e2; }
.cbc-fill--good { background: #dcfce7; }
.cbc-fill--bad  span { font-size: 12px; font-weight: 700; color: #dc2626; white-space: nowrap; }
.cbc-fill--good span { font-size: 12px; font-weight: 700; color: #16a34a; white-space: nowrap; }

/* ============================================================
   REZULTATE
   ============================================================ */
.calc-right {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-content: start;
}

.res-card {
  background: var(--w);
  border: 1.5px solid var(--g2);
  border-radius: 14px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  transition: transform .2s ease, box-shadow .2s ease;
}

.res-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.07); }
.res-card--time   { border-color: rgba(33,150,243,.25); }
.res-card--money  { border-color: rgba(22,163,74,.25); background: #f0fdf4; }
.res-card--roi    { border-color: rgba(232,117,44,.25); }
.res-card--annual { border-color: rgba(124,58,237,.2); }

.res-card svg { opacity: .5; margin-bottom: 4px; }
.res-card--time   svg { color: var(--b5); }
.res-card--money  svg { color: var(--gr6); }
.res-card--roi    svg { color: var(--o6); }
.res-card--annual svg { color: #7c3aed; }

.res-val {
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 800;
  color: var(--dk);
  line-height: 1.1;
  letter-spacing: -.02em;
}

.res-card--money  .res-val { color: var(--gr6); }
.res-card--roi    .res-val { color: var(--o6); }
.res-card--annual .res-val { color: #7c3aed; }

.res-label  { font-size: 12px; font-weight: 700; color: var(--g7); line-height: 1.3; }
.res-context { font-size: 11px; color: var(--g5); line-height: 1.4; }

.calc-msg {
  grid-column: 1 / -1;
  background: var(--b1);
  border: 1px solid rgba(33,150,243,.2);
  border-radius: 10px;
  padding: 16px 20px;
  font-size: 14px;
  color: var(--b9);
  line-height: 1.65;
  min-height: 56px;
}

.calc-msg:empty { display: none; }

/* ============================================================
   GRAFIC CATEGORII
   ============================================================ */
.cat-chart {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cat-row {
  display: grid;
  grid-template-columns: 160px 1fr 130px;
  align-items: center;
  gap: 16px;
}

.cat-name { font-size: 14px; font-weight: 600; color: var(--dk); text-align: right; }

.cat-track {
  background: var(--g2);
  border-radius: 6px;
  height: 36px;
  overflow: hidden;
}

.cat-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--b7), var(--b5));
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  width: 0%;
  transition: width .9s cubic-bezier(.22,1,.36,1);
  min-width: 52px;
}

.cat-ore { font-size: 13px; font-weight: 700; color: #fff; white-space: nowrap; }
.cat-lei { font-size: 13px; font-weight: 700; color: var(--gr6); white-space: nowrap; }

/* ============================================================
   CONTEXT DARK
   ============================================================ */
.calc-context-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.cc-text .st { color: #fff; margin-bottom: 16px; }

.sp { font-size: 15px; line-height: 1.75; margin-bottom: 16px; }
.sp.light { color: rgba(255,255,255,.65); }

.cc-stats {
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  padding: 32px;
}

.cc-stat { text-align: center; }

.cc-big {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
}

.cc-sub { font-size: 13px; color: rgba(255,255,255,.5); margin-top: 6px; }
.cc-arrow { font-size: 28px; color: rgba(255,255,255,.3); text-align: center; }
.cc-divider { height: 1px; background: rgba(255,255,255,.1); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .calc-layout { grid-template-columns: 1fr; gap: 32px; }
  .calc-right  { grid-template-columns: 1fr 1fr; }
  .cat-row { grid-template-columns: 120px 1fr 100px; }
  .calc-context-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 767px) {
  .cstat-grid { flex-direction: column; gap: 24px; }
  .cstat-sep  { width: 60px; height: 1px; }
  .cstat      { padding: 0; }
  .calc-right { grid-template-columns: 1fr; }
  .cat-row    { grid-template-columns: 1fr; gap: 6px; }
  .cat-name   { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .cat-fill, .cbc-fill, .res-card { transition: none; }
}
