/* Debug Panel Styles */
#debug-host {
  margin: 16px 10px 24px 10px;
  box-sizing: border-box;
}

#debug-panel {
  position: static;
  background: #0f1423;
  color: #cbd5e1;
  border: 1px solid #2a3246;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,.20);
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

#debug-panel .dbg-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #0b1020;
  border-bottom: 1px solid #1f2940;
  padding: 8px 12px;
  font-weight: 600;
}

#debug-panel .dbg-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

#debug-panel .dbg-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

#debug-panel .dbg-actions .dbg-btn {
  white-space: nowrap;
}

#debug-panel .dbg-name {
  font-weight: 700;
  font-size: 16px;
  color: #f1f5f9;
}

#debug-panel .dbg-strip {
  font-size: 12px;
  color: #cbd5e1;
  width: 100%;
}

#debug-panel .pill {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 8px;
  border: 1px solid #2a3246;
  border-radius: 999px;
  font-weight: 600;
  color: #e2e8f0;
}

#debug-panel .dbg-btn {
  background: #0f1423;
  border: 1px solid #2a3246;
  color: #cbd5e1;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}

#debug-panel .dbg-btn:hover {
  background: #141b2e;
}

#debug-panel .status-messages {
  border-bottom: 1px solid #1f2940;
}

#debug-panel .status-header,
#debug-panel .timing-header,
#debug-panel .snapshot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: #0b1020;
  border-bottom: 1px solid #1f2940;
  font-weight: 600;
}


#debug-panel .section-title {
  font-weight: 600;
  color: #e2e8f0;
}

#debug-panel .status-filters {
  display: flex;
  gap: 8px;
  align-items: center;
}

#debug-panel .status-filters select,
#debug-panel .status-filters input {
  background: #0f1423;
  border: 1px solid #2a3246;
  color: #cbd5e1;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
}

#debug-panel .status-filters button {
  background: #0f1423;
  border: 1px solid #2a3246;
  color: #cbd5e1;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
}

#debug-panel .timing-section {
  /*margin: 12px 0;*/
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: rgba(16, 20, 32, 0.7);
  font-family: inherit;
}

#debug-panel .timing-header {
  gap: 12px;
}

#debug-panel .timing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

#debug-panel .timing-table th,
#debug-panel .timing-table td {
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
  text-align: left;
  white-space: nowrap;
}

#debug-panel .timing-table th {
  background: rgba(255, 255, 255, 0.06);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #e2e8f0;
}

#debug-panel .timing-table td {
  color: #cbd5e1;
}

#debug-panel .timing-table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.025);
}

#debug-panel .timing-table tr:hover {
  background: rgba(255, 255, 255, 0.1);
}

#debug-panel .timing-empty td {
  padding: 16px 10px;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
}

#debug-panel .status-log {
  max-height: 200px;
  min-height: 60px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.4;
  /* Firefox scrollbar - override global hiding */
  scrollbar-width: thin !important;
  scrollbar-color: #2a3246 #1f2940 !important;
  /* IE/Edge scrollbar */
  -ms-overflow-style: auto !important;
}

/* Webkit scrollbar styling for status log - override global hiding */
#debug-panel .status-log::-webkit-scrollbar {
  width: 8px !important;
  height: 8px !important;
}

#debug-panel .status-log::-webkit-scrollbar-track {
  background: #1f2940 !important;
  border-radius: 4px !important;
}

#debug-panel .status-log::-webkit-scrollbar-thumb {
  background: #2a3246 !important;
  border-radius: 4px !important;
}

#debug-panel .status-log::-webkit-scrollbar-thumb:hover {
  background: #3a4356 !important;
}

#debug-panel .system-snapshot {
  display: flex;
  flex-direction: column;
}

#debug-panel .snapshot-content {
  margin: 0;
  padding: 10px 12px;
  color: #e5e7eb;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
  max-width: 100%;
  box-sizing: border-box;
  font-size: 11px;
  line-height: 1.3;
}

@media (max-width: 720px) {
  #debug-host {
    margin: 10px 6px 16px;
  }
}