/* Mode Selection Tabs */
.content-mode-selection {
  margin-bottom: 1.5rem;
  background: var(--card-bg);
  border-radius: 12px;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
}

.mode-tabs {
  display: flex;
  gap: 0.25rem;
}

.mode-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.mode-tab:hover {
  background: var(--hover-bg);
  color: var(--text-color);
}

.mode-tab.active {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  color: white;
  box-shadow: 0 2px 8px rgb(74 144 226 / 30%);
}

.mode-icon {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

/* Text Input Container */
.text-input-container {
  background: var(--card-bg);
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
}

.text-input-container:hover {
  border-color: var(--primary-color);
  background: var(--hover-bg);
}

.text-input-container.has-content {
  border-color: var(--primary-color);
  border-style: solid;
  background: var(--card-bg);
}

.text-input-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.text-input-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
  cursor: pointer;
}

.text-icon {
  width: 20px;
  height: 20px;
  color: var(--primary-color);
  stroke-width: 2;
}

.text-input-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  font-size: 0.8rem;
}

.char-count {
  color: var(--text-color);
  font-weight: 500;
}

.text-limit {
  color: var(--text-muted);
}

/* Text Input Area */
.text-input {
  width: 100%;
  min-height: 200px;
  max-height: 400px;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text-color);
  font-family: "SF Mono", Monaco, Inconsolata, "Roboto Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  resize: vertical;
  transition: all 0.2s ease;
}

.text-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgb(74 144 226 / 10%);
}

.text-input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

/* Text Actions */
.text-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  justify-content: flex-end;
}

.btn-secondary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-color);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: var(--hover-bg);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-secondary .btn-icon {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

/* Character count color changes */
.char-count.warning {
  color: var(--warning-color, #f59e0b);
}

.char-count.danger {
  color: var(--danger-color, #ef4444);
}

/* Responsive Design */
@media (width <=768px) {
  .text-input-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .text-input-info {
    align-items: flex-start;
  }

  .text-actions {
    flex-direction: column;
  }

  .text-input {
    min-height: 150px;
    font-size: 16px;
  }

  .mode-tab {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
  }

  .mode-icon {
    width: 16px;
    height: 16px;
  }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
  .text-input-container {
    background: var(--card-bg-dark, #1f2937);
    border-color: var(--border-color-dark, #374151);
  }

  .text-input {
    background: var(--input-bg-dark, #111827);
    border-color: var(--border-color-dark, #374151);
    color: var(--text-color-dark, #f9fafb);
  }
}