/* ═══════════════════════════════════════════════════════════════
   Word Limit Trainer — specific styles
═══════════════════════════════════════════════════════════════ */

/* Mode bar */
.wlt-mode-bar {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: 10px;
  padding: var(--space-3);
  margin-bottom: var(--space-3);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

.wlt-mode-group { display: flex; flex-direction: column; gap: 6px; }
.wlt-mode-group--inline { flex-direction: row; align-items: center; gap: 8px; }

.wlt-mode-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.wlt-mode-tabs { display: flex; flex-wrap: wrap; gap: 4px; }

.wlt-mode-tab {
  padding: 7px 14px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-bg);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.12s;
  font-family: var(--font-body);
}

.wlt-mode-tab:hover { border-color: var(--color-text-muted); }

.wlt-mode-tab--active {
  background: var(--color-brand);
  border-color: var(--color-brand);
  color: #fff;
}

.wlt-mode-input {
  width: 90px;
  padding: 5px 9px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

/* Prompt bar */
.wlt-prompt-bar {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: 10px;
  padding: var(--space-3);
  margin-bottom: var(--space-3);
}

.wlt-prompt-label {
  display: block;
  font-size: 11px;
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.wlt-prompt-hint {
  text-transform: none;
  letter-spacing: 0;
  font-weight: normal;
  color: var(--color-text-muted);
}

.wlt-prompt-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 7px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  background: var(--color-bg);
  resize: vertical;
  min-height: 50px;
}

.wlt-prompt-input:focus { outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(212,160,23,0.15); }

/* Main writing area */
.wlt-writing-area {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: var(--space-5);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* Stats bar (sticky on top) */
.wlt-stats-bar {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: 10px var(--space-4);
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border-light);
  position: sticky;
  top: 60px;
  z-index: 10;
  flex-wrap: wrap;
}

.wlt-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 60px;
}

.wlt-stat--actions { margin-left: auto; flex-direction: row; gap: 6px; align-items: center; }

.wlt-stat__label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  font-weight: var(--font-semibold);
}

.wlt-stat__value {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-brand);
  line-height: 1;
}

.wlt-stat__value--mono { font-family: var(--font-mono); }
.wlt-stat__value--warn { color: #d97706; }
.wlt-stat__value--danger { color: #dc2626; }
.wlt-stat__value--success { color: #16a34a; }

.wlt-stat__limit {
  font-size: 10px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}

/* Progress ring */
.wlt-progress-ring-wrap {
  position: relative;
  width: 42px;
  height: 42px;
}

.wlt-progress-ring {
  transform: rotate(-90deg);
}

.wlt-progress-ring__bg {
  fill: none;
  stroke: var(--color-bg);
  stroke-width: 4;
}

.wlt-progress-ring__fill {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.3s ease, stroke 0.2s;
}

.wlt-progress-ring__fill--ok { stroke: #16a34a; }
.wlt-progress-ring__fill--warn { stroke: #d97706; }
.wlt-progress-ring__fill--danger { stroke: #dc2626; }

.wlt-progress-pct {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--color-text);
}

/* Action buttons */
.wlt-action-btn {
  padding: 8px 14px;
  border: 1px solid var(--color-border);
  border-radius: 7px;
  background: var(--color-bg);
  font-size: 12px;
  font-weight: var(--font-semibold);
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--color-text);
  transition: all 0.12s;
  white-space: nowrap;
}

.wlt-action-btn:hover { background: var(--color-bg-alt); }

.wlt-action-btn--primary {
  background: var(--color-brand);
  border-color: var(--color-brand);
  color: #fff;
}

.wlt-action-btn--primary:hover { background: #0d4031; }

.wlt-action-btn--running {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}
.wlt-action-btn--running:hover { background: #b91c1c; }

/* Editor */
.wlt-editor-wrap {
  position: relative;
  background: var(--color-surface);
}

.wlt-editor {
  width: 100%;
  min-height: 480px;
  max-height: 70vh;
  padding: var(--space-5) var(--space-5) var(--space-4);
  border: none;
  outline: none;
  background: var(--color-surface);
  font-family: 'Crimson Pro', 'Times New Roman', serif;
  font-size: 18px;
  line-height: 1.7;
  color: var(--color-text);
  resize: vertical;
  letter-spacing: 0.01em;
}

.wlt-editor::placeholder {
  color: var(--color-text-muted);
  opacity: 0.6;
  font-style: italic;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
}

.wlt-editor:focus { background: #fefefe; }

/* Toolbar */
.wlt-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px var(--space-4);
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border-light);
  flex-wrap: wrap;
  gap: 8px;
}

.wlt-toolbar__left, .wlt-toolbar__right { display: flex; gap: 4px; flex-wrap: wrap; }

.wlt-toolbar-btn {
  padding: 5px 10px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 5px;
  font-size: 11px;
  font-weight: var(--font-medium);
  color: var(--color-text-secondary);
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.12s;
  white-space: nowrap;
}

.wlt-toolbar-btn:hover { background: var(--color-bg); color: var(--color-text); border-color: var(--color-text-muted); }
.wlt-toolbar-btn--danger:hover { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }

/* Feedback bar */
.wlt-feedback {
  padding: 10px var(--space-4);
  border-top: 1px solid var(--color-border-light);
  font-size: 12px;
  font-weight: var(--font-medium);
  display: flex;
  align-items: center;
  gap: 8px;
}

.wlt-feedback--warn { background: #fffbeb; color: #92400e; border-top-color: #fde68a; }
.wlt-feedback--danger { background: #fef2f2; color: #b91c1c; border-top-color: #fca5a5; }
.wlt-feedback--success { background: #f0fdf4; color: #15803d; border-top-color: #bbf7d0; }
.wlt-feedback--info { background: #eff6ff; color: #1e40af; border-top-color: #bfdbfe; }

/* Mobile */
@media (max-width: 700px) {
  .wlt-stats-bar { gap: var(--space-2); padding: 8px var(--space-3); }
  .wlt-stat { min-width: 48px; }
  .wlt-stat__value { font-size: var(--text-base); }
  .wlt-stat--actions { width: 100%; justify-content: center; margin-left: 0; }
  .wlt-editor { padding: var(--space-3); font-size: 16px; min-height: 360px; }
  .wlt-mode-tab { font-size: 11px; padding: 6px 10px; }
  .wlt-toolbar { padding: 8px var(--space-3); }
  .wlt-toolbar-btn { padding: 4px 8px; font-size: 10px; }
}
