.word-counter-panel {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.word-counter-editor {
  padding: 1rem;
}

.word-counter-label {
  display: block;
  margin-bottom: 0.55rem;
  color: #eaf3ee;
  font-size: 0.875rem;
  font-weight: 600;
}

.word-counter-textarea {
  display: block;
  width: 100%;
  min-height: 17rem;
  resize: vertical;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.9rem;
  background: rgba(0, 0, 0, 0.18);
  color: #eaf3ee;
  padding: 1rem;
  font: inherit;
  line-height: 1.7;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.word-counter-textarea::placeholder {
  color: rgba(177, 195, 185, 0.64);
}

.word-counter-textarea:focus,
.word-counter-limit:focus {
  outline: none;
  border-color: rgba(82, 197, 150, 0.82);
  box-shadow: 0 0 0 3px rgba(82, 197, 150, 0.16);
}

.word-counter-options {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.word-counter-limit-wrap {
  flex: 1 1 13rem;
  max-width: 18rem;
}

.word-counter-limit {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem;
  background: rgba(0, 0, 0, 0.18);
  color: #eaf3ee;
  padding: 0.65rem 0.8rem;
  font: inherit;
}

.word-counter-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.word-counter-button {
  min-height: 2.75rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.75rem;
  padding: 0.65rem 0.9rem;
  color: #eaf3ee;
  background: rgba(255, 255, 255, 0.04);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.word-counter-button:hover {
  border-color: rgba(82, 197, 150, 0.55);
  color: #52c596;
}

.word-counter-button:focus-visible {
  outline: 2px solid #52c596;
  outline-offset: 3px;
}

.word-counter-button-primary {
  border-color: rgba(82, 197, 150, 0.4);
  background: rgba(82, 197, 150, 0.12);
  color: #73d8ad;
}

.word-counter-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.word-counter-stat {
  padding: 1rem;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.word-counter-stat:nth-child(2n) {
  border-right: 0;
}

.word-counter-stat-value {
  display: block;
  color: #eaf3ee;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1;
}

.word-counter-stat-label {
  display: block;
  margin-top: 0.35rem;
  color: #b1c3b9;
  font-size: 0.75rem;
}

.word-counter-limit-status {
  padding: 0.85rem 1rem;
  color: #b1c3b9;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.word-counter-limit-status[data-state="over"] {
  color: #ffb4aa;
}

@media (min-width: 640px) {
  .word-counter-editor {
    padding: 1.25rem;
  }

  .word-counter-stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .word-counter-stat,
  .word-counter-stat:nth-child(2n) {
    border-right: 1px solid rgba(255, 255, 255, 0.08);
  }

  .word-counter-stat:last-child {
    border-right: 0;
  }
}

