/* Only what the counter needs on top of tool_page.css: the writing area, the
   character limit meters and the frequency list. */
.wc-tool {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.wc-tool [hidden] {
  display: none !important;
}

.wc-stage {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  border-radius: 24px;
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 2, 18, 0.6);
}

.wc-input {
  width: 100%;
  min-height: 220px;
  padding: 16px;
  border-radius: 16px;
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  line-height: 26px;
  resize: vertical;
}

.wc-input {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
}

.wc-input::-webkit-scrollbar {
  width: 8px;
}

.wc-input::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.24);
}

.wc-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.wc-input:focus {
  outline: none;
  border-color: #6e00ff;
}

.wc-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wc-hint {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

.wc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.wc-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  border-radius: 24px;
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 2, 18, 0.6);
}

.wc-panel h2 {
  margin: 0;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
}

.wc-limits {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.wc-limit {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wc-limit-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
}

.wc-limit-count {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.wc-limit.is-within .wc-limit-count {
  color: #4ed6a8;
}

.wc-limit.is-over .wc-limit-count {
  color: #ff8f8f;
}

.wc-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.wc-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6e00ff 0%, #bc8aff 100%);
  transition: width 0.3s ease;
}

.wc-limit.is-over .wc-bar span {
  background: linear-gradient(90deg, #b83a3a 0%, #ff8f8f 100%);
}

.wc-keywords {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wc-keyword {
  display: grid;
  grid-template-columns: 160px 1fr 84px;
  align-items: center;
  gap: 16px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
}

.wc-keyword-word {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wc-keyword-count {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
  .wc-limits {
    grid-template-columns: 1fr;
  }

  .wc-keyword {
    grid-template-columns: 110px 1fr 74px;
    gap: 12px;
  }

  .wc-toolbar {
    justify-content: center;
  }
}
