/* JSON Editor Styles - Enhanced Version */

.json-editor-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #fff;
}

.json-editor-toolbar {
  background-color: #f5f5f5;
  border-bottom: 1px solid #ddd;
  padding: 0;
}

.toolbar-row {
  display: flex;
  align-items: center;
  padding: 10px;
  gap: 8px;
  flex-wrap: wrap;
}

.json-editor-toolbar button {
  padding: 6px 12px;
  font-size: 12px;
  white-space: nowrap;
}

.json-editor-status {
  margin-left: auto;
  font-weight: bold;
  padding: 6px 12px;
  border-radius: 3px;
  background-color: #fff;
  font-size: 12px;
}

.json-editor-status.text-success {
  color: #28a745;
  background-color: #d4edda;
}

.json-editor-status.text-danger {
  color: #dc3545;
  background-color: #f8d7da;
}

.json-editor-status.text-warning {
  color: #856404;
  background-color: #fff3cd;
}

.json-editor-status.text-muted {
  color: #6c757d;
  background-color: #e2e3e5;
}

.json-line-count {
  padding: 6px 12px;
  background-color: #e9ecef;
  border-radius: 3px;
  font-size: 12px;
  color: #495057;
}

/* Search Panel */
.search-panel {
  background-color: #f9f9f9;
  border-bottom: 1px solid #ddd;
  padding: 10px;
}

.search-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.search-input {
  flex: 1;
  max-width: 300px;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 12px;
}

.search-controls button {
  padding: 5px 10px;
  font-size: 11px;
}

.search-matches {
  padding: 6px 12px;
  background-color: #e9ecef;
  border-radius: 3px;
  font-size: 12px;
  color: #495057;
}

.replace-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.replace-input {
  flex: 1;
  max-width: 300px;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 12px;
}

.replace-controls button {
  padding: 5px 10px;
  font-size: 11px;
}

/* Editor Wrapper with Line Numbers */
.json-editor-wrapper {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
  background-color: #fff;
}

.line-numbers {
  background-color: #f8f8f8;
  border-right: 1px solid #ddd;
  padding: 10px 8px;
  user-select: none;
  overflow: hidden;
  text-align: right;
  min-width: 40px;
  max-width: 60px;
}

.line-number {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
  font-size: 13px;
  line-height: 1.5;
  color: #999;
  height: 20px;
}

.json-editor-textarea {
  flex: 1;
  padding: 10px !important;
  border: none !important;
  border-radius: 0 !important;
  font-size: 13px;
  line-height: 1.5;
  color: #333;
  background-color: #fafafa;
  resize: none;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
  overflow: auto;
  outline: none;
}

.json-editor-textarea:focus {
  background-color: #fff;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}

/* Preview Panel */
.json-preview-panel {
  border-top: 1px solid #ddd;
  background-color: #f9f9f9;
  cursor: pointer;
  max-height: 300px;
  overflow: hidden;
  animation: slideDown 0.3s ease-in-out;
}

@keyframes slideDown {
  from {
    max-height: 0;
    opacity: 0;
  }
  to {
    max-height: 300px;
    opacity: 1;
  }
}

.json-preview-header {
  padding: 10px;
  background-color: #e9ecef;
  border-bottom: 1px solid #ddd;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.json-preview-header strong {
  color: #333;
}

.json-preview-content {
  padding: 10px;
  overflow-y: auto;
  max-height: 250px;
  background-color: #fafafa;
}

.json-preview-content pre {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: #333;
  word-wrap: break-word;
  white-space: pre-wrap;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
}

/* Error Message */
.json-error-message {
  padding: 12px;
  margin-top: 10px;
  border-radius: 4px;
  font-size: 12px;
}

.json-error-message strong {
  display: block;
  margin-bottom: 5px;
}

/* Syntax Highlighting for JSON */
.json-highlight {
  background-color: #fff3cd;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .toolbar-row {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-row button {
    font-size: 11px;
    padding: 4px 8px;
    width: 100%;
  }

  .json-editor-status {
    font-size: 11px;
    padding: 4px 8px;
    width: 100%;
    margin-left: 0;
    margin-top: 5px;
  }

  .json-line-count {
    font-size: 11px;
    padding: 4px 8px;
    width: 100%;
  }

  .search-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input {
    max-width: none;
  }

  .replace-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .replace-input {
    max-width: none;
  }

  .line-numbers {
    min-width: 35px;
    padding: 10px 5px;
    font-size: 11px;
  }

  .json-editor-textarea {
    font-size: 12px;
  }
}

/* Dark theme variant (opcional) */
.json-editor-dark {
  background-color: #1e1e1e;
}

.json-editor-dark .json-editor-textarea {
  background-color: #252526;
  color: #d4d4d4;
}

.json-editor-dark .line-numbers {
  background-color: #1e1e1e;
  color: #858585;
}

.json-editor-dark .json-preview-panel {
  background-color: #2d2d30;
}

.json-editor-dark .json-preview-content {
  background-color: #252526;
  color: #d4d4d4;
}

.json-editor-dark .json-preview-content pre {
  color: #d4d4d4;
}

