/*
 * AVS test/demo change-review interface.
 * This stylesheet is excluded from production deployment packages.
 */

[data-change-id] {
  position: relative;
}

.footer-vcard[data-change-id] {
  position: absolute;
}

.footer-copyright[data-change-id] {
  position: absolute;
}

body.avs-review-visible [data-change-id] {
  outline: 3px solid #ffd400;
  outline-offset: 0;
}

body.avs-review-visible [data-change-status='new'] {
  outline-color: #1e9b48;
}

body.avs-review-visible [data-change-status='removed'] {
  outline-color: #c62828;
}

.avs-change-removed-placeholder {
  background: #fff0ef;
  color: #641414;
  display: block;
  font-style: italic;
  margin: 8px 0;
  padding: 8px;
}

.avs-change-badge {
  background: #9d270f;
  border: 0;
  border-radius: 0 0 3px 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  color: #fff;
  cursor: pointer;
  display: block;
  font:
    700 12px/1.4 Arial,
    sans-serif;
  margin: 0;
  padding: 2px 6px;
  position: fixed;
  z-index: 99998;
}

.avs-change-badge-updated {
  background: #b36b00;
}

.avs-change-badge-new {
  background: #187a39;
}

.avs-change-badge-removed {
  background: #a51d1d;
}

body:not(.avs-review-visible) .avs-change-badge,
body:not(.avs-review-visible) .avs-change-menu-marker,
body:not(.avs-review-visible) .avs-change-removed-placeholder {
  display: none;
}

.avs-change-menu-marker {
  color: #ffd364;
  font-weight: 700;
  margin-left: 2px;
}

#avs-change-review {
  background: #f8f7f2;
  border: 5px solid #ff9800;
  border-radius: 7px;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.35);
  color: #25211c;
  font:
    14px/1.35 Arial,
    sans-serif;
  left: 14px;
  max-height: calc(100vh - 28px);
  overflow: auto;
  position: fixed;
  top: 14px;
  width: min(430px, calc(100vw - 28px));
  z-index: 99999;
}

.avs-review-toolbar {
  align-items: center;
  background: #5a3d19;
  color: #fff;
  display: flex;
  gap: 6px;
  padding: 6px;
  position: sticky;
  top: 0;
  z-index: 2;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.avs-review-grab {
  cursor: move;
  flex: 1;
  font-weight: 700;
  letter-spacing: 1px;
  touch-action: none;
  user-select: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avs-review-control {
  background: #fff;
  border: 1px solid #d5c6ad;
  border-radius: 3px;
  color: #3b2a17;
  cursor: pointer;
  font:
    700 12px/1 Arial,
    sans-serif;
  flex-shrink: 0;
  min-height: 28px;
  padding: 5px 8px;
}

#avs-change-review {
  box-sizing: border-box;
  height: auto;
  max-height: min(70vh, calc(100vh - 28px));
  padding: 0;
  width: min(680px, calc(100vw - 28px));
}

#avs-change-review.avs-review-minimized {
  height: auto;
}

.avs-review-step {
  font-size: 16px;
  min-width: 28px;
  padding-left: 6px;
  padding-right: 6px;
}

.avs-review-content {
  padding: 11px;
}

#avs-change-review.avs-review-minimized {
  overflow: hidden;
  width: min(300px, calc(100vw - 28px));
}

#avs-change-review.avs-review-minimized .avs-review-grab {
  flex: 0 0 auto;
  min-width: max-content;
  overflow: visible;
  text-overflow: clip;
}

#avs-change-review.avs-review-minimized .avs-review-content {
  display: none;
}

.avs-review-content h2,
.avs-review-content h3 {
  color: #3b2a17;
  font-family: Arial, sans-serif;
  margin: 0 0 8px;
}

.avs-review-content p {
  margin: 0 0 9px;
}

.avs-review-count {
  background: #efe4cf;
  border-radius: 3px;
  padding: 7px;
}

.avs-review-comparison {
  border-top: 1px solid #cbb99c;
  margin-top: 10px;
  padding-top: 10px;
}

