/* -------------------------------------------------------------
 * Student Essay Word Counter - Modern UI Redesign
 * ------------------------------------------------------------- */
.leaf-word-counter-input-wrap {
  position: relative;
  margin-bottom: 1.75rem;
}

.leaf-word-counter-textarea {
  width: 100%;
  min-height: 280px;
  font-size: 1.05rem;
  line-height: 1.75;
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid #cbd5e1;
  font-family: inherit;
  resize: vertical;
  background-color: #ffffff;
  transition: all 0.25s ease;
  box-sizing: border-box;
  box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.02);
}

.leaf-word-counter-textarea:focus {
  border-color: #10b981;
  outline: none;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

/* Target Goal Progress Bar */
.leaf-goal-box {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.75rem;
}

.leaf-goal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.leaf-goal-title {
  font-weight: 700;
  font-size: 1rem;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.leaf-goal-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.leaf-goal-select, .leaf-goal-input {
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
}

.leaf-progress-bar-wrap {
  background: #e2e8f0;
  height: 14px;
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
}

.leaf-progress-fill {
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  height: 100%;
  width: 0%;
  border-radius: 9999px;
  transition: width 0.3s ease, background 0.3s ease;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.leaf-progress-fill.over-target {
  background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.leaf-goal-status {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 500;
  color: #64748b;
  margin-top: 8px;
}

/* Quick Formatting Toolbar */
.leaf-text-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.leaf-action-pill,
button.leaf-action-pill {
  border: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
  color: #475569 !important;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.leaf-action-pill:hover,
button.leaf-action-pill:hover {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(15, 23, 42, 0.05);
}

/* Keywords Frequency */
.leaf-keywords-box {
  margin-top: 2rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.02);
}

.leaf-keywords-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1rem;
}

.leaf-keywords-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.leaf-kw-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.leaf-kw-count {
  background: #e2e8f0;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 2px 8px;
  border-radius: 9999px;
  color: #0f172a;
}
