/* QuickCompare AI - File & Folder Diff Styles */

.diff-main {
  padding-top: 18px;
}

.diff-mark {
  background: linear-gradient(135deg, #216ba5 0%, #174f7c 100%) !important;
  box-shadow: 0 4px 14px rgba(33, 107, 165, 0.25) !important;
}

.diff-badge {
  background: #edf3fa !important;
  color: #216ba5 !important;
  border-color: #b8d0e5 !important;
}

/* Mode Switcher Tabs */
.mode-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.mode-tab {
  padding: 10px 18px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mode-tab:hover {
  background: #f1f5f3;
  color: var(--ink);
}

.mode-tab.active {
  background: #216ba5;
  color: white;
  border-color: #216ba5;
  box-shadow: 0 2px 8px rgba(33, 107, 165, 0.25);
}

/* Input Panels Grid */
.inputs-grid {
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  gap: 14px;
  align-items: stretch;
  margin-bottom: 24px;
}

.input-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #f5f8f6;
  border-bottom: 1px solid var(--line);
}

.panel-label {
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
}

.file-stat {
  font-size: 11px;
  color: var(--light-muted);
}

textarea {
  width: 100%;
  height: 240px;
  padding: 14px 16px;
  border: none;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink);
  background: white;
  outline: none;
  tab-size: 2;
}

textarea:focus {
  background: #fafcfb;
}

.input-divider {
  display: flex;
  align-items: center;
  justify-content: center;
}

.swap-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: white;
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
  display: grid;
  place-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.15s ease;
}

.swap-btn:hover {
  background: #eaf4f0;
  color: var(--accent);
  border-color: #b8d2c2;
  transform: scale(1.08);
}

/* File Drop Zones */
.drop-zone {
  background: var(--surface);
  border: 2px dashed #c0d3cb;
  border-radius: 14px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 240px;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: #216ba5;
  background: #f4f8fc;
}

.drop-icon {
  font-size: 38px;
  margin-bottom: 10px;
}

.drop-content h4 {
  font-size: 15px;
  font-weight: 750;
  margin-bottom: 6px;
}

.drop-content p {
  font-size: 12.5px;
  color: var(--muted);
}

.drop-content p span {
  color: #216ba5;
  text-decoration: underline;
  font-weight: 650;
}

.file-input-hidden {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-selected {
  margin-top: 14px;
  padding: 10px 14px;
  background: #eaf4f0;
  border: 1px solid #b8d2c2;
  border-radius: 8px;
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}

.file-selected strong {
  font-size: 13px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.file-selected span {
  font-size: 11px;
  color: var(--muted);
}

/* Folder Compare */
.folder-pickers-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.folder-picker-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.folder-picker-box label {
  font-size: 13px;
  font-weight: 750;
}

.folder-picker-box input[type="file"] {
  font-size: 12.5px;
}

.folder-status {
  font-size: 11.5px;
  color: var(--muted);
}

.folder-files-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 24px;
}

.folder-files-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 12px;
}

.folder-files-header h4 {
  font-size: 15px;
  font-weight: 750;
}

.folder-legend {
  display: flex;
  gap: 8px;
}

.tag {
  font-size: 10.5px;
  font-weight: 750;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
}

.tag-modified { background: #fff2cc; color: #806000; }
.tag-added { background: #d9f2d9; color: #1e7e34; }
.tag-deleted { background: #fce4e4; color: #b33f36; }
.tag-identical { background: #e9ecef; color: #6c757d; }

.folder-files-list {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.folder-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 12.5px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.folder-file-item:last-child {
  border-bottom: none;
}

.folder-file-item:hover, .folder-file-item.active {
  background: #f4f8fc;
}

.file-item-path {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-weight: 550;
  color: var(--ink);
}

/* Diff Controls Toolbar */
.diff-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 14px;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.output-title {
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.4px;
}

.stats-pills {
  display: flex;
  gap: 8px;
}

.stat-pill {
  font-size: 11.5px;
  font-weight: 750;
  padding: 3px 9px;
  border-radius: 20px;
}

.stat-pill.additions {
  background: #d4f4dd;
  color: #146c36;
}

.stat-pill.deletions {
  background: #fbe0de;
  color: #a7281f;
}

.view-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.toggle-btn {
  padding: 7px 14px;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.12s ease;
}

.toggle-btn.active {
  background: #216ba5;
  color: white;
}

/* Diff Output Container */
.diff-output-container {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  min-height: 280px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.02);
}

.empty-diff-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
}

.empty-diff-state .empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #f1f5f3;
  color: var(--light-muted);
  display: grid;
  place-content: center;
  font-size: 26px;
  margin: 0 auto 14px;
}

/* Diff2Html overrides for clean aesthetics */
.d2h-wrapper {
  margin: 0;
  border: none;
}

.d2h-file-header {
  background: #f5f8f6;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}

.d2h-file-name {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.d2h-code-line, .d2h-code-side-line {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-size: 12px !important;
  line-height: 1.6 !important;
}

.d2h-ins {
  background-color: #e6f7ec !important;
  color: #12542a !important;
}

.d2h-del {
  background-color: #fde8e8 !important;
  color: #8c1d18 !important;
}

.d2h-code-line ins, .d2h-code-side-line ins {
  background-color: #bbf0cb !important;
  border-radius: 2px;
}

.d2h-code-line del, .d2h-code-side-line del {
  background-color: #f7bebe !important;
  border-radius: 2px;
}

@media (max-width: 820px) {
  .inputs-grid {
    grid-template-columns: 1fr;
  }
  .input-divider {
    padding: 6px 0;
  }
  .folder-pickers-row {
    grid-template-columns: 1fr;
  }
}

