/**
 * DEPRECATED - This file is no longer in use.
 * 
 * This CSS has been refactored into a modular structure.
 * Please use the following files instead:
 * 
 * - index.css      - Main entry point importing all other CSS files
 * - variables.css  - CSS variables and design tokens
 * - layout.css     - Global layout styles
 * - tabs.css       - Tab navigation system
 * - cards.css      - Card components
 * - buttons.css    - Button styles
 * - forms.css      - Form elements
 * - selectfiles.css - Select Files tab styles
 * - instructions.css - Instructions tab styles
 * - generate.css   - Generate Prompt tab styles
 * - merge.css      - Merge tab styles
 * - utilities.css  - Utility classes
 * 
 * This file is kept for reference only and will be removed in a future update.
 */

:root {
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --border-radius-sm: 6px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
  --transition-speed: 0.2s;
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --accent-color: #3b82f6;
  --accent-hover: #2563eb;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--vscode-font-family, system-ui, -apple-system, 'Segoe UI', Roboto);
  color: var(--vscode-foreground);
  background-color: var(--vscode-editor-background);
  line-height: 1.6;
  padding: var(--spacing-md);
  max-width: 1000px;
  margin: 0 auto;
  min-height: 100vh;
}

.app-container {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  min-height: 100vh;
}

.header {
  text-align: center;
  padding: var(--spacing-lg) var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.header-title {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-lg);
  background: var(--accent-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--spacing-sm);
}

h1 {
  font-size: 28px;
  font-weight: 700;
  color: white;
  letter-spacing: -0.5px;
  margin: 0;
}

.logo-icon {
  width: 32px;
  height: 32px;
  color: white;
}

.company {
  font-size: 15px;
  font-weight: 500;
  opacity: 0.9;
  color: white;
}

.company-link {
  color: white;
  text-decoration: none;
  position: relative;
  transition: opacity var(--transition-speed) ease;
}

.company-link:hover {
  opacity: 0.8;
}

.subtitle {
  font-size: 14px;
  color: var(--vscode-descriptionForeground);
  margin-top: var(--spacing-xs);
}

/* Tabs Styles */
.tabs {
  width: 100%;
  margin-bottom: var(--spacing-lg);
  padding: 0;
}

.tabs-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-lg);
  background: var(--vscode-tab-inactiveBackground);
  padding: var(--spacing-xs);
  border-radius: var(--border-radius-md);
}

.tab-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  background: none;
  border: none;
  color: var(--vscode-tab-inactiveForeground);
  font-size: 14px;
  cursor: pointer;
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-speed) ease;
}

.tab-trigger:hover {
  background: var(--vscode-tab-hoverBackground);
}

.tab-trigger.active {
  background: var(--vscode-tab-activeBackground);
  color: var(--vscode-tab-activeForeground);
  border-radius: 6px;
}

.tab-trigger svg {
  width: 16px;
  height: 16px;
}

.tab-trigger[data-tab="add-new"] {
  min-width: 32px;
  padding: 6px;
}

.tab-trigger[data-tab="add-new"] svg {
  width: 14px;
  height: 14px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Card Styles */
.card {
  background: var(--vscode-editor-background);
  border: 1px solid var(--vscode-panel-border);
  border-radius: var(--border-radius-md);
  margin-bottom: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.card-content {
  padding: 0 var(--spacing-md) var(--spacing-lg);
}

#instructions-tab .card-content {
  padding-top: 0;
}

.card-header {
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--vscode-panel-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--vscode-foreground);
}

.editor-container {
  display: flex;
  flex-direction: column;
  border: none;
  border-radius: 0;
  background-color: transparent;
  overflow: visible;
  margin-top: 0;
  width: 100%;
  position: relative;
  padding-left: 0;
  padding-right: 0;
}

.editor-toolbar {
  display: none;
}

.editor-toolbar-text {
  font-size: 12px;
  color: var(--vscode-descriptionForeground);
  margin-right: auto;
}

.search-container {
  position: relative;
  width: 100%;
  margin-bottom: var(--spacing-md);
  transition: all var(--transition-speed) ease;
}

