:root {
  --sonder-row-a: #ffffff;
  --sonder-row-b: #edf0f4;
  --sonder-row-border: #c9cfd8;
}
html[data-theme="dark"] {
  --sonder-row-a: #16181b;
  --sonder-row-b: #30363e;
  --sonder-row-border: #4a525d;
}
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    --sonder-row-a: #16181b;
    --sonder-row-b: #30363e;
    --sonder-row-border: #4a525d;
  }
}

/* Stacked records: separate whole keys rather than striping their individual fields. */
.inline-group .inline-related:not(.tabular):not(.empty-form) {
  --body-bg: var(--sonder-row-a);
  background: var(--sonder-row-a);
  border: 1px solid var(--sonder-row-border);
  border-radius: 8px;
  margin: 14px 0;
  padding-bottom: 10px;
  overflow: hidden;
}
.inline-group .inline-related:not(.tabular):not(.empty-form):nth-of-type(even) {
  --body-bg: var(--sonder-row-b);
  background: var(--sonder-row-b);
}
@supports selector(:nth-child(2 of .inline-related)) {
  .inline-group .inline-related:nth-child(odd of .inline-related:not(.tabular):not(.empty-form)) {
    --body-bg: var(--sonder-row-a);
    background: var(--sonder-row-a);
  }
  .inline-group .inline-related:nth-child(even of .inline-related:not(.tabular):not(.empty-form)) {
    --body-bg: var(--sonder-row-b);
    background: var(--sonder-row-b);
  }
}
.inline-group .inline-related:not(.tabular) > h3 {
  background: transparent;
  border-bottom: 1px solid var(--sonder-row-border);
  margin: 0;
  padding: 13px 16px;
}
.inline-group .inline-related:not(.tabular) fieldset.module {
  background: transparent;
}
.inline-group .inline-related:not(.tabular) .form-row {
  padding-left: 16px;
  padding-right: 16px;
}

/* Lists and tabular inlines: payments, users, servers, polls and other records. */
#result_list tbody tr:nth-child(odd),
.inline-group .tabular tbody tr.form-row:nth-of-type(odd) {
  --body-bg: var(--sonder-row-a);
  background: var(--sonder-row-a);
}
#result_list tbody tr:nth-child(even),
.inline-group .tabular tbody tr.form-row:nth-of-type(even) {
  --body-bg: var(--sonder-row-b);
  background: var(--sonder-row-b);
}
#result_list tbody td, #result_list tbody th,
.inline-group .tabular tbody tr.form-row td {
  background: inherit;
  border-bottom-color: var(--sonder-row-border);
}
#result_list tbody tr.selected {
  background: var(--selected-row);
}

.sonder-admin-brand { display: inline-flex; align-items: center; gap: 8px; }
.sonder-admin-brand img { display: block; width: 36px; height: 36px; object-fit: contain; mix-blend-mode: screen; }
