/* Console Container - Keep dark theme for console only */
.console-container {
  position: fixed;
  right: 0;
  top: 0;
  height: 100vh;
  width: 30%;
  min-width: 300px;
  max-width: 600px;
  background: #1e1e1e;
  color: #e0e0e0;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
  transform: translateX(calc(100% - 40px));
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.5;
  will-change: transform;
  contain: content;
}

.console-container.open {
  transform: translateX(0);
  box-shadow: -2px 0 15px rgba(0, 0, 0, 0.5);
}

/* Ensure console is above other content */
.console-container {
  pointer-events: auto;
}

/* Prevent body scroll when console is open */
body.console-open {
  overflow: hidden;
}

/* Toggle Button */
.console-toggle {
  position: absolute;
  left: -40px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 80px;
  background: #2a2a2a;
  border: none;
  color: #e0e0e0;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 4px 0 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  padding: 12px 0;
  transition: all 0.2s ease;
  user-select: none;
  letter-spacing: 0.5px;
}

.console-toggle:hover {
  background: #444;
}

/* Console Panel */
.console-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* Header */
.console-header {
  padding: 10px;
  background: #252526;
  border-bottom: 1px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  padding: 8px 12px;
  position: relative;
  z-index: 1;
}

.console-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #e0e0e0;
}

/* Controls */
.console-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.console-controls select,
.console-controls input,
.console-controls button {
  padding: 4px 8px;
  background: #333;
  border: 1px solid #444;
  color: #e0e0e0;
  border-radius: 3px;
  font-size: 12px;
  font-family: inherit;
}

.console-controls select:focus,
.console-controls input:focus {
  outline: none;
  border-color: #0078d4;
}

.console-controls button {
  cursor: pointer;
  transition: background-color 0.2s;
}

.console-controls button:hover {
  background: #444;
}

/* Log Viewer */
.log-viewer {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  background: #1e1e1e;
}

/* Log Entries */
.log-entries {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.log-entry {
  padding: 4px 6px;
  border-radius: 3px;
  font-family: 'Consolas', 'Courier New', monospace;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.4;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.log-timestamp {
  color: #858585;
  flex-shrink: 0;
  font-size: 11px;
  opacity: 0.8;
}

.log-level {
  font-weight: bold;
  flex-shrink: 0;
  padding: 0 4px;
  border-radius: 3px;
  font-size: 10px;
  text-transform: uppercase;
  display: inline-block;
  min-width: 40px;
  text-align: center;
}

.log-level-error {
  background-color: #5c2b29;
  color: #f1707b;
}

.log-level-warn {
  background-color: #4d3a1a;
  color: #ffc83d;
}

.log-level-info {
  background-color: #1e3a5f;
  color: #6cb6ff;
}

.log-level-debug {
  background-color: #2c4b35;
  color: #7fec9d;
}

.log-level-trace {
  background-color: #3d3d3d;
  color: #b5b5b5;
}

.log-message {
  flex: 1;
  white-space: pre-wrap;
}

/* No logs message */
.no-logs {
  color: #858585;
  text-align: center;
  padding: 20px;
  font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .console-container {
    width: 90%;
    min-width: 280px;
  }
  
  .console-controls {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  
  .console-controls select,
  .console-controls input,
  .console-controls button {
    font-size: 11px;
    padding: 3px 6px;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #2d2d2d;
}

::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #777;
}
