/* TipCalc — tool-specific styles.
   Shared styles (nav, panels, buttons, chips) live in ../../css/style.css */

.tc {
  max-width: 760px;
  margin: 6px auto 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 12px;
  align-items: start;
}

/* ---------- Form ---------- */
.tc-form { display: flex; flex-direction: column; gap: 20px; }
.tc-field { display: flex; flex-direction: column; gap: 9px; }
.tc-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #74747e;
}
.tc-pct {
  color: var(--pink);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.tc-input-wrap {
  display: flex;
  align-items: center;
  background: #141418;
  border: 1px solid #26262b;
  border-radius: 12px;
  padding: 0 14px;
  transition: border-color .15s, box-shadow .15s;
}
.tc-input-wrap:focus-within {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(232, 70, 124, .18);
}
.tc-currency { color: #74747e; font-size: 1.1rem; font-weight: 600; }
#tc-bill {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font: inherit;
  font-size: 1.5rem;
  font-weight: 700;
  padding: 13px 8px;
  font-variant-numeric: tabular-nums;
}

#tc-pct {
  --fill: 60%;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pink) var(--fill), #26262b var(--fill));
  outline: none;
  cursor: pointer;
}
#tc-pct::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  border: none;
  cursor: pointer;
}
#tc-pct::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  border: none;
  cursor: pointer;
}
#tc-pct:focus-visible { box-shadow: 0 0 0 4px rgba(232, 70, 124, .25); }

.tc-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.tc-presets .chip { font-size: .78rem; padding: 6px 12px; font-variant-numeric: tabular-nums; }
.tc-presets .chip.active {
  background: var(--pink);
  border-color: var(--pink);
  color: #fff;
  font-weight: 600;
}

/* ---------- People ---------- */
.tc-people { display: flex; align-items: center; gap: 8px; }
.tc-step {
  flex: none;
  width: 42px; height: 42px;
  border-radius: 11px;
  background: #1c1c20;
  border: 1px solid #26262b;
  color: var(--text);
  font: inherit;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.tc-step:hover { background: #26262b; border-color: #3a3a42; }
.tc-step:active { transform: scale(.95); }
#tc-people {
  flex: 1;
  min-width: 0;
  background: #141418;
  border: 1px solid #26262b;
  border-radius: 11px;
  color: var(--text);
  font: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 11px;
  text-align: center;
  outline: none;
  font-variant-numeric: tabular-nums;
}
#tc-people:focus { border-color: var(--pink); }
#tc-people::-webkit-outer-spin-button,
#tc-people::-webkit-inner-spin-button,
#tc-bill::-webkit-outer-spin-button,
#tc-bill::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#tc-people, #tc-bill { -moz-appearance: textfield; }

/* ---------- Round switch ---------- */
.tc-round {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: .86rem;
  color: #c4c4cc;
  cursor: pointer;
}
.tc-round input { position: absolute; opacity: 0; pointer-events: none; }
.tc-round-track {
  flex: none;
  width: 36px; height: 20px;
  border-radius: 999px;
  background: #2a2a31;
  position: relative;
  transition: background .18s;
}
.tc-round-track::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #74747e;
  transition: transform .18s, background .18s;
}
.tc-round input:checked + .tc-round-track { background: rgba(232, 70, 124, .35); }
.tc-round input:checked + .tc-round-track::after {
  transform: translateX(16px);
  background: var(--pink);
}
.tc-round input:focus-visible + .tc-round-track { box-shadow: 0 0 0 3px rgba(232, 70, 124, .3); }

/* ---------- Result ---------- */
.tc-out .panel-body { display: flex; flex-direction: column; gap: 14px; }
.tc-main { text-align: center; }
.tc-main-label {
  display: block;
  color: var(--pink-light);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.tc-main strong {
  display: block;
  margin-top: 6px;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.05;
  color: #fff;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}

.tc-rows { display: flex; flex-direction: column; gap: 8px; }
.tc-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: .85rem;
  color: #8b8b94;
}
.tc-row strong {
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.tc-row-each strong { color: var(--pink-light); }
.tc-row[hidden] { display: none; }

.tc-copy { width: 100%; padding: 11px; font-size: .88rem; }

@media (max-width: 760px) {
  .tc { grid-template-columns: 1fr; }
}
