/* Order view (details) */
#orderViewPanel[hidden] {
  display: none !important;
}

#orderViewTitle {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.orders-view-title-tags {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-start;
}

#orderViewTopbar .admin-view-toolbar-actions {
  justify-content: flex-end;
}

#orderViewTopbar .orders-view-title-tags {
  justify-content: flex-end;
}

.orders-view-tagbtn {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  color: inherit;
  -webkit-appearance: none;
  appearance: none;
}

/* Tag colors come from `status-tags.css`. */

.orders-view-loading {
  padding: 8px 2px;
}

.orders-view-tagbtn:focus-visible {
  outline: 2px solid var(--admin-accent-focus);
  outline-offset: 3px;
  border-radius: 999px;
}

/* Status popup styles live in `status-popup.css`. */

.orders-view-changelog {
  display: grid;
  gap: 8px;
}

.orders-view-changelog-empty {
  padding: 10px 12px;
  border: 1px dashed var(--admin-border);
  border-radius: var(--r);
  color: var(--admin-muted);
  background: rgba(255, 255, 255, 0.6);
  font-weight: var(--admin-fw-medium);
}

.orders-view-changelog-item {
  padding: 10px 12px;
  border: 1px solid var(--admin-border);
  border-radius: var(--r);
  background: #fff;
  height: 50px;
  display: grid;
  gap: 8px;
}

.orders-view-changelog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.orders-view-changelog-title {
  font-weight: 400;
  color: var(--admin-text);
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  line-height: 1.2;
}

.orders-view-changelog-prefix {
  display: inline-flex;
  align-items: center;
  font-weight: var(--admin-fw-semibold);
}

.orders-view-changelog-meta {
  color: var(--admin-muted);
  font-weight: var(--admin-fw-medium);
  font-size: 12px;
  white-space: nowrap;
}

.orders-view-changelog-top .user-profile-badge {
  align-items: center;
  margin-left: auto;
  flex: 0 0 auto;
}

.orders-view-changelog-top .user-profile-badge__body {
  justify-items: start;
  text-align: right;
}

.orders-view-changelog-diff {
  display: grid;
  gap: 4px;
  color: var(--admin-muted);
  font-weight: var(--admin-fw-medium);
  font-size: 12px;
}

.orders-view-changelog-from,
.orders-view-changelog-to {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 8px;
}

.orders-view-changelog-k {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: var(--admin-fw-semibold);
  color: var(--admin-muted);
  font-size: 11px;
}

.orders-view-changelog-v {
  color: var(--admin-text);
  font-weight: var(--admin-fw-medium);
  word-break: break-word;
}

.orders-view-changelog-inline {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 2px 7px;
  border-radius: 8px;
  background: rgba(96, 100, 108, 0.1);
  line-height: 1.45;
  word-break: break-word;
  overflow-wrap: anywhere;
  vertical-align: baseline;
}

.orders-view-changelog-inline.old {
  color: var(--admin-muted);
  font-weight: 500;
}

.orders-view-changelog-inline.new {
  color: var(--admin-text);
  font-weight: var(--admin-fw-semibold);
}

.orders-view-changelog-inline.is-empty,
.orders-view-changelog-inline.old.is-empty,
.orders-view-changelog-inline.new.is-empty {
  color: var(--admin-muted);
  font-weight: var(--admin-fw-medium);
}

.orders-view-changelog-v.is-empty {
  color: var(--admin-muted);
  font-weight: var(--admin-fw-medium);
}

@media (max-width: 720px) {
  .orders-view-changelog-top {
    display: grid;
  }

  .orders-view-changelog-top .user-profile-badge {
    margin-left: 0;
  }

  .orders-view-changelog-top .user-profile-badge__body {
    justify-items: start;
    text-align: left;
  }
}

.copy-btn {
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}
