.query-input-form {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.query-editor {
  position: relative;
  flex-grow: 1;
  overflow: hidden;
  background-color: #1e1e1e;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.query-textarea,
.query-editor pre {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 1rem;
  font-family: 'Consolas', 'Monaco', 'Andale Mono', 'Ubuntu Mono', monospace;
  font-size: 14px;
  line-height: 1.5;
  box-sizing: border-box;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow: auto;
}

.query-textarea {
  color: transparent;
  background: transparent;
  caret-color: #fff;
  resize: none;
  border: none;
  outline: none;
  z-index: 1;
  max-height: calc(100% - 3rem);
  overflow-y: auto;
  padding: 3.5rem 1rem 1rem 1rem !important;
}

.query-editor pre {
  pointer-events: none;
  z-index: 0;
  background-color: transparent;
  color: #e0e0e0;
  transition: background-color 0.6s ease-in-out;
  max-height: calc(100% - 3rem);
  overflow-y: auto;
  padding: 3.5rem 1rem 1rem 1rem !important;
}

.App.left-sidebar-closed .query-editor {
  background-color: rgba(30, 30, 30, 0.8);
  transition: background-color 0.3s ease;
  box-shadow: 0 0 25px rgba(140, 82, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.App.left-sidebar-closed .query-input-form.focused .query-editor {
  background-color: rgba(30, 30, 30, 0.95);
  box-shadow: 0 0 30px rgba(140, 82, 255, 0.3), 0 0 10px rgba(255, 87, 87, 0.2);
  border: 1px solid rgba(140, 82, 255, 0.2);
}

.query-editor pre code {
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
}

.submit-button {
  padding: 0.6rem 1.2rem;
  background: linear-gradient(135deg, #ff5757, #8c52ff);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 10000;
  font-weight: 500;
  box-shadow: 0 0 10px rgba(140, 82, 255, 0.5);
}

.submit-button:hover {
  background: linear-gradient(135deg, #ff7a7a, #a375ff);
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(140, 82, 255, 0.7);
}

.submit-button:disabled {
  background: #333;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
  opacity: 0.6;
}

.suggestions {
  position: absolute;
  max-height: 200px;
  overflow-y: auto;
  z-index: 99999999;
  font-family: 'Consolas', 'Monaco', 'Andale Mono', 'Ubuntu Mono', monospace;
  font-size: 14px;
  scroll-behavior: smooth;
  top: 52px !important;
}

.suggestion-item {
  padding: 0;
  cursor: pointer;
  color: #8f8f8f;
  transition: all 0.2s ease;
}

.suggestion-item:hover,
.suggestion-item.highlighted {
  color: #ffffff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.8), 0 0 12px rgba(255, 255, 255, 0.6), 0 0 16px rgba(255, 255, 255, 0.4);
}

.query-status {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  font-size: 12px;
  color: #e0e0e0;
  z-index: 999;
  font-family: 'Arial', sans-serif;
  display: flex;
  align-items: center;
  gap: 5px;
}

.query-status-count {
  font-weight: bold;
  color: #ffffff;
}

.query-status-result {
  font-weight: bold;
}

.query-status-result.succeeded {
  color: #4caf50;
  text-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
}

.query-status-result.failed {
  color: #f44336;
  text-shadow: 0 0 5px rgba(244, 67, 54, 0.5);
}

.query-status-time {
  font-weight: bold;
  color: #03a9f4;
  text-shadow: 0 0 5px rgba(3, 169, 244, 0.5);
}

.history-button {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 12px;
  z-index: 10000;
  transition: all 0.2s ease;
  padding: 5px 10px;
  border-radius: 4px;
}

.history-button:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
}

.query-input-form.panel-closed .query-editor {
  background-color: rgba(30, 30, 30, 0.8);
  transition: background-color 0.3s ease;
  box-shadow: 0 0 25px rgba(140, 82, 255, 0.2);
}

.query-input-form.panel-closed.focused .query-editor {
  background-color: rgba(30, 30, 30, 0.95);
  box-shadow: 0 0 30px rgba(140, 82, 255, 0.3), 0 0 10px rgba(255, 87, 87, 0.2);
}

.context-indicator {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 12px;
  color: #888;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'Arial', sans-serif;
}

.context-indicator .context {
  color: #03a9f4;
  font-weight: bold;
  text-shadow: 0 0 5px rgba(3, 169, 244, 0.5);
}

.context-indicator .namespace {
  color: #888;
  font-size: 0.8em;
  margin-left: 5px;
  cursor: pointer;
  text-decoration: underline dotted;
  transition: all 0.2s ease;
}

.context-indicator .namespace:hover {
  color: #03a9f4;
  text-shadow: 0 0 5px rgba(3, 169, 244, 0.3);
}

.dry-run-toggle {
  display: flex;
  align-items: center;
  margin-left: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 0.8em;
  color: #888;
  background-color: transparent;
  border: 1px solid #555;
  border-radius: 4px;
  padding: 2px 8px;
  transition: all 0.2s ease;
}

.dry-run-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.dry-run-toggle.active {
  background-color: rgba(255, 165, 0, 0.2);
  border-color: orange;
  color: orange;
  text-shadow: 0 0 5px rgba(255, 165, 0, 0.3);
}

.dry-run-toggle.active:hover {
  background-color: rgba(255, 165, 0, 0.3);
}

.namespace-selector {
  background-color: rgba(30, 30, 30, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 999999;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5), 0 0 10px rgba(140, 82, 255, 0.2);
  width: 250px;
}

.namespace-item {
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.namespace-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.namespace-item.active {
  background-color: rgba(3, 169, 244, 0.2);
  color: #03a9f4;
  text-shadow: 0 0 5px rgba(3, 169, 244, 0.3);
}

.namespace-search {
  padding: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  background-color: rgba(30, 30, 30, 0.95);
  z-index: 1001;
}

.namespace-search input {
  width: 100%;
  padding: 8px 12px;
  background-color: rgba(40, 40, 40, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #fff;
  font-size: 0.9em;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.namespace-search input:focus {
  outline: none;
  border-color: transparent;
  box-shadow: 0 0 0 1px rgba(255, 87, 87, 0.5), 0 0 0 3px rgba(140, 82, 255, 0.3);
}