.avs-review-columns {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.avs-review-value {
  background: #fff;
  border: 1px solid #d3c7b3;
  border-radius: 4px;
  min-width: 0;
  padding: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}

.avs-review-value strong {
  display: block;
  margin-bottom: 5px;
}

.avs-review-value mark {
  border-radius: 2px;
  color: inherit;
  font-weight: 700;
  padding: 0 1px;
}

.avs-diff-previous {
  background: #ffd4cc;
  box-shadow: inset 0 -2px 0 #ad2e17;
}

.avs-diff-current {
  background: #d5f2c7;
  box-shadow: inset 0 -2px 0 #33751d;
}

.avs-review-reference {
  color: #5c5448;
  font-size: 12px;
  margin-top: 7px;
}

.avs-review-technical {
  border-top: 1px solid #cbb99c;
  margin-top: 10px;
  padding-top: 10px;
}

.avs-review-external {
  border-bottom: 1px solid #cbb99c;
  margin-bottom: 10px;
  padding-bottom: 10px;
}

.avs-review-external > summary {
  cursor: pointer;
  font-weight: bold;
}

.avs-review-external-content {
  padding-top: 7px;
}

.avs-review-external-content h4 {
  font-size: 12px;
  margin: 8px 0 3px;
}

.avs-review-package-list {
  font-size: 11px;
  overflow-wrap: anywhere;
}

.avs-review-external-summary {
  background: #efe4cf;
  border-radius: 3px;
  padding: 7px;
}

.avs-review-exclusion-note {
  color: #6b6258;
  font-size: 11px;
  font-style: italic;
}

.avs-review-technical ul {
  list-style: disc outside !important;
  margin: 5px 0 0 18px;
  padding: 0;
}

.avs-review-technical li {
  display: list-item !important;
  list-style: disc outside !important;
  margin: 0 0 4px;
  padding: 0;
}

.avs-review-nerd {
  display: inline-block;
  cursor: help;
}

.avs-review-severity {
  color: #6b6258;
  font-size: 11px;
  margin-top: 12px;
}

.avs-review-severity summary {
  cursor: pointer;
  font-style: italic;
  width: fit-content;
}

.avs-review-severity-key {
  font-size: 12px;
  margin-top: 6px !important;
}

.avs-change-focus {
  animation: avs-change-focus-pulse 850ms ease-in-out 3;
  border-radius: 3px;
  outline: 5px solid #ffb000 !important;
  outline-offset: 5px !important;
}

@keyframes avs-change-focus-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 2px rgba(255, 176, 0, 0.35),
      0 0 8px 3px rgba(255, 176, 0, 0.55);
  }
  50% {
    box-shadow:
      0 0 0 5px rgba(255, 176, 0, 0.55),
      0 0 18px 8px rgba(255, 176, 0, 0.85);
  }
}

@media only screen and (max-width: 520px) {
  #avs-change-review {
    font-size: 13px;
    max-height: 38vh;
  }

  .avs-review-columns {
    grid-template-columns: 1fr;
  }
}

/* Review-only decision, feedback, and submission controls. */
.avs-review-submit,
.avs-review-approve-all,
.avs-review-clear-reviewed,
.avs-review-actions button,
.avs-review-feedback-dialog button {
  align-items: center;
  color: #111;
  display: inline-flex;
  justify-content: center;
}

.avs-review-submit svg,
.avs-review-approve-all svg,
.avs-review-clear-reviewed svg,
.avs-review-actions svg,
.avs-review-feedback-dialog svg {
  fill: currentColor;
  height: 17px;
  pointer-events: none;
  width: 17px;
}

.avs-review-submit,
.avs-review-approve-all,
.avs-review-clear-reviewed {
  min-width: 28px;
  padding: 4px;
}

.avs-review-submit {
  margin-left: auto;
}

.avs-review-actions {
  display: inline-flex;
  gap: 3px;
  margin: 0 6px 0 0;
  vertical-align: middle;
}

.avs-review-actions button,
.avs-review-feedback-dialog button {
  background: #fff;
  border: 1px solid #8c8376;
  border-radius: 3px;
  cursor: pointer;
  height: 27px;
  padding: 4px;
  width: 27px;
}

.avs-review-actions button:hover,
.avs-review-actions button:focus-visible,
.avs-review-feedback-dialog button:hover,
.avs-review-feedback-dialog button:focus-visible {
  background: #fff3c4;
  outline: 2px solid #111;
}

.avs-review-actions .avs-review-action-selected {
  background: #cfe8c8;
  border-color: #225b17;
  box-shadow: inset 0 0 0 1px #225b17;
}

.avs-review-actions .avs-review-feedback-present {
  background: #d7e9fb;
  border-color: #1b5687;
}

.avs-review-comparison > .avs-review-actions {
  display: flex;
  margin-top: 8px;
}

.avs-review-baseline-note {
  color: #6b6258;
  font-size: 12px;
  font-style: italic;
}

.avs-review-feedback-dialog {
  background: #f8f7f2;
  border: 4px solid #ff9800;
  border-radius: 6px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.45);
  box-sizing: border-box;
  color: #25211c;
  left: 50%;
  max-width: calc(100vw - 28px);
  padding: 34px 12px 12px;
  position: fixed;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 100001;
}

.avs-review-feedback-dialog[hidden] {
  display: none;
}

.avs-review-feedback-dialog label {
  display: block;
  font:
    700 14px/1.3 Arial,
    sans-serif;
  margin-bottom: 5px;
}

.avs-review-feedback-dialog textarea {
  box-sizing: border-box;
  display: block;
  font:
    14px/1.35 Arial,
    sans-serif;
  height: 72px;
  max-height: 70vh;
  max-width: calc(100vw - 60px);
  min-height: 72px;
  min-width: 192px;
  resize: both;
  width: 192px;
}

.avs-review-feedback-close {
  position: absolute;
  right: 6px;
  top: 6px;
}

.avs-review-feedback-save {
  float: right;
  margin-top: 7px;
}

#avs-change-review.avs-review-minimized .avs-review-submit,
#avs-change-review.avs-review-minimized .avs-review-approve-all,
#avs-change-review.avs-review-minimized .avs-review-clear-reviewed {
  display: none;
}

.avs-review-tally {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px 7px;
}

.avs-review-tally > span {
  align-items: center;
  display: inline-flex;
  gap: 2px;
  white-space: nowrap;
}

.avs-review-tally svg {
  fill: currentColor;
  height: 15px;
  width: 15px;
}