.search-container.active-filter {
  box-shadow: 0 0 0 2px var(--accent-color);
  border-radius: var(--border-radius-md);
}

.search-container input {
  width: 100%;
  padding: 12px 40px;
  background-color: var(--vscode-input-background);
  color: var(--vscode-input-foreground);
  border: 1px solid var(--vscode-input-border);
  border-radius: var(--border-radius-md);
  font-size: 14px;
  transition: all var(--transition-speed) ease;
  height: 40px;
  box-shadow: var(--shadow-sm);
}

.search-container input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: var(--shadow-md);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--vscode-input-placeholderForeground);
  pointer-events: none;
}

.clear-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  cursor: pointer;
  color: var(--vscode-input-placeholderForeground);
  display: none;
  opacity: 0.7;
  transition: opacity var(--transition-speed) ease;
  padding: 0;
}

.clear-icon:hover {
  opacity: 1;
  color: var(--vscode-foreground);
}

.toggle-icon {
  width: 16px;
  height: 16px;
  color: var(--vscode-input-placeholderForeground);
  transition: transform var(--transition-speed) ease;
}

.configuration-section.collapsed .toggle-icon {
  transform: rotate(0deg);
}

.actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.actions-section {
  background: var(--vscode-editor-background);
  border-radius: var(--border-radius-md);
  border: 1px solid var(--vscode-panel-border);
  overflow: hidden;
  margin-bottom: var(--spacing-xl);
}

.section-title {
  padding: var(--spacing-md);
  border-bottom: none;
  font-size: 16px;
  font-weight: 600;
  color: var(--vscode-foreground);
  text-transform: none;
  letter-spacing: normal;
}

.action-groups {
  padding: var(--spacing-md);
}

.action-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  height: 32px;
  font-size: 13px;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--vscode-button-secondaryBackground);
  color: var(--vscode-button-secondaryForeground);
  border: 1px solid var(--vscode-button-border, transparent);
}

.button svg {
  width: 14px;
  height: 14px;
}

.button.primary {
  background: var(--vscode-button-background);
  color: var(--vscode-button-foreground);
}

.button:hover {
  background: var(--vscode-button-hoverBackground);
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.selected-files-container {
  background: var(--vscode-editor-background);
  border: 1px solid var(--vscode-panel-border);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  margin-bottom: var(--spacing-xl);
}

.directory-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-md);
  cursor: pointer;
  transition: background-color var(--transition-speed) ease;
  border-bottom: none;
  background: var(--vscode-editor-background);
}

.directory-header:hover {
  background: var(--vscode-list-hoverBackground);
}

.directory-name {
  font-weight: 500;
  color: var(--accent-color);
}

.directory-stats {
  font-size: 0.9em;
  color: var(--vscode-descriptionForeground);
}

.directory-files {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  padding: 8px;
  margin-top: 0;
  transition: opacity 0.2s ease-in-out, max-height 0.2s ease-in-out;
  opacity: 1;
  max-height: 5000px; /* Large enough to contain content */
  overflow: hidden;
}

.directory-section.collapsed .directory-files {
  opacity: 0;
  max-height: 0;
}

.selected-file-item {
  background-color: var(--vscode-editor-background);
  border: 1px solid rgba(128, 128, 128, 0.2);
  border-radius: 4px;
  padding: 8px;
  transition: all 0.1s ease;
  min-width: 0;
  max-width: 100%;
}

.selected-file-item:hover {
  background-color: var(--vscode-list-hoverBackground);
  border-color: var(--accent-color);
}

.file-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.file-header {
  display: flex;
  align-items: center;
  gap: 2px;
  width: 100%;
  min-width: 0;
  justify-content: space-between;
}

.file-name-container {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.file-name {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  max-width: 100%;
}

.file-info .token-count {
  font-size: 11px;
  color: var(--vscode-descriptionForeground);
}

.file-actions {
  display: none;
  gap: 0;
  margin-left: auto;
}

.selected-file-item:hover .file-actions {
  display: flex;
}

.action-button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--vscode-foreground);
  opacity: 0.7;
  display: flex;
  align-items: center;
}

