/* DHL simple-cost API debug panel (bottom-right, collapsed by default) */

#dhl-api-debug-panel {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 99990;
  max-width: min(520px, calc(100vw - 24px));
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 12px;
  line-height: 1.35;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
  border-radius: 8px;
  border: 1px solid #c5c9d4;
  background: #f4f5f8;
  color: #1a1d26;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

#dhl-api-debug-panel.dhl-api-debug-panel--visible {
  display: flex;
}

#dhl-api-debug-panel.dhl-api-debug-panel--expanded .dhl-api-debug-panel__body {
  display: flex;
}

#dhl-api-debug-panel.dhl-api-debug-panel--expanded .dhl-api-debug-panel__chevron {
  transform: rotate(180deg);
}

.dhl-api-debug-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
  user-select: none;
  background: #2c3347;
  color: #f0f2f7;
  font-weight: 600;
}

.dhl-api-debug-panel__header:hover {
  background: #363d54;
}

.dhl-api-debug-panel__title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dhl-api-debug-panel__chevron {
  flex-shrink: 0;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #c8ceda;
  transition: transform 0.15s ease;
}

.dhl-api-debug-panel__body {
  display: none;
  flex-direction: column;
  max-height: min(360px, 45vh);
  background: #fff;
  border-top: 1px solid #c5c9d4;
}

.dhl-api-debug-panel__tabs {
  display: flex;
  border-bottom: 1px solid #dde1ea;
  background: #eef0f5;
}

.dhl-api-debug-panel__tab {
  flex: 1;
  padding: 7px 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  color: #4a5164;
}

.dhl-api-debug-panel__tab:hover {
  background: #e2e5ee;
}

.dhl-api-debug-panel__tab.dhl-api-debug-panel__tab--active {
  background: #fff;
  color: #1a1d26;
  border-bottom: 2px solid #3d5a99;
  margin-bottom: -1px;
}

.dhl-api-debug-panel__pane {
  display: none;
  margin: 0;
  padding: 10px;
  overflow: auto;
  flex: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  white-space: pre-wrap;
  word-break: break-word;
  color: #222;
}

.dhl-api-debug-panel__pane.dhl-api-debug-panel__pane--active {
  display: block;
}

.dhl-api-debug-panel__meta {
  padding: 6px 10px;
  font-size: 10px;
  color: #5c6378;
  border-bottom: 1px solid #eef0f5;
  word-break: break-all;
}
