/* Word Counter — extends global.css */

.wc-textarea-wrap { margin-top: 18px; }
#wcText {
  width: 100%;
  min-height: 280px;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--secondary);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-dark);
  resize: vertical;
  transition: var(--transition);
  outline: none;
}
#wcText:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(55,122,209,0.12); }

.limit-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 8px;
}
.limit-bar .lbl {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 0.9rem; color: var(--text-dark);
}
.limit-bar .lbl input {
  width: 90px; padding: 7px 10px; border: 1px solid var(--border);
  border-radius: 6px; font-family: var(--font); font-size: 0.92rem;
  outline: none; transition: var(--transition);
}
.limit-bar .lbl input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(55,122,209,0.10); }
.limit-msg { font-size: 0.92rem; color: var(--text-light); font-weight: 500; }
.limit-msg.over { color: #dc2626; font-weight: 700; }

.section-heading {
  font-size: 1.08rem;
  color: var(--primary);
  margin: 24px 0 12px;
  display: flex; align-items: center; gap: 10px;
}
.section-heading::before {
  content:''; display:inline-block; width:4px; height:18px;
  background: var(--primary); border-radius: 3px;
}

.wc-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.wc-stat {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 12px;
  text-align: center;
  transition: var(--transition);
}
.wc-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--primary-light); }
.wc-stat.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.wc-stat.primary .wc-stat-label { color: rgba(255,255,255,0.85); }
.wc-stat-label { font-size: 0.78rem; color: var(--text-light); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.wc-stat-value { font-size: 1.7rem; font-weight: 800; color: var(--text-dark); margin-top: 4px; }
.wc-stat.primary .wc-stat-value { color: #fff; }

.wc-freq { background: var(--bg-light); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; }
.wc-freq-empty { color: var(--text-light); margin: 0; }
.wc-freq table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.wc-freq th, .wc-freq td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.wc-freq th { background: rgba(55,122,209,0.08); color: var(--primary); font-weight: 700; }
.wc-freq tr:last-child td { border-bottom: none; }
.wc-freq td.count { text-align: right; font-weight: 700; color: var(--primary); }

@media (max-width: 640px) {
  .limit-bar { flex-direction: column; align-items: stretch; }
  .limit-bar .lbl { justify-content: space-between; }
}