.action-button:hover {
  opacity: 1;
}

.action-button svg {
  width: 14px;
  height: 14px;
}

.directory-remove-button {
  display: inline-flex;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--vscode-foreground);
  opacity: 0.7;
  transition: opacity 0.1s ease;
  margin-left: 8px;
}

.directory-remove-button:hover {
  opacity: 1;
}

.directory-remove-button svg {
  width: 16px;
  height: 16px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.file-icon {
  width: 16px;
  height: 16px;
  margin-right: 6px;
}

.token-percentage {
  opacity: 0.7;
}

.uncheck-button {
  visibility: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  background-color: var(--vscode-button-secondaryBackground);
  color: var(--vscode-button-secondaryForeground);
  border: none;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  margin-left: 4px;
  min-width: 24px;
  min-height: 24px;
}

.selected-file-item:hover .uncheck-button {
  visibility: visible;
}

.uncheck-button:hover {
  background-color: var(--vscode-button-secondaryHoverBackground);
}

.uncheck-button svg {
  width: 14px;
  height: 14px;
  display: block;
}

.selected-file-path {
  flex-grow: 1;
  font-weight: 500;
  margin-right: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 4px;
}

.selected-file-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.configuration-section {
  background: var(--vscode-editor-background);
  border: 1px solid var(--vscode-panel-border);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  margin-bottom: var(--spacing-xl);
}

.configuration-content {
  padding: var(--spacing-md);
}

.section-header {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--spacing-md);
  background: var(--vscode-editor-background);
  border-bottom: none;
  cursor: pointer;
  transition: background-color var(--transition-speed) ease;
}

.section-header:hover {
  background: var(--vscode-list-hoverBackground);
}

.section-header .toggle-icon {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-speed) ease;
  color: var(--vscode-input-placeholderForeground);
  flex-shrink: 0;
}

.section-header:hover .toggle-icon {
  color: var(--vscode-foreground);
}

.configuration-section.collapsed {
  margin-bottom: var(--spacing-xl);
  border-radius: var(--border-radius-sm);
}

.configuration-section.collapsed .section-header {
  border-bottom: none;
}

.configuration-section .section-title {
  font-size: 14px;
  text-transform: none;
  letter-spacing: normal;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) 0;
  background: var(--vscode-editor-background);
  margin-bottom: var(--spacing-lg);
}

.custom-checkbox {
  width: 20px;
  height: 20px;
  border-radius: var(--border-radius-sm);
  border: 2px solid var(--vscode-input-placeholderForeground);
  background: var(--vscode-editor-background);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-speed) ease;
}

.custom-checkbox:hover {
  border-color: var(--accent-color);
}

.custom-checkbox.checked {
  background: var(--accent-color);
  border-color: var(--accent-color);
}

.custom-checkbox svg {
  width: 14px;
  height: 14px;
  color: white;
  opacity: 0;
  transition: opacity var(--transition-speed) ease;
}

.custom-checkbox.checked svg {
  opacity: 1;
}

.ignore-textarea {
  width: 100%;
  min-height: 250px;
  padding: var(--spacing-md);
  background: var(--vscode-input-background);
  color: var(--vscode-input-foreground);
  border: 1px solid var(--vscode-input-border);
  border-radius: var(--border-radius-md);
  font-family: var(--vscode-editor-font-family, monospace);
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
  margin-bottom: var(--spacing-md);
}

.ignore-textarea:focus {
  outline: none;
  border-color: var(--accent-color);
}

.footer {
  border-top: 1px solid var(--vscode-panel-border);
  padding: var(--spacing-md);
  text-align: center;
  font-size: 12px;
  color: var(--vscode-descriptionForeground);
  margin-top: auto;
}

.footer a {
  color: var(--accent-color);
  text-decoration: none;
  transition: opacity var(--transition-speed) ease;
}

.footer a:hover {
  text-decoration: underline;
  opacity: 0.8;
}

