/* Quiet paper surfaces, a finished document as the main visual. */
.quote-work .workspace {
  grid-template-columns: minmax(330px, 440px) minmax(0, 1fr);
  align-items: start;
}
.quote-work .settings {
  max-height: 1030px;
  overflow-y: auto;
}
.quote-work .stage {
  min-height: 1030px;
}
.mobile-view-switch,
.mobile-save {
  display: none;
}
.quote-preview-wrap {
  padding: 22px;
}
#quote-preview {
  width: 100%;
  max-width: 580px;
  height: auto;
  box-shadow: 0 2px 10px #202a3010;
}
.quote-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--soft-line);
}
.quote-item .item-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}
.quote-item .item-heading input {
  width: 100%;
  min-width: 0;
}
.quote-item .row .field {
  margin-bottom: 0;
}
.quote-item input {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 9px;
  background: var(--input);
}
.quote-item .line-amount {
  text-align: right;
  font-size: 13px;
  color: var(--secondary);
  margin: 8px 0 0;
}
#add-item {
  margin: 12px 0;
}
.quote-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 0 0;
}
.quote-total strong {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}
.quote-work .file-picker {
  font-size: 13px;
  padding: 12px 8px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
}
.scan-pages {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}
.scan-page {
  display: flex;
  gap: 6px;
}
.scan-page .select-page {
  flex: 1;
  justify-content: flex-start;
  min-width: 0;
  font-size: 13px;
}
.scan-page [aria-current="true"],
.booth-photos [aria-pressed="true"] {
  border: 2px solid var(--blue);
  background: var(--blue-soft);
}
.scan-stage {
  min-height: 450px;
  padding: 24px;
  flex: 0;
}
#scan-canvas {
  max-width: 100%;
  max-height: 600px;
  object-fit: contain;
  touch-action: none;
  cursor: crosshair;
}
.booth-photos {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 12px 0;
}
.booth-photos button {
  padding: 3px;
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
}
.booth-photos img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 3px;
}
.booth-photos span {
  position: absolute;
  bottom: 3px;
  left: 3px;
  background: #242b30;
  color: white;
  font-size: 11px;
  padding: 2px 5px;
  border-radius: 3px;
}
.booth-stage {
  padding: 26px;
  background: #e9e8e3;
}
#booth-preview {
  max-height: 760px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  box-shadow: 0 4px 15px #202a3015;
}
.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin: 14px 0;
}
.check-line input {
  accent-color: var(--blue);
  width: 17px;
  height: 17px;
}
#camera-dialog {
  width: min(580px, calc(100% - 24px));
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  max-height: 95dvh;
  overflow: auto;
}
#camera-dialog::backdrop {
  background: #17232bd0;
}
.camera-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.camera-top h2 {
  margin: 0;
}
.camera-view {
  position: relative;
  aspect-ratio: 4/3;
  background: #20252a;
  overflow: hidden;
  border-radius: 6px;
}
#camera-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#camera-video.mirrored {
  transform: scaleX(-1);
}
#countdown {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 80px;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 14px #0009;
  pointer-events: none;
}
#camera-status {
  min-height: 1.4em;
}
@media (max-width: 850px) {
  .quote-work .workspace {
    grid-template-columns: 1fr;
  }
  .quote-work .stage {
    position: static;
  }
  .quote-work .settings {
    max-height: none;
  }
  .quote-work .stage {
    min-height: 0;
  }
  .mobile-view-switch {
    display: flex;
    margin-bottom: 12px;
  }
  .mobile-view-switch button {
    flex: 1;
  }
  .mobile-save {
    display: block;
  }
  .quote-work[data-view="edit"] .stage {
    display: none;
  }
  .quote-work[data-view="preview"] .settings {
    display: none;
  }
  #quote-preview {
    max-width: 500px;
  }
}
@media (max-width: 600px) {
  .quote-preview-wrap,
  .scan-stage,
  .booth-stage {
    padding: 15px;
  }
  .scan-stage {
    min-height: 280px;
  }
  #scan-canvas {
    max-height: 70dvh;
  }
  #booth-preview {
    max-height: 640px;
  }
  body:is([data-tool="document-scanner"], [data-tool="photo-booth"])
    .workspace {
    display: flex;
    flex-direction: column;
  }
  body:is([data-tool="document-scanner"], [data-tool="photo-booth"]) .settings {
    display: contents;
  }
  body:is([data-tool="document-scanner"], [data-tool="photo-booth"])
    .settings
    > * {
    order: 2;
    margin: 0;
    padding: 16px;
    border-bottom: 1px solid var(--soft-line);
  }
  body:is([data-tool="document-scanner"], [data-tool="photo-booth"])
    .settings
    > .group:first-child {
    order: 0;
  }
  body:is([data-tool="document-scanner"], [data-tool="photo-booth"]) .stage {
    order: 1;
  }
  .quote-work .settings {
    display: block;
  }
  .quote-work .stage {
    border-top: 1px solid var(--line);
  }
  .quote-total strong {
    font-size: 20px;
  }
}
