.layout-photo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0 28px;
  margin-block: clamp(20px, 3vw, 38px);
  padding: clamp(20px, 2.8vw, 38px);
  border: 1px solid #d6e2e4;
  border-radius: 10px;
  background: #edf4f4;
  color: #183b4b;
}
.layout-photo h2, #photo-dialog h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.15;
}
.layout-photo p {
  max-width: 54ch;
  margin: 6px 0 0;
  color: #405762;
  font-size: 1rem;
  line-height: 1.5;
}
.layout-photo-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; }
.layout-photo .photo-feedback { grid-column: 1 / -1; margin-top: 12px; font-weight: 550; }
.photo-feedback:empty, #photo-error:empty, #photo-state:empty, #photo-reference:empty { display: none; }
.photo-primary, .photo-secondary {
  display: inline-flex; justify-content: center; align-items: center; gap: 9px;
  min-height: 45px; padding: 10px 20px;
  border: 1px solid transparent; border-radius: 24px;
  background: #125682; color: white; font: inherit; font-weight: 630; line-height: 1.35;
}
.photo-primary:enabled:hover { background: #0b4469; }
.photo-primary:disabled { opacity: .6; cursor: wait; }
.photo-secondary {
  background: #edf4f4; color: #164861; border-color: #b9ced5;
}
.photo-email, .photo-shortcut, #photo-retake {
  display: inline-flex; align-items: center; min-height: 44px;
  color: #155273; font: inherit; font-weight: 570;
  text-decoration: underline; text-underline-offset: .2em;
}
.layout-request-panel .photo-shortcut { display: flex; width: fit-content; }
.layout-photo :is(a,button):focus-visible, #photo-dialog :is(button,input,textarea,a):focus-visible {
  outline: 3px solid #2977a1; outline-offset: 3px;
}
#photo-dialog {
  width: min(500px, calc(100% - 24px)); max-width: none;
  max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain;
  margin: auto; padding: clamp(18px, 3.5vw, 28px); border: 1px solid #ccd6d7; border-radius: 14px;
  background: #faf9f6; color: #202b30; box-shadow: 0 24px 75px #14263236;
}
#photo-dialog::backdrop { background: rgb(17 35 44 / 56%); }
.photo-dialog-head, .photo-review-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
#photo-close { flex: none; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; font-size: 1.7rem; line-height: 1; }
#photo-dialog h3 { margin: 0; font-size: 1.08rem; line-height: 1.3; }
#photo-dialog p { margin: 9px 0 14px; font-size: .96rem; line-height: 1.5; color: #465b65; }
#photo-state { font-weight: 560; }
#photo-video, #photo-preview {
  display: block; width: 100%; max-height: 42dvh; border-radius: 7px; object-fit: contain; background: #132834;
}
#photo-dialog #photo-reference { font-weight: 650; color: #183c50; overflow-wrap: anywhere; }
#photo-dialog #photo-error { color: #822f20; }
#photo-form { margin: 0; }
.photo-fields { display: grid; gap: 12px; margin-block: 16px; }
.photo-fields label { font-size: .95rem; font-weight: 620; }
.photo-fields label span { font-weight: 400; color: #52616a; }
.photo-fields :is(input,textarea) {
  display: block; width: 100%; min-height: 44px; margin-top: 4px; padding: 9px 11px;
  border: 1px solid #a5b4ba; border-radius: 5px; background: #fff; color: #202b30;
  font: inherit; font-size: 1rem; font-weight: 400; resize: vertical;
}
#photo-retake { padding-inline: 6px; }
.photo-honeypot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
#photo-dialog-email { margin-top: 6px; }
#photo-dialog [hidden], .layout-photo [hidden] { display: none !important; }
@media (max-width: 720px) {
  .layout-photo { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .layout-photo .photo-feedback { margin-top: 0; }
}
@media print { .layout-photo, #photo-dialog, .photo-shortcut { display: none !important; } }
/* The camera follows the Workbench finish selected in the planner. */
body[data-studio=workbench] .layout-photo {
  grid-template-columns: minmax(0,1fr);
  gap: 10px; margin: 12px 0; padding: 15px 16px;
  color: var(--studio-ink); border-color: var(--studio-rule);
  background: var(--wb-pearl,var(--studio-panel));
  box-shadow: inset 0 1px #fffc;
}
body[data-studio=workbench] .layout-photo h2 { font-size: 1.1rem; }
body[data-studio=workbench] .layout-photo p { color: var(--studio-muted); font-size: .93rem; }
body[data-studio=workbench] .layout-photo-actions { column-gap: 13px; }
body[data-studio=workbench] .layout-photo .photo-feedback { margin: 0; }
body[data-studio=workbench] :is(.layout-photo,#photo-dialog) .photo-primary {
  color: var(--studio-ink); border-color: var(--studio-blue);
  background: var(--wb-selected,var(--studio-rail));
  box-shadow: var(--wb-glint,inset 0 1px #fff);
  border-radius: 7px; padding: 9px 13px;
}
body[data-studio=workbench] :is(.layout-photo,#photo-dialog) .photo-email,
body[data-studio=workbench] #photo-retake { color: var(--studio-blue); }
body[data-studio=workbench] #photo-dialog {
  background: var(--wb-frost,var(--studio-panel)); color: var(--studio-ink); border-color: var(--studio-rule);
}
body[data-studio=workbench] #photo-dialog p { color: var(--studio-muted); }
body[data-studio=workbench] #photo-dialog h2 { font-size: 1.45rem; }
body[data-studio=workbench] :is(#photo-video,#photo-preview) { background: var(--studio-rail); }
body[data-studio=workbench] #photo-dialog .photo-secondary { color: var(--studio-ink); border-color: var(--studio-rule); background: var(--wb-pearl,var(--studio-panel)); }
body[data-studio=workbench] #photo-dialog #photo-error { color: #85261c; }
@media print { body #different-layout, body #photo-dialog { display: none !important; } }