@media (max-width: 1200px) {
  .directory-files {
      grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .directory-files {
      grid-template-columns: 1fr;
  }
}

.directory-section {
  margin-bottom: 10px;
  background: var(--vscode-editor-background);
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(128, 128, 128, 0.2);
  overflow: hidden;
}

.directory-header {
  cursor: pointer;
  padding: 8px 12px;
  background: var(--vscode-editor-background);
  border-bottom: 1px solid rgba(128, 128, 128, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.directory-header:hover .directory-name {
  margin-right: 24px;
}

.directory-name {
  font-weight: 500;
  color: var(--accent-color);
}

.directory-stats {
  font-size: 0.9em;
  color: var(--vscode-descriptionForeground);
}

.collapse-icon {
  width: 16px;
  min-width: 16px;
  height: 16px;
  color: var(--vscode-descriptionForeground);
  opacity: 0.7;
  margin-right: 6px;
  transform: rotate(0deg);
  transition: transform 0.2s ease-in-out;
}

.directory-section.collapsed .collapse-icon {
  transform: rotate(-90deg);
}

.directory-section.collapsed .directory-header {
  margin-bottom: 0;
}

.selected-file-item {
  background: var(--vscode-sideBar-background);
  border: 1px solid rgba(128, 128, 128, 0.2);
  border-radius: 4px;
  padding: 8px;
  transition: all 0.1s ease;
}

.selected-file-item:hover {
  background: var(--vscode-list-hoverBackground);
  border-color: var(--accent-color);
}

.file-icon {
  width: 16px;
  height: 16px;
  color: var(--vscode-foreground);
  opacity: 0.8;
  flex-shrink: 0;
}

.file-actions {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: 2px;
  opacity: 0;
  transition: opacity 0.1s ease;
}

.selected-file-item:hover .file-actions {
  opacity: 1;
}

.files-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
  padding-right: var(--spacing-md);
  padding-top: 8px;
}

.total-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: var(--spacing-md);
  font-size: 14px;
}

.stat-label {
  color: var(--vscode-foreground);
  font-weight: 500;
}

.stat-value {
  color: var(--accent-color);
  font-weight: 600;
}

.stat-spacer {
  width: 16px;
}

.view-mode-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.view-mode-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: var(--vscode-editor-background);
  border: 1px solid var(--vscode-panel-border);
  border-radius: var(--border-radius-sm);
  color: var(--vscode-foreground);
  cursor: pointer;
}

.view-mode-button.active {
  background-color: var(--accent-color);
  color: var(--vscode-button-foreground);
  border-color: var(--accent-color);
}

.view-mode-button:not(.active):hover {
  background-color: var(--vscode-list-hoverBackground);
}

.view-mode-button.active:hover {
  cursor: default;
}

.view-mode-button svg {
  width: 16px;
  height: 16px;
}

.generate-spinner.hidden {
  display: none;
}

.hidden {
  display: none !important;
}

.spinner-icon {
  width: 16px;
  height: 16px;
  animation: spin 1.5s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.context-menu {
  position: fixed;
  display: none;
  background: var(--vscode-dropdown-background);
  border: 1px solid var(--vscode-dropdown-border);
  border-radius: var(--border-radius-md);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  min-width: 160px;
}

.context-menu.visible {
  display: block;
}

.context-menu ul {
  list-style: none;
  margin: 0;
  padding: 4px 0;
}

.context-menu-item {
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.context-menu-item:hover {
  background: var(--vscode-list-hoverBackground);
}

.context-menu-item.divider {
  height: 1px;
  background: var(--vscode-dropdown-border);
  margin: 4px 0;
  padding: 0;
}

.instruction-header {
  padding: var(--spacing-lg) var(--spacing-lg) var(--spacing-md);
  padding-left: var(--spacing-lg);
  border-bottom: none;
}

.instruction-title {
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 var(--spacing-sm) 0;
  padding-left: var(--spacing-md);
}

.instruction-subtitle {
  font-size: 12px;
  color: var(--vscode-descriptionForeground);
  margin: 0 0 var(--spacing-lg) 0;
  line-height: 1.5;
  padding-left: var(--spacing-md);
  padding-right: var(--spacing-lg);
  max-width: 95%;
}

#instructions-tab {
  padding-top: var(--spacing-md);
}

.prompt-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: var(--spacing-md) 0;
}

