.debug-inspector-trigger {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1040;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border-radius: 999px;
  box-shadow: 0 .6rem 1.8rem rgb(0 0 0 / 24%);
}

.debug-inspector {
  --bs-offcanvas-width: min(720px, 94vw);
  color: #1f2937;
  background: #f8fafc;
  box-shadow: -.75rem 0 2.5rem rgb(15 23 42 / 18%);
}

.debug-inspector .offcanvas-header {
  padding: 1rem 1.25rem;
  background: #fff;
}

.debug-inspector__icon {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  color: #fff;
  background: #111827;
  border-radius: .6rem;
  place-items: center;
}

.debug-inspector__summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #fff;
}

.debug-inspector__summary > div {
  display: grid;
  gap: .1rem;
  padding: .8rem .5rem;
  text-align: center;
  border-right: 1px solid #e5e7eb;
}

.debug-inspector__summary > div:last-child {
  border-right: 0;
}

.debug-inspector__summary strong {
  font-size: 1.05rem;
}

.debug-inspector__summary span {
  color: #64748b;
  font-size: .7rem;
  letter-spacing: .025em;
  text-transform: uppercase;
}

.debug-inspector__tabs {
  padding: .55rem .75rem;
  overflow-x: auto;
  background: #fff;
}

.debug-inspector__tabs .nav {
  gap: .35rem;
}

.debug-inspector__tabs .nav-link {
  padding: .4rem .75rem;
  color: #475569;
  font-size: .85rem;
  white-space: nowrap;
  border-radius: .55rem;
}

.debug-inspector__tabs .nav-link.active {
  color: #fff;
  background: #111827;
}

.debug-inspector__body {
  padding: 1.1rem;
}

.debug-inspector__section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .75rem;
}

.debug-inspector__section-heading h3 {
  margin: 0;
  font-size: .82rem;
  font-weight: 750;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.debug-inspector__details {
  margin: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: .75rem;
}

.debug-inspector__details > div {
  display: grid;
  grid-template-columns: minmax(8rem, 34%) minmax(0, 1fr);
  gap: .75rem;
  padding: .58rem .8rem;
  border-bottom: 1px solid #eef2f7;
}

.debug-inspector__details > div:last-child {
  border-bottom: 0;
}

.debug-inspector__details dt {
  color: #64748b;
  font-size: .78rem;
  font-weight: 600;
}

.debug-inspector__details dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .78rem;
}

.debug-inspector__state-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
  margin-top: .75rem;
}

.debug-inspector__state {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem .65rem;
  font-size: .78rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: .65rem;
}

.debug-inspector__state.is-true i { color: #198754; }
.debug-inspector__state.is-false { color: #64748b; }

.debug-variant-list {
  display: grid;
  gap: .75rem;
}

.debug-variant {
  overflow: hidden;
  border: 1px solid #dbe3ed !important;
  border-radius: .85rem !important;
  box-shadow: 0 .2rem .65rem rgb(15 23 42 / 5%);
}

.debug-variant .accordion-button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: .75rem;
  padding: .85rem;
  background: #fff;
  box-shadow: none;
}

.debug-variant .accordion-button:not(.collapsed) {
  color: inherit;
  background: #f8fafc;
}

.debug-variant__number {
  display: grid;
  width: 2rem;
  height: 2rem;
  color: #fff;
  background: #0f172a;
  border-radius: 50%;
  place-items: center;
}

.debug-variant__title {
  display: grid;
  min-width: 0;
}

.debug-variant__title small {
  overflow: hidden;
  color: #64748b;
  font-size: .72rem;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.debug-variant__price {
  font-size: .85rem;
  white-space: nowrap;
}

.debug-variant .accordion-body {
  padding: .9rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.debug-variant__meta,
.debug-room__ids,
.debug-item__facts {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .85rem;
  color: #64748b;
  font-size: .72rem;
}

.debug-source-details {
  margin-top: .75rem;
  padding: .5rem .7rem;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: .55rem;
}

.debug-source-details summary {
  color: #475569;
  font-size: .75rem;
  font-weight: 650;
  cursor: pointer;
}

.debug-room {
  overflow: hidden;
  background: #fff;
  border: 1px solid #dbe3ed;
  border-radius: .75rem;
}

.debug-room.is-unresolved,
.debug-item.is-unresolved {
  border-color: #dc3545;
}

.debug-room__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem .85rem .55rem;
}

.debug-room__eyebrow {
  display: block;
  margin-bottom: .15rem;
  color: #64748b;
  font-size: .65rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.debug-room__header h4 {
  margin: 0;
  font-size: .95rem;
}

.debug-room__ids {
  padding: 0 .85rem .7rem;
}

.debug-room__items {
  padding: .7rem .85rem;
  border-top: 1px solid #eef2f7;
}

.debug-room__items h5 {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .55rem;
  font-size: .75rem;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.debug-room__empty-item {
  margin: 0;
  color: #94a3b8;
  font-size: .75rem;
  font-style: italic;
}

.debug-item {
  padding: .65rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: .55rem;
}

.debug-item + .debug-item {
  margin-top: .45rem;
}

.debug-item__main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
}

.debug-item__title {
  display: flex;
  min-width: 0;
  gap: .5rem;
}

.debug-item__title > i {
  color: #6366f1;
}

.debug-item__title div {
  display: grid;
  min-width: 0;
}

.debug-item__title strong {
  font-size: .8rem;
}

.debug-item__title small {
  color: #64748b;
  font-size: .67rem;
  overflow-wrap: anywhere;
}

.debug-item__price {
  font-size: .78rem;
  white-space: nowrap;
}

.debug-item__facts {
  margin-top: .5rem;
}

.debug-inspector__empty {
  display: grid;
  min-height: 12rem;
  color: #94a3b8;
  place-items: center;
  align-content: center;
}

.debug-inspector__empty i { font-size: 2rem; }
.debug-inspector__empty p { margin: .5rem 0 0; }

.debug-component {
  padding: .7rem .8rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: .65rem;
}

.debug-component summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .7rem;
  cursor: pointer;
  list-style: none;
}

.debug-component summary::-webkit-details-marker { display: none; }

.debug-component summary > span:nth-child(2) {
  display: grid;
  min-width: 0;
}

.debug-component summary small {
  color: #64748b;
  font-size: .7rem;
}

.debug-component__position {
  display: grid;
  width: 1.7rem;
  height: 1.7rem;
  color: #475569;
  background: #e2e8f0;
  border-radius: .45rem;
  font-size: .72rem;
  place-items: center;
}

.debug-component__settings,
.debug-inspector__json {
  max-height: 55vh;
  margin: 0;
  padding: .8rem;
  overflow: auto;
  color: #dbeafe;
  background: #0f172a;
  border-radius: .65rem;
  font-size: .7rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.debug-component__settings {
  max-height: 16rem;
}

@media (max-width: 575.98px) {
  .debug-inspector-trigger span:not(.badge) { display: none; }
  .debug-inspector__summary span { font-size: .58rem; }
  .debug-inspector__state-grid { grid-template-columns: repeat(2, 1fr); }
  .debug-inspector__details > div { grid-template-columns: 7rem minmax(0, 1fr); }
  .debug-variant .accordion-button { grid-template-columns: auto minmax(0, 1fr) auto; }
  .debug-variant__price { display: none; }
}
