/* ==========================================================================
   ToolIxa Word Counter Specific Component Styles
   Matches global design system tokens, responsive grid, light & dark theme
   ========================================================================== */

/* Statistics Grid */
.wc-stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.wc-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.wc-stat-card:hover {
  border-color: var(--border-brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.wc-stat-card.primary-stat {
  border-color: var(--primary-500);
  background: var(--gradient-hero-badge);
}

.wc-stat-icon {
  width: 2rem;
  height: 2rem;
  color: var(--primary-500);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wc-stat-value {
  font-size: 1.85rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--text-main);
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.wc-stat-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Secondary Time Pills Bar */
.wc-time-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.wc-time-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
}

.wc-time-pill svg {
  color: var(--primary-500);
}

/* Main Textarea Workspace */
.wc-workspace-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-bottom: 2rem;
}

.wc-toolbar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.wc-btn-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Limit Counter Badge */
.wc-limit-wrapper {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--bg-surface);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.wc-limit-input {
  width: 70px;
  padding: 0.2rem 0.4rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  background: var(--bg-body);
  font-weight: 700;
  text-align: center;
  font-size: 0.85rem;
}

.wc-limit-badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-xs);
  background: var(--bg-muted);
  color: var(--text-secondary);
}

.wc-limit-badge.exceeded {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

/* Large Textarea Input */
.wc-textarea-wrapper {
  position: relative;
  padding: 1.25rem;
}

.wc-textarea {
  width: 100%;
  min-height: 320px;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-main);
  background: transparent;
  resize: vertical;
  border: none;
  outline: none;
  font-family: var(--font-sans);
}

.wc-textarea::placeholder {
  color: var(--text-muted);
}

/* Case Transformation Toolbar Bottom */
.wc-toolbar-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: var(--bg-surface-elevated);
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 1rem;
}

.wc-case-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* Detailed Analysis Breakdown Grid */
.wc-analysis-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.wc-analysis-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.wc-analysis-card h5 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  letter-spacing: 0.05em;
}

.wc-analysis-val {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-500);
  word-break: break-word;
}

/* Privacy Guarantee Badge Notice */
.wc-privacy-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.5rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-lg);
  color: #059669;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 3rem;
  text-align: center;
}

[data-theme="dark"] .wc-privacy-notice {
  color: #34D399;
}

/* Responsive Grid Adaptations */
@media (max-width: 1024px) {
  .wc-stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .wc-analysis-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .wc-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }
  .wc-stat-value {
    font-size: 1.45rem;
  }
  .wc-stat-card {
    padding: 1rem 0.5rem;
  }
  .wc-analysis-grid {
    grid-template-columns: 1fr;
  }
  .wc-toolbar-top, .wc-toolbar-bottom {
    flex-direction: column;
    align-items: stretch;
  }
  .wc-btn-group {
    justify-content: center;
  }
}
