/* HAR viewer — network entries table + expandable detail (Selenoid / Allure) */
.har-viewer {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  padding: 0;
  margin: 0;
}

.har-viewer *,
.har-viewer *::before,
.har-viewer *::after {
  box-sizing: border-box;
}

/* Panel composition (selenoid session slot) */
.har-card {
  width: 100%;
}

.har-card__body {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 160px;
  padding: 0;
  overflow: visible;
}

.har-empty {
  padding: 24px 16px;
  color: var(--color-text-muted, #999);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.har-table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  scrollbar-width: thin;
  flex: 1 0 auto;
}

.har-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.35;
  color: var(--color-text, #ccc);
}

.har-table th,
.har-table td {
  padding: 4px 8px;
  border-bottom: 1px solid var(--color-border, #3d444c);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.har-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--panel-bg, #1a1917);
  color: var(--color-text-muted, #999);
  font-weight: 600;
}

.har-row {
  cursor: pointer;
}

.har-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.har-row:focus-visible {
  outline: 1px solid var(--color-accent, #6cb6ff);
  outline-offset: -1px;
}

.har-row--open {
  background: rgba(255, 255, 255, 0.04);
}

.har-method {
  font-weight: 600;
  color: #89d185;
}

.har-url {
  max-width: 0;
  width: 50%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.har-mime {
  color: var(--color-text-muted, #999);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.har-status--ok {
  color: #89d185;
}

.har-status--redir {
  color: #6cb6ff;
}

.har-status--warn {
  color: #cca700;
}

.har-status--err {
  color: #f48771;
}

.har-status--muted {
  color: var(--color-text-muted, #999);
}

.har-detail-row > td {
  padding: 0;
  white-space: normal;
  border-bottom: 1px solid var(--color-border, #3d444c);
  background: rgba(0, 0, 0, 0.18);
}

.har-detail {
  padding: 8px 12px 12px;
}

.har-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--color-border, #3d444c);
  margin-bottom: 10px;
}

.har-tab {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 6px 12px;
  color: var(--color-text-muted, #999);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.har-tab:hover {
  color: var(--color-text, #ccc);
}

.har-tab--active {
  color: var(--color-text, #ccc);
  border-bottom-color: var(--color-accent, #6cb6ff);
}

.har-tab:focus-visible {
  outline: 1px solid var(--color-accent, #6cb6ff);
  outline-offset: -2px;
}

.har-tab-panel {
  min-height: 48px;
}

.har-section + .har-section {
  margin-top: 12px;
}

.har-section__title {
  margin-bottom: 6px;
  color: var(--color-text-muted, #999);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.har-kv {
  display: grid;
  grid-template-columns: minmax(96px, 140px) 1fr;
  gap: 2px 12px;
  font-size: 12px;
  line-height: 1.4;
}

.har-kv__k {
  color: var(--color-text-muted, #999);
  word-break: break-all;
  white-space: normal;
}

.har-kv__v {
  color: var(--color-text, #ccc);
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.har-muted {
  color: var(--color-text-muted, #999);
}

.har-body {
  margin: 0;
  padding: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 180px;
  overflow-y: auto;
  scrollbar-width: thin;
  color: var(--color-text, #ccc);
}

/* Static Allure HTML: native <details> instead of JS tabs */
.har-detail details {
  margin: 0;
}

.har-detail details + details {
  margin-top: 8px;
}

.har-detail summary {
  cursor: pointer;
  color: var(--color-text-muted, #999);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 4px 0;
}

.har-detail summary:hover {
  color: var(--color-text, #ccc);
}