.token-count-display {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 4px 8px;
  background-color: var(--vscode-editor-background);
  border: 1px solid var(--vscode-panel-border);
  border-radius: 4px;
}

.token-count-display svg {
  width: 16px;
  height: 16px;
}

.token-count-display strong {
  font-weight: 600;
  color: var(--accent-color);
}

.generate-spinner {
  display: flex;
  align-items: center;
  gap: 8px;
}

.include-options {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--spacing-lg);
  margin: var(--spacing-md) 0;
  padding: 0;
}

.include-options .checkbox-container {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: 0;
  margin: 0;
  cursor: pointer;
}

.custom-checkbox {
  width: 18px;
  height: 18px;
  border-radius: var(--border-radius-sm);
  border: 2px solid var(--vscode-panel-border);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--vscode-editor-background);
  transition: all 0.2s ease;
}

.custom-checkbox.checked {
  background: var(--accent-color);
  border-color: var(--accent-color);
}

.custom-checkbox svg {
  width: 14px;
  height: 14px;
  color: white;
  opacity: 0;
}

.custom-checkbox.checked svg {
  opacity: 1;
}

.instruction-textarea {
  width: 100%;
  min-height: 300px;
  padding: var(--spacing-md);
  background-color: var(--vscode-input-background);
  color: var(--vscode-editor-foreground);
  border: 1px solid var(--vscode-input-border);
  border-radius: var(--border-radius-sm);
  font-family: var(--vscode-editor-font-family);
  font-size: 14px;
  resize: vertical;
  line-height: 1.6;
  margin: 0;
  overflow: auto;
  box-shadow: none;
  transition: background-color 0.2s;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.instruction-textarea:empty:before {
  content: attr(data-placeholder);
  color: var(--vscode-input-placeholderForeground);
  pointer-events: none;
}

/* Also show placeholder when only a BR tag exists */
.instruction-textarea:not(:empty):only-child(br):before {
  content: attr(data-placeholder);
  color: var(--vscode-input-placeholderForeground);
  pointer-events: none;
}

.instruction-textarea:focus {
  outline: none;
  border: none;
  box-shadow: none;
}

.prompt-picker {
  position: absolute;
  top: 100%;
  left: var(--spacing-lg);
  background-color: var(--vscode-dropdown-background);
  border: 1px solid var(--vscode-dropdown-border);
  border-radius: var(--border-radius-md);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  width: 300px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
}

.prompt-list {
  display: flex;
  flex-direction: column;
}

.prompt-item {
  padding: var(--spacing-sm) var(--spacing-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.prompt-item:hover {
  background-color: var(--vscode-list-hoverBackground);
}

.prompt-item.selected {
  background-color: var(--vscode-list-activeSelectionBackground);
  color: var(--vscode-list-activeSelectionForeground);
}

.prompt-name {
  font-weight: 500;
  margin-bottom: var(--spacing-xs);
}

.prompt-description {
  font-size: 12px;
  opacity: 0.8;
}

.template-tag {
  display: inline-flex;
  align-items: center;
  background-color: rgba(59, 130, 246, 0.15);
  color: var(--accent-color);
  border-radius: var(--border-radius-sm);
  padding: 2px 6px;
  margin: 0 2px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid rgba(59, 130, 246, 0.3);
  transition: all var(--transition-speed) ease;
}

.template-tag:hover {
  background-color: rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.5);
}

.template-tag:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4);
}

/* Merge Tab Styles */
.merge-content {
  margin-top: var(--spacing-md);
}

.merge-textarea {
  width: 100%;
  min-height: 400px;
  padding: var(--spacing-md);
  background: var(--vscode-input-background);
  color: var(--vscode-input-foreground);
  border: 1px solid var(--vscode-input-border);
  border-radius: var(--border-radius-sm);
  font-family: var(--vscode-editor-font-family, monospace);
  font-size: var(--vscode-editor-font-size, 14px);
  line-height: 1.5;
  resize: vertical;
}

