/* Tailwind handles most layout; this file provides small, app-specific helpers. */

:root {
  color-scheme: light dark;
}

html.dark {
  color-scheme: dark;
}

.mode-button {
  min-width: 5.5rem;
  text-align: center;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.mode-button.active {
  background-color: rgb(14 165 233 / 0.12);
  color: rgb(8 145 178);
}

html.dark .mode-button.active {
  background-color: rgb(14 165 233 / 0.2);
  color: rgb(125 211 252);
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.625rem;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}

.action-button:focus-visible {
  outline: none;
  ring: none;
  transform: translateY(-1px);
}

.action-button:active {
  transform: translateY(1px);
}

#drop-zone.drag-over {
  border-color: rgb(14 165 233);
  color: rgb(14 165 233);
  background-color: rgba(14, 165, 233, 0.08);
}

html.dark #drop-zone.drag-over {
  border-color: rgb(125 211 252);
  color: rgb(125 211 252);
  background-color: rgba(125, 211, 252, 0.08);
}

#toast-container .toast {
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 20px 35px rgba(15, 23, 42, 0.32);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#toast-container .toast.visible {
  opacity: 1;
  transform: translateY(0);
}

#toast-container .toast a {
  text-decoration: underline;
}

#toast-container .toast.success {
  background: linear-gradient(135deg, #10b981, #059669);
}

#toast-container .toast.error {
  background: linear-gradient(135deg, #f97316, #ea580c);
}

html.dark #toast-container .toast {
  box-shadow: 0 20px 35px rgba(15, 23, 42, 0.6);
}

textarea {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.card {
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.8);
  padding: 1.25rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

html.dark .card {
  border-color: rgba(71, 85, 105, 0.7);
  background: rgba(15, 23, 42, 0.7);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.45);
}

.card.gap-4 {
  gap: 1rem;
}

.option-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(241, 245, 249, 0.8);
  margin: 0;
}

html.dark .option-pill {
  border-color: rgba(71, 85, 105, 0.7);
  background: rgba(30, 41, 59, 0.8);
}

.pill-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: inherit;
  cursor: pointer;
}

.option-pill input[type="radio"],
.option-pill input[type="checkbox"],
.pill-label input {
  accent-color: #0284c7;
}

.dashed-card {
  border-style: dashed;
  border-width: 2px;
  border-color: rgba(148, 163, 184, 0.5);
  background: rgba(248, 250, 252, 0.6);
}

html.dark .dashed-card {
  border-color: rgba(94, 109, 133, 0.7);
  background: rgba(30, 41, 59, 0.6);
}

.insight-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem;
  border-radius: 9999px;
  background: rgba(226, 232, 240, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

html.dark .insight-tabs {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(71, 85, 105, 0.6);
}

.insight-tab {
  padding: 0.35rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  cursor: pointer;
  color: #334155;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.insight-tab:hover {
  background-color: rgba(14, 165, 233, 0.12);
  color: #0f172a;
}

.insight-tab.active {
  background: white;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  color: #0284c7;
}

html.dark .insight-tab {
  color: #e2e8f0;
}

html.dark .insight-tab:hover {
  background: rgba(14, 165, 233, 0.15);
  color: #bae6fd;
}

html.dark .insight-tab.active {
  background: rgba(14, 165, 233, 0.2);
  color: #38bdf8;
  box-shadow: 0 10px 25px rgba(8, 145, 178, 0.25);
}

.insight-panel {
  display: none;
}

.insight-panel.active {
  display: block;
}

#diff-view {
  min-height: 6rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.diff-equal {
  color: inherit;
}

.diff-added {
  background-color: rgba(16, 185, 129, 0.2);
  color: #047857;
}

.diff-removed {
  background-color: rgba(248, 113, 113, 0.2);
  color: #b91c1c;
  text-decoration: line-through;
}

html.dark .diff-added {
  background-color: rgba(16, 185, 129, 0.18);
  color: #34d399;
}

html.dark .diff-removed {
  background-color: rgba(248, 113, 113, 0.16);
  color: #f87171;
}

kbd {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  font-size: 0.65rem;
  font-weight: 600;
  background-color: rgba(148, 163, 184, 0.2);
  border-radius: 0.35rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: inherit;
}

html.dark kbd {
  background-color: rgba(71, 85, 105, 0.3);
  border-color: rgba(71, 85, 105, 0.6);
}

.history-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 0.5rem;
}

html.dark .history-entry {
  border-color: rgba(71, 85, 105, 0.7);
}

.history-entry button {
  font-size: 0.65rem;
  padding: 0.25rem 0.5rem;
}
