/* Debug Panel Styles */
#pa-debug-panel {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 400px;
  max-height: 50vh;
  background: #0a0e17;
  border: 1px solid #2a3142;
  border-radius: 8px 0 0 0;
  padding: 12px;
  font-family: monospace;
  font-size: 11px;
  color: #b8c4d4;
  z-index: 999999;
  overflow: auto;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.6);
}

#pa-debug-panel header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #2a3142;
}

#pa-debug-panel header strong {
  color: #d4a843;
}

#pa-debug-close {
  background: none;
  border: 1px solid #2a3142;
  color: #8a9ab0;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
}

#pa-debug-close:hover {
  color: #d4a843;
  border-color: #d4a843;
}

#pa-debug-panel .tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

#pa-debug-panel .pa-debug-tab {
  background: #1e2433;
  border: 1px solid #2a3142;
  color: #8a9ab0;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  white-space: nowrap;
}

#pa-debug-panel .pa-debug-tab.active,
#pa-debug-panel .pa-debug-tab:hover {
  background: #2a3142;
  color: #d4a843;
}

#pa-debug-panel .pa-debug-tab:focus-visible {
  outline: 2px solid #d4a843;
  outline-offset: 2px;
}

#pa-debug-content {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
}

#pa-debug-content button {
  margin: 4px;
  padding: 6px 12px;
  background: #2a3142;
  border: 1px solid #d4a843;
  color: #d4a843;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
}

#pa-debug-content button:hover {
  background: #d4a843;
  color: #0a0e17;
}

/* Responsive for small viewports */
@media (max-width: 480px) {
  #pa-debug-panel {
    width: 100vw;
    right: 0;
    border-radius: 8px 8px 0 0;
    max-height: 60vh;
  }
  
  #pa-debug-panel .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Safe area for notched devices */
@supports (padding: max(0px)) {
  #pa-debug-panel {
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  #pa-debug-panel .pa-debug-tab {
    transition: none;
  }
}