/**
 * Workspace Files Tree - Git Modals
 * History and diff modal dialogs
 */

/* Modal overlay */
.wft-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9998;
  backdrop-filter: blur(2px);
}

/* Modal base */
.wft-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--workspace-bg-monaco);
  border: 1px solid var(--workspace-border-default);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 9999;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  min-width: 500px;
}

/* Modal header */
.wft-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--workspace-border-default);
  background: var(--workspace-bg-secondary);
  border-radius: 8px 8px 0 0;
}

.wft-modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-fg-default, #e6edf3);
}

.wft-modal-title i {
  font-size: 16px;
  color: var(--color-accent-fg, #58a6ff);
}

.wft-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: var(--color-fg-muted, #768390);
  transition: all 0.15s ease;
}

.wft-modal-close:hover {
  background: var(--color-canvas-subtle, rgba(127, 127, 127, 0.2));
  color: var(--color-fg-default, #e6edf3);
}

/* Modal body */
.wft-modal-body {
  padding: 16px;
  overflow: auto;
  flex: 1;
}

/* History Modal Styles */
.wft-history-modal {
  width: 700px;
}

.wft-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.wft-history-table th {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--workspace-border-default);
  color: var(--color-fg-muted, #768390);
  font-weight: 500;
}

.wft-history-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--workspace-border-default);
  color: var(--color-fg-default, #e6edf3);
}

.wft-history-row:hover {
  background: var(--color-canvas-subtle, rgba(127, 127, 127, 0.1));
}

.wft-history-hash code {
  font-family: var(--font-mono, monospace);
  background: var(--color-canvas-subtle, #2a2a2a);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--color-accent-fg, #58a6ff);
  font-size: 11px;
}

.wft-history-message {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wft-history-author {
  color: var(--color-fg-muted, #768390);
}

.wft-history-date {
  color: var(--color-fg-muted, #768390);
  white-space: nowrap;
}

/* Diff Modal Styles */
.wft-diff-modal {
  width: 800px;
  max-height: 80vh;
}

.wft-diff-stat {
  padding: 8px 12px;
  background: var(--workspace-bg-secondary);
  border-radius: 4px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--color-fg-muted, #768390);
  font-family: var(--font-mono, monospace);
}

.wft-diff-content {
  background: var(--workspace-bg-monaco);
  border: 1px solid var(--workspace-border-default);
  border-radius: 4px;
  overflow: auto;
  max-height: 60vh;
}

.wft-diff-content pre {
  margin: 0;
  padding: 12px;
  font-family: var(--font-mono, "JetBrains Mono", "Monaco", monospace);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre;
  overflow-x: auto;
}

.wft-diff-header {
  color: var(--color-fg-muted, #768390);
  font-weight: 600;
  display: block;
}

.wft-diff-hunk {
  color: var(--color-done-fg, #a371f7);
  background: rgba(163, 113, 247, 0.1);
  display: block;
  margin: 8px 0 4px 0;
  padding: 2px 4px;
  border-radius: 2px;
}

.wft-diff-add {
  color: var(--color-success-fg, #3fb950);
  background: rgba(63, 185, 80, 0.15);
  display: block;
}

.wft-diff-del {
  color: var(--color-danger-fg, #f85149);
  background: rgba(248, 81, 73, 0.15);
  display: block;
}

.wft-diff-context {
  color: var(--color-fg-default, #e6edf3);
  display: block;
}

.wft-diff-empty {
  color: var(--color-fg-muted, #768390);
  font-style: italic;
}