.merge-textarea:focus {
  outline: none;
  border-color: var(--vscode-focusBorder);
}

/* File Changes Container */
.file-changes-container {
  width: 100%;
  max-height: 70vh;
  overflow-y: auto;
  margin-bottom: var(--spacing-md);
  border: 1px solid var(--vscode-input-border);
  border-radius: var(--border-radius-sm);
  background: var(--vscode-input-background);
}

.file-changes-header {
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--vscode-editor-background);
  border-bottom: 1px solid var(--vscode-input-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.file-changes-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.file-changes-header .button-group {
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
}

.reset-changes-btn {
  font-size: 12px;
  padding: 3px 8px;
  background: transparent;
  border: none;
  color: var(--vscode-textLink-foreground);
  cursor: pointer;
  text-decoration: underline;
}

.reset-changes-btn:hover {
  color: var(--vscode-textLink-activeForeground);
}

.file-change-item {
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--vscode-input-border);
  background-color: var(--vscode-editor-background);
}

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

.file-change-item .file-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin-top: 8px !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.file-change-item .file-actions button {
  display: inline-block !important;
  padding: 8px 16px !important;
  background-color: #333 !important;
  color: white !important;
  border: 1px solid #555 !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  min-width: 120px !important;
  text-align: center !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.file-change-item .file-actions .see-old-content-btn {
  background-color: #444 !important;
}

.file-change-item .file-actions .see-new-content-btn {
  background-color: #555 !important; 
}

.file-change-item .file-actions .replace-code-btn {
  background-color: #0e639c !important;
}

.file-change-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-sm);
}

.file-path {
  font-weight: 500;
  font-family: var(--vscode-editor-font-family, monospace);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70%;
}

.file-operation {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  color: white;
  margin-left: 8px;
  opacity: 0.85;
}

.file-operation.create {
  background-color: #73a16c;
}

.file-operation.update {
  background-color: #5b87b0;
}

.file-operation.delete {
  background-color: #a06b6b;
}

.file-summary {
  margin-bottom: var(--spacing-md);
  font-size: 14px;
  line-height: 1.5;
  opacity: 0.8;
}

.file-actions {
  display: flex;
  gap: var(--spacing-sm);
}

.file-actions button {
  padding: 6px 12px;
  font-size: 12px;
  background: var(--vscode-button-secondary-background);
  color: var(--vscode-button-secondary-foreground);
  border: 1px solid var(--vscode-button-secondaryBorder);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
}

.file-actions button:hover {
  background: var(--vscode-button-secondary-hoverBackground);
}

.file-actions .replace-code-btn {
  background: var(--vscode-button-background);
  color: var(--vscode-button-foreground);
  border: 1px solid var(--vscode-button-border);
}

.file-actions .replace-code-btn:hover {
  background: var(--vscode-button-hoverBackground);
}

.file-actions .replace-code-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.file-actions .replace-code-btn.success {
  background-color: #2d7d3a !important;
  color: #FFFFFF !important;
  border-color: #256b31 !important;
}

.file-actions .replace-code-btn.error {
  background-color: #F44336 !important;
}

.error-message {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  color: var(--vscode-errorForeground);
}

.error-message svg {
  width: 24px;
  height: 24px;
  stroke: var(--vscode-errorForeground);
}

.error-message p {
  margin: 0;
}

#merge-tab .prompt-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: var(--spacing-md);
}

/* Reset button for file changes */
.reset-changes-btn {
  margin-left: auto;
  font-size: 12px;
  padding: 3px 8px;
  background: transparent;
  border: none;
  color: var(--vscode-textLink-foreground);
  cursor: pointer;
  text-decoration: underline;
}

.reset-changes-btn:hover {
  color: var(--vscode-textLink-activeForeground);
}

/* File Changes UI Button Styles */
.file-change-item .file-actions {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
  margin-top: var(--spacing-sm);
}

