.ocr-box {
  background: #faf9f7;
  border: 1px solid #dfdcd8;
  border-radius: 14px;
  padding: clamp(14px, 3vw, 24px);
  margin: 0 0 24px;
  color: #242424;
}
.ocr-actions {
  display: flex;
  gap: 8px 14px;
  align-items: center;
  flex-wrap: wrap;
}
.ocr-box button,
.ocr-manual {
  min-height: 44px;
  padding: 10px 15px;
  border-radius: 12px;
  font: inherit;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ocr-primary {
  color: #161616;
  background: var(--brand-orange, #f60);
  border: 1px solid transparent;
}
.ocr-start {
  display: none;
}
@container offer-page (min-width: 1040px) {
  #offer-form {
    position: relative;
  }
  .ocr-box:has(.ocr-body:empty):has(.ocr-status:empty) .ocr-start {
    display: flex;
    position: absolute;
    inset-inline-end: calc(100% + 9px);
    width: max-content;
    max-width: calc(50vw - 50% - 36px);
    gap: 7px;
    align-items: center;
    color: var(--ink);
    font-size: 15px;
    white-space: nowrap;
  }
  .ocr-start::after {
    content: "";
    width: 101px;
    height: 18px;
    transform: translateY(8px);
    background: url("./scan-arrow.svg") center / 100% 100% no-repeat;
  }
}
.ocr-secondary {
  color: inherit;
  background: #fff;
  border: 1px solid #bbb;
}
.ocr-manual {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.ocr-box p {
  font-size: 0.875rem;
  line-height: 1.45;
}
.ocr-hint {
  margin: 12px 0 0;
}
.ocr-status:empty {
  display: none;
}
.ocr-preview {
  margin: 12px 0;
}
.ocr-preview canvas {
  display: block;
  max-width: 100%;
  max-height: 210px;
  border-radius: 4px;
}
.ocr-box progress {
  width: 100%;
  height: 0.6rem;
  accent-color: #d95b00;
  margin: 4px 0 12px;
}
.ocr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 12px;
  margin: 12px 0 16px;
}
.ocr-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.875rem;
  font-weight: 600;
  justify-content: flex-end;
}
.ocr-grid small {
  font-weight: 400;
}
.ocr-grid input {
  font: inherit;
  font-weight: 400;
  min-width: 0;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #aaa;
  border-radius: 7px;
  background: #fff;
  color: #1c1c1c;
}
.ocr-box [hidden] {
  display: none !important;
}
.ocr-preview canvas[tabindex] {
  cursor: crosshair;
  touch-action: manipulation;
  outline-offset: 3px;
}
