.error-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.error-modal {
  background: var(--color-bg-secondary, #1e1e1e);
  border: 1px solid var(--color-border, #3c3c3c);
  border-radius: 8px;
  min-width: 400px;
  max-width: 700px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.error-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border, #3c3c3c);
}

.error-modal-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-error, #f14c4c);
}

.error-modal-close {
  background: none;
  border: none;
  color: var(--color-text-muted, #888);
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  border-radius: 4px;
}

.error-modal-close:hover {
  background: var(--color-bg-tertiary, #2a2a2a);
  color: var(--color-text, #fff);
}

.error-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.error-message {
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text, #ccc);
  margin-bottom: 16px;
}

.error-stack-section {
  margin-top: 12px;
}

.error-stack-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.error-stack-header span {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted, #888);
  text-transform: uppercase;
}

.copy-button {
  background: var(--color-bg-tertiary, #2a2a2a);
  border: 1px solid var(--color-border, #3c3c3c);
  color: var(--color-text, #ccc);
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.copy-button:hover {
  background: var(--color-bg-hover, #333);
}

.error-stack {
  background: var(--color-bg-primary, #0d0d0d);
  border: 1px solid var(--color-border, #3c3c3c);
  border-radius: 4px;
  padding: 12px;
  font-family: 'Cascadia Code', 'Consolas', 'Courier New', monospace;
  font-size: 12px;
  color: var(--color-text-muted, #888);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 300px;
  margin: 0;
}

.error-modal-footer {
  display: flex;
  justify-content: flex-end;
  padding: 16px 20px;
  border-top: 1px solid var(--color-border, #3c3c3c);
}

.error-modal-footer button {
  background: var(--color-primary, #0e639c);
  border: none;
  color: #fff;
  padding: 8px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}

.error-modal-footer button:hover {
  background: var(--color-primary-hover, #1177bb);
}