.file-change-item .file-actions button {
  padding: 6px 12px;
  font-size: 12px;
  background: var(--vscode-button-secondary-background);
  color: var(--vscode-button-secondary-foreground);
  border: 1px solid var(--vscode-button-secondaryBorder);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  flex: 1;
  min-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-change-item .file-actions button:hover {
  background: var(--vscode-button-secondary-hoverBackground);
}

.file-change-item .file-actions .see-old-content-btn {
  background: var(--vscode-editorInlayHint-background, rgba(100, 100, 100, 0.1));
  color: var(--vscode-editorInlayHint-foreground, var(--vscode-editor-foreground));
}

.file-change-item .file-actions .see-new-content-btn {
  background: var(--vscode-editorInlayHint-parameterBackground, rgba(100, 100, 100, 0.1));
  color: var(--vscode-editorInlayHint-parameterForeground, var(--vscode-editor-foreground));
}

/* Global custom button rules with high specificity */
button.custom-button {
  display: inline-block !important;
  padding: 6px 12px !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  font-size: 12px !important;
  text-align: center !important;
  white-space: nowrap !important;
  min-width: 120px !important;
}

button.show-diff-btn.custom-button {
  background-color: #333333 !important;
  color: #FFFFFF !important;
  border: 1px solid #555555 !important;
}

button.replace-code-btn.custom-button {
  background-color: #0e639c !important;
  color: #FFFFFF !important;
  border: 1px solid transparent !important;
}

button.replace-code-btn.custom-button.success {
  background-color: #2d7d3a !important;
  color: #FFFFFF !important;
  border-color: #256b31 !important;
}

button.show-diff-btn.custom-button:disabled {
  background-color: #2d2d2d !important;
  color: #808080 !important;
  border-color: #404040 !important;
  opacity: 1 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

.show-diff-btn {
  background-color: #333 !important;
  color: white !important;
  border: 1px solid #555 !important;
}

.show-diff-btn:hover {
  background-color: #444 !important;
}

.apply-all-btn {
  background-color: #0e639c !important;
  color: white !important;
  border: 1px solid transparent !important;
  font-weight: bold !important;
  margin-right: 8px !important;
}

.apply-all-btn:hover {
  background-color: #1177bb !important;
}

.apply-all-btn:disabled {
  opacity: 0.7 !important;
  cursor: not-allowed !important;
}

.custom-button {
  padding: 6px 12px !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  display: inline-block !important;
  min-width: 0 !important; 
  width: auto !important;
}

.file-actions {
  display: flex !important;
  gap: 8px !important;
  margin-top: 10px !important;
  justify-content: flex-end !important;
}

/* Explicit SVG sizing constraints for packaging */
svg {
  max-width: 100%;
  max-height: 100%;
}

.button svg, 
.tab-trigger svg,
.custom-checkbox svg,
.file-icon,
.logo-icon,
.search-icon,
.clear-icon,
.toggle-icon,
.spinner-icon,
.collapse-icon,
.view-mode-button svg,
.uncheck-button svg,
.selected-file-icon {
  width: 16px !important; 
  height: 16px !important;
  flex-shrink: 0;
  flex-grow: 0;
}

.logo-icon {
  width: 32px !important;
  height: 32px !important;
}

/* Ensure proper codicon sizing */
.codicon {
  font-size: 16px !important;
  line-height: 16px !important;
}

.show-diff-btn:disabled {
  opacity: 0.7 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  background-color: #E0E0E0 !important;
  color: #757575 !important;
  border-color: #BDBDBD !important;
}

.file-change-item .file-actions .replace-code-btn.success {
  background-color: #2d7d3a !important;
  color: #FFFFFF !important;
  border-color: #256b31 !important;
}

.file-change-item .file-actions .replace-code-btn.error {
  background-color: #F44336 !important;
}

.file-change-item .file-actions .show-diff-btn:disabled {
  background-color: #2d2d2d !important;
  color: #808080 !important;
  border-color: #404040 !important;
  opacity: 1 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}