/* jq Playground Styles */
.jq-playground {
  width: 100%;
  margin: 2rem 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.jq-playground-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
  min-height: 600px;
}

@media (max-width: 768px) {
  .jq-playground-grid {
    grid-template-columns: 1fr;
    min-height: 800px;
  }
}

.jq-playground-left,
.jq-playground-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.jq-editor-container {
  display: flex;
  flex-direction: column;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Query 容器 - 固定高度 */
.jq-query-container {
  height: 120px;
  flex-shrink: 0;
}

/* JSON Input 容器 - 占据剩余空间 */
.jq-input-container {
  flex: 1;
  min-height: 0;
}

/* Output 容器 - 占据全部高度 */
.jq-output-container {
  flex: 1;
  min-height: 0;
}

.jq-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #495057;
}

.jq-editor {
  flex: 1;
  min-height: 0;
  position: relative;
}

.jq-status {
  font-size: 1rem;
  font-weight: normal;
  margin-left: 0.5rem;
}

.jq-status-running {
  color: #6c757d;
}

.jq-status-success {
  color: #28a745;
}

.jq-status-error {
  color: #dc3545;
}

.jq-btn {
  padding: 0.375rem 0.75rem;
  border: none;
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.jq-btn-secondary {
  background: #6c757d;
  color: white;
}

.jq-btn-secondary:hover {
  background: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.jq-btn-secondary:active {
  background: #545b62;
  transform: translateY(0);
}

/* Dark mode styles */
.dark .jq-editor-container,
[data-theme="dark"] .jq-editor-container {
  border-color: #3a3a3a;
  background: #1e1e1e;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.dark .jq-editor-header,
[data-theme="dark"] .jq-editor-header {
  background: #252526;
  border-bottom-color: #3a3a3a;
  color: #cccccc;
}

.dark .jq-status-running,
[data-theme="dark"] .jq-status-running {
  color: #858585;
}

.dark .jq-status-success,
[data-theme="dark"] .jq-status-success {
  color: #4ec9b0;
}

.dark .jq-status-error,
[data-theme="dark"] .jq-status-error {
  color: #f48771;
}

.dark .jq-btn-secondary,
[data-theme="dark"] .jq-btn-secondary {
  background: #505050;
  color: #e0e0e0;
}

.dark .jq-btn-secondary:hover,
[data-theme="dark"] .jq-btn-secondary:hover {
  background: #606060;
}

.dark .jq-btn-secondary:active,
[data-theme="dark"] .jq-btn-secondary:active {
  background: #484848;
}
