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

.pc {
  max-width: 620px;
  margin: 6px auto 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---------- Tabs ---------- */
.pc-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: var(--card-2);
  border: 1px solid #1c1c20;
  border-radius: 12px;
  padding: 5px;
}
.pc-tab {
  background: none;
  border: none;
  border-radius: 9px;
  color: #74747e;
  font: inherit;
  font-size: .84rem;
  font-weight: 600;
  padding: 9px 8px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.pc-tab:hover { color: #c4c4cc; }
.pc-tab.active { background: var(--pink); color: #fff; }
.pc-tab:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(232, 70, 124, .3); }

/* ---------- Question line ---------- */
.pc-card .panel-body { padding: 22px 20px; }

.pc-line {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 1.05rem;
}
.pc-word { color: #8b8b94; }

.pc-line input {
  width: 118px;
  background: #141418;
  border: 1px solid #26262b;
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 10px 12px;
  outline: none;
  text-align: center;
  font-variant-numeric: tabular-nums;
  transition: border-color .15s, box-shadow .15s;
}
.pc-line input:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(232, 70, 124, .18);
}
/* Hide the spinner: the value is typed, not stepped. */
.pc-line input::-webkit-outer-spin-button,
.pc-line input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pc-line input[type="number"] { -moz-appearance: textfield; }

/* ---------- Result ---------- */
.pc-result {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid #1c1c20;
}
.pc-result strong {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}
.pc-result strong.is-up { color: #22c55e; }
.pc-result strong.is-down { color: #ef4444; }

.pc-explain {
  margin-top: 10px;
  text-align: center;
  color: #74747e;
  font-size: .85rem;
}

/* ---------- Steps ---------- */
.pc-steps {
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.pc-steps li {
  counter-increment: step;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #c4c4cc;
  font-size: .88rem;
  font-variant-numeric: tabular-nums;
}
.pc-steps li::before {
  content: counter(step);
  flex: none;
  width: 20px; height: 20px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #1c1c20;
  color: var(--pink);
  font-size: .7rem;
  font-weight: 700;
}
.pc-steps:empty::after {
  content: "Fill the fields above.";
  color: #5c5c66;
  font-size: .85rem;
}

@media (max-width: 520px) {
  .pc-tab { font-size: .76rem; padding: 9px 4px; }
  .pc-line { font-size: .95rem; }
  .pc-line input { width: 100px; }
  .pc-result strong { font-size: 2.1rem; }
}
