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

.wc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  align-items: start;
}

/* ---------- Editor ---------- */
.wc-editor { display: flex; flex-direction: column; min-width: 0; }
.wc-actions { margin-left: auto; display: flex; gap: 6px; }

#wc-text {
  width: 100%;
  min-height: 440px;
  resize: vertical;
  display: block;
  background: transparent;
  border: none;
  padding: 16px;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  line-height: 1.7;
  outline: none;
}
#wc-text::placeholder { color: #5c5c66; }
.wc-saved { margin-left: auto; color: var(--pink); font-weight: 600; }

/* ---------- Right column ---------- */
.wc-panel { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

.wc-hero {
  padding: 20px 14px;
  text-align: center;
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(232, 70, 124, .16), transparent 70%),
    var(--card-2);
}
.wc-hero strong {
  display: block;
  font-size: 2.9rem;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.wc-hero span {
  display: block;
  margin-top: 6px;
  color: var(--pink-light);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.wc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wc-stat {
  background: var(--card-2);
  border: 1px solid #1c1c20;
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
}
.wc-stat strong {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.wc-stat span { color: #74747e; font-size: .72rem; }

/* ---------- Reading time ---------- */
.wc-read { display: flex; flex-direction: column; gap: 8px; }
.wc-read-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: .85rem;
  color: #8b8b94;
}
.wc-read-row strong {
  color: var(--text);
  font-size: .95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.wc-speed { color: #74747e; font-size: .76rem; margin-top: 4px; }
.wc-speed strong { color: var(--pink); }

#wc-wpm {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: #2a2a31;
  outline: none;
  cursor: pointer;
}
#wc-wpm::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--pink);
  border: 2px solid #0e0e11;
  cursor: pointer;
}
#wc-wpm::-moz-range-thumb {
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--pink);
  border: 2px solid #0e0e11;
  cursor: pointer;
}

/* ---------- Frequent words ---------- */
.wc-top-list { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.wc-top-list li {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  overflow: hidden;
  font-size: .85rem;
}
.wc-top-bar {
  position: absolute;
  inset: 0 auto 0 0;
  background: rgba(232, 70, 124, .16);
  border-radius: 8px;
}
.wc-top-word, .wc-top-n { position: relative; }
.wc-top-word { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-top-n { color: var(--pink); font-weight: 700; font-variant-numeric: tabular-nums; }
.wc-top-empty { color: #5c5c66; font-size: .82rem; padding: 2px; }

@media (max-width: 880px) {
  .wc-layout { grid-template-columns: 1fr; }
  #wc-text { min-height: 240px; }
}
