﻿/* Word Counter - Professional Text Analyzer */
.text-analyzer {
  display: grid;
  gap: 20px;
}
.analyzer-hero {
  padding: 4px 0 0;
}
.analyzer-kicker {
  margin: 0 0 8px;
  color: #a879ff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.analyzer-title {
  margin: 0;
  color: #fff;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.2;
}
.analyzer-subtitle,
.analyzer-note,
.analyzer-privacy {
  color: #a8a8b2;
}
.analyzer-subtitle {
  max-width: 680px;
  margin: 9px 0 0;
  line-height: 1.65;
}
.analyzer-input-card,
.analyzer-section,
.metric-card {
  border: 1px solid #2a2a34;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(28, 28, 35, 0.96), rgba(14, 14, 18, 0.98));
}
.analyzer-input-card {
  padding: 16px;
  box-shadow: 0 0 0 1px rgba(143, 92, 255, 0.04), 0 16px 36px rgba(0, 0, 0, 0.18);
}
.analyzer-input-head,
.analyzer-section-head,
.analyzer-actions,
.analyzer-selects {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.analyzer-input-head {
  justify-content: space-between;
  margin-bottom: 12px;
}
.analyzer-input-label,
.analyzer-section-title {
  color: #f5f2ff;
  font-weight: 800;
}
.analyzer-live {
  color: #ae86ff;
  font-size: 0.84rem;
}
.analyzer-textarea {
  display: block;
  width: 100%;
  min-height: 250px;
  box-sizing: border-box;
  padding: 18px;
  resize: vertical;
  border: 1px solid #3a3547;
  border-radius: 13px;
  outline: none;
  color: #f7f5ff;
  background: #0b0b10;
  font: 400 16px/1.75 inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.analyzer-textarea::placeholder {
  color: #85818f;
}
.analyzer-textarea:focus {
  border-color: #9164ff;
  box-shadow: 0 0 0 4px rgba(145, 100, 255, 0.13);
}
.analyzer-note {
  margin: 11px 0 0;
  font-size: 0.88rem;
  line-height: 1.55;
}
.primary-metrics,
.secondary-metrics,
.insight-metrics {
  display: grid;
  gap: 12px;
}
.primary-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.secondary-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.insight-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.metric-card {
  min-width: 0;
  padding: 17px;
}
.metric-label {
  display: block;
  color: #aaa6b3;
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.metric-value {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 8px;
  color: #fff;
  font-size: clamp(1.2rem, 2.3vw, 1.75rem);
  font-weight: 800;
  line-height: 1.2;
}
.metric-detail {
  display: block;
  margin-top: 5px;
  color: #948da2;
  font-size: 0.82rem;
}
.analyzer-section {
  padding: 18px;
}
.analyzer-section-head {
  justify-content: space-between;
  margin-bottom: 15px;
}
.analyzer-select-group {
  display: grid;
  gap: 5px;
  color: #aaa6b3;
  font-size: 0.82rem;
}
.analyzer-select {
  min-width: 132px;
  padding: 9px 32px 9px 10px;
  border: 1px solid #3a3547;
  border-radius: 9px;
  color: #f7f5ff;
  background: #121217;
  font: inherit;
}
.analyzer-actions {
  margin-top: 2px;
}
.analyzer-actions .btn {
  min-height: 40px;
}
.analyzer-status {
  min-height: 24px;
  margin: 0;
  color: #a8a8b2;
  font-size: 0.9rem;
}
.analyzer-status.success {
  color: #75df9a;
}
.analyzer-status.error {
  color: #ff8585;
}
.analyzer-privacy {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 13px 15px;
  border: 1px solid rgba(135, 93, 234, 0.25);
  border-radius: 12px;
  background: rgba(112, 70, 202, 0.08);
  font-size: 0.9rem;
  line-height: 1.5;
}
.analyzer-privacy strong {
  color: #d9ccff;
}
@media (max-width: 760px) {
  .primary-metrics,
  .secondary-metrics,
  .insight-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .analyzer-textarea {
    min-height: 210px;
  }
}
@media (max-width: 460px) {
  .primary-metrics,
  .secondary-metrics,
  .insight-metrics {
    grid-template-columns: 1fr;
  }
  .analyzer-actions .btn,
  .analyzer-select-group,
  .analyzer-select {
    width: 100%;
  }
}
/* Compact analyzer metrics: more information in less vertical space */
.text-analyzer {
  gap: 14px;
}
.analyzer-input-card {
  padding: 14px;
}
.analyzer-note {
  margin-top: 8px;
  font-size: 0.82rem;
}
.primary-metrics,
.secondary-metrics,
.insight-metrics {
  gap: 9px;
}
.metric-card {
  padding: 12px 14px;
  border-radius: 12px;
}
.metric-label {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}
.metric-value {
  margin-top: 5px;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
}
.metric-detail {
  margin-top: 3px;
  font-size: 0.76rem;
}
.analyzer-section {
  padding: 14px;
  border-radius: 13px;
}
.analyzer-section-head {
  margin-bottom: 10px;
}
.analyzer-section-title {
  font-size: 0.95rem;
}
.analyzer-selects {
  gap: 8px;
}
.analyzer-select-group {
  gap: 3px;
  font-size: 0.73rem;
}
.analyzer-select {
  min-width: 118px;
  padding: 7px 28px 7px 8px;
  font-size: 0.84rem;
}
.analyzer-actions {
  gap: 8px;
}
.analyzer-actions .btn {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 0.84rem;
}
.analyzer-status {
  min-height: 18px;
  font-size: 0.82rem;
}
.analyzer-privacy {
  padding: 10px 12px;
  font-size: 0.82rem;
}
/* Word Counter - Phase 2: local TXT files and word density */
.txt-dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  margin-bottom: 12px;
  padding: 9px 12px;
  border: 1px dashed #5d4795;
  border-radius: 11px;
  color: #bbb3cf;
  background: rgba(109, 74, 182, 0.07);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}
.txt-dropzone:hover,
.txt-dropzone.is-dragging {
  border-color: #a276ff;
  background: rgba(133, 85, 232, 0.15);
}
.txt-dropzone.is-dragging {
  transform: scale(1.01);
}
.txt-dropzone-title {
  color: #eee9ff;
  font-weight: 700;
}
.txt-dropzone-or {
  color: #8f899d;
  font-size: 0.86rem;
}
.txt-file-button {
  min-height: 32px !important;
  padding: 5px 10px !important;
  font-size: 0.8rem !important;
}
.top-words-list {
  display: grid;
  gap: 8px;
}
.top-word-row {
  display: grid;
  grid-template-columns: minmax(90px, 0.7fr) minmax(100px, 2fr) 36px 52px;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.top-word-name {
  overflow: hidden;
  color: #f5f2ff;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.top-word-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #272331;
}
.top-word-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7448e8, #ad82ff);
}
.top-word-count,
.top-word-density {
  color: #bdb6ca;
  font-size: 0.84rem;
  text-align: right;
}
@media (max-width: 560px) {
  .txt-dropzone {
    align-items: center;
    flex-direction: column;
    gap: 5px;
    text-align: center;
  }
  .top-word-row {
    grid-template-columns: minmax(80px, 1fr) minmax(60px, 1.4fr) 30px 44px;
    gap: 7px;
  }
}
