/* JSON Editor Modal Styles */

.triage-json-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.triage-json-modal {
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  width: 90vw;
  max-width: 1400px;
  height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.triage-json-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #f9f9f9;
}

.triage-json-modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.triage-json-modal-tabs {
  display: flex;
  gap: 8px;
}

.triage-json-modal-tabs button {
  padding: 8px 16px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.triage-json-modal-tabs button:hover:not(:disabled) {
  background: #f0f0f0;
  border-color: #999;
}

.triage-json-modal-tabs button.active {
  background: #2271b1;
  color: white;
  border-color: #2271b1;
}

.triage-json-modal-tabs button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.triage-json-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.triage-json-modal-close:hover {
  background: #f0f0f0;
  color: #333;
}

.triage-json-modal-body {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.triage-json-visual-container {
  height: 100%;
  width: 100%;
  background: #fafafa;
}

.triage-json-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #666;
  font-size: 16px;
  gap: 8px;
}

.triage-json-text-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 16px;
}

.triage-json-textarea {
  flex: 1;
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 12px;
  font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
  font-size: 13px;
  line-height: 1.5;
  resize: none;
}

.triage-json-error {
  margin-top: 12px;
  padding: 12px;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 4px;
  color: #856404;
  font-size: 13px;
}

.triage-json-error strong {
  color: #d32f2f;
}

.triage-json-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #ddd;
  background: #f9f9f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.triage-json-modal-controls {
  display: flex;
  gap: 8px;
}

.triage-json-modal-controls button {
  padding: 6px 12px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}

.triage-json-modal-controls button:hover {
  background: #f0f0f0;
  border-color: #999;
}

.triage-json-modal-actions {
  display: flex;
  gap: 8px;
}

.triage-json-modal-actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Editor Controls (buttons below textarea) */
.triage-json-editor-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .triage-json-modal {
    width: 95vw;
    height: 90vh;
  }

  .triage-json-modal-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .triage-json-modal-footer {
    flex-direction: column;
    gap: 12px;
  }

  .triage-json-modal-controls,
  .triage-json-modal-actions {
    width: 100%;
  }
}
