/* Debug and Test Utilities Styles */

/* Debug Panel */
#debug-panel-container {
  position: fixed;
  bottom: 0;
  left: var(--sidebar-width-collapsed, 60px);
  width: 400px;
  height: 300px;
  background-color: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-family: monospace;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  border-top-right-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  transition: left var(--sidebar-transition, 0.3s ease);
}

#debug-panel-header {
  padding: 5px 10px;
  background-color: #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top-right-radius: 5px;
}

#debug-panel-controls button {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  margin-left: 5px;
}

#debug-panel {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  font-size: 12px;
}

.log-entry {
  margin-bottom: 3px;
  line-height: 1.3;
}

.log-timestamp {
  color: #aaa;
}

.log-module {
  color: #66c;
  font-weight: bold;
}

.log-debug .log-message {
  color: #ccc;
}

.log-info .log-message {
  color: #6c6;
}

.log-warn .log-message {
  color: #cc6;
}

.log-error .log-message {
  color: #c66;
}

.debug-panel-collapsed {
  height: 30px !important;
}

.debug-panel-collapsed #debug-panel {
  display: none;
}

/* Test Report */
#test-report-container {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 500px;
  max-height: 80vh;
  background-color: #fff;
  color: #333;
  font-family: Arial, sans-serif;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  border-radius: 5px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

#test-report-header {
  padding: 10px 15px;
  background-color: #4a6cf7;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  font-weight: bold;
}

#test-report-controls button {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  margin-left: 10px;
  font-size: 14px;
}

#test-report-run {
  background-color: rgba(255, 255, 255, 0.2) !important;
  padding: 5px 10px;
  border-radius: 3px;
}

#test-report-close {
  font-size: 18px !important;
}

#test-report-content {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
}

.test-summary {
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.test-status {
  font-size: 18px;
  font-weight: bold;
  padding: 8px 15px;
  border-radius: 4px;
}

.test-status.success {
  background-color: #e6f7e6;
  color: #2e7d32;
}

.test-status.failure {
  background-color: #fdecea;
  color: #c62828;
}

.test-timestamp {
  color: #666;
  font-size: 12px;
}

.test-section {
  margin-bottom: 20px;
  border: 1px solid #eee;
  border-radius: 4px;
  padding: 15px;
}

.test-section h3 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 16px;
  color: #333;
}

.test-results {
  margin-bottom: 15px;
}

.test-result {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.test-result:last-child {
  border-bottom: none;
}

.test-name {
  flex: 1;
}

.test-indicator {
  font-weight: bold;
  margin-left: 10px;
}

.test-result.success .test-indicator {
  color: #2e7d32;
}

.test-result.failure .test-indicator {
  color: #c62828;
}

.test-errors {
  background-color: #fdecea;
  padding: 10px 15px;
  border-radius: 4px;
}

.test-errors h4 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #c62828;
  font-size: 14px;
}

.test-errors ul {
  margin: 0;
  padding-left: 20px;
}

.test-errors li {
  margin-bottom: 5px;
  font-size: 12px;
}

/* Test Button */
#run-tests-button {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #4a6cf7;
  color: white;
  border: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

#run-tests-button:hover {
  background-color: #3a5bd7;
}

/* Debug Mode Indicator */
.debug-mode-indicator {
  position: fixed;
  top: 0;
  left: 0;
  background-color: rgba(255, 0, 0, 0.2);
  color: #fff;
  padding: 2px 8px;
  font-size: 10px;
  z-index: 9998;
  font-family: monospace;
}

/* Add debug outline to elements when in debug mode */
body.debug-mode * {
  outline: 1px solid rgba(255, 0, 0, 0.1);
}

body.debug-mode *:hover {
  outline: 1px solid rgba(255, 0, 0, 0.5);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  #debug-panel-container {
    width: 100%;
    height: 200px;
    border-radius: 0;
    left: 0 !important; /* Override sidebar positioning on mobile */
  }

  #debug-panel-header {
    border-radius: 0;
  }

  /* Make debug panel more compact on mobile */
  #debug-panel {
    font-size: 10px;
  }

  /* Ensure debug panel is above sidebar on mobile */
  #debug-panel-container {
    z-index: 10000;
  }
}
