/*
 * RECATOOLS — Duplicate Line Remover
 * Tool-specific styles only — global styles in /assets/css/tool-page.css
 */

/* ── Textarea (shared: input + output) ──────────────────── */
.dlr-textarea {
  width: 100%;
  min-height: 180px;
  padding: 14px 16px;
  border: 1.5px solid var(--border, #E2E4E8);
  border-radius: 8px;
  background: #fff;
  color: var(--text-primary, #0D1B2A);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.9375rem;
  line-height: 1.65;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.18s;
}

.dlr-textarea:focus {
  outline: none;
  border-color: #E8472F;
  box-shadow: 0 0 0 3px rgba(232, 98, 42, 0.12);
}

.dlr-textarea--output {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.875rem;
  background: #fafaf9;
  color: #3a3835;
  cursor: default;
}

/* ── Input meta (char + line count) ─────────────────────── */
.dlr-input-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  margin-bottom: 14px;
}

.dlr-input-stats {
  font-size: 0.8125rem;
  color: var(--text-secondary, #64748B);
  font-variant-numeric: tabular-nums;
}

.dlr-clear-input {
  background: none;
  border: none;
  padding: 4px 8px;
  font-size: 0.8125rem;
  color: var(--text-secondary, #64748B);
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.dlr-clear-input:hover {
  color: #E8472F;
  background: rgba(232, 98, 42, 0.08);
}

/* ── Options row ─────────────────────────────────────────── */
.dlr-options-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 14px 16px;
  background: #FFFFFF;
  border: 1.5px solid var(--border, #E2E4E8);
  border-radius: 8px;
  margin-bottom: 16px;
}

.dlr-option {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
}

.dlr-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #E8472F;
  cursor: pointer;
  flex-shrink: 0;
}

.dlr-option span {
  font-size: 0.875rem;
  color: var(--text-primary, #0D1B2A);
  font-weight: 500;
  white-space: nowrap;
}

.dlr-option input[type="checkbox"]:disabled + span {
  color: #b0aea9;
}

/* ── Auto-process toggle ─────────────────────────────────── */
.dlr-auto-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.dlr-auto-label {
  font-size: 0.875rem;
  color: var(--text-secondary, #64748B);
  font-weight: 500;
}

.dlr-auto-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 44px;
  height: 24px;
  background: #d5d3cf;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
  flex-shrink: 0;
}

.dlr-auto-toggle::after {
  content: '';
  position: absolute;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.dlr-auto-toggle.active {
  background: #E8472F;
}

.dlr-auto-toggle.active::after {
  transform: translateX(20px);
}

.dlr-auto-toggle:focus-visible {
  outline: 2px solid #E8472F;
  outline-offset: 2px;
}

/* ── Process button ──────────────────────────────────────── */
.dlr-process-btn {
  width: 100%;
  padding: 14px 24px;
  background: #E8472F;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, transform 0.12s, box-shadow 0.18s;
  margin-bottom: 20px;
}

.dlr-process-btn:hover:not(:disabled) {
  background: #d0541f;
  box-shadow: 0 4px 14px rgba(232, 98, 42, 0.3);
}

.dlr-process-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.dlr-process-btn:disabled {
  background: #c8c5bf;
  cursor: not-allowed;
  box-shadow: none;
}

/* ── Stats bar ───────────────────────────────────────────── */
.dlr-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border, #E2E4E8);
  border: 1.5px solid var(--border, #E2E4E8);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
}

.dlr-stats-bar[hidden] {
  display: none;
}

.dlr-stat-cell {
  background: #fff;
  padding: 12px 10px;
  text-align: center;
}

.dlr-stat-value {
  display: block;
  font-size: 1.375rem;
  font-weight: 700;
  color: #E8472F;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.dlr-stat-label {
  display: block;
  font-size: 0.6875rem;
  color: var(--text-secondary, #64748B);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 3px;
  font-weight: 600;
}

/* ── Output section ──────────────────────────────────────── */
.dlr-output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.dlr-output-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary, #0D1B2A);
}

.dlr-output-actions {
  display: flex;
  gap: 8px;
}

.dlr-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border: 1.5px solid var(--border, #E2E4E8);
  border-radius: 6px;
  background: #fff;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary, #0D1B2A);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  white-space: nowrap;
}

.dlr-action-btn:hover:not(:disabled) {
  border-color: #E8472F;
  color: #E8472F;
  background: rgba(232, 98, 42, 0.05);
}

.dlr-action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ── Section divider between input/output ────────────────── */
.dlr-divider {
  border: none;
  border-top: 1.5px solid var(--border, #E2E4E8);
  margin: 22px 0;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .dlr-stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .dlr-options-row {
    gap: 10px 14px;
  }

  .dlr-output-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 400px) {
  .dlr-stats-bar {
    grid-template-columns: 1fr 1fr;
  }

  .dlr-stat-value {
    font-size: 1.125rem;
  }
}

/* cache-buster: 2026-05-24T05:06:05Z */
