.wall-photograph-field {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 16px;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

.wall-photograph-legend,
.wall-photograph-slot h2,
.wall-photograph-error-summary h2,
.wall-photograph-empty h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
}

.wall-photograph-help,
.wall-photograph-empty p,
.wall-photograph-error-summary p,
.wall-photograph-error-summary ol,
.wall-photograph-slot p {
  margin: 0;
  color: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
}

.wall-photograph-error-summary,
.wall-photograph-empty {
  display: grid;
  min-width: 0;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--border-dark);
  background-color: var(--surface-dark);
  overflow-wrap: anywhere;
}

.wall-photograph-error-summary[hidden] {
  display: none;
}

body.light-mode .wall-photograph-error-summary,
body.light-mode .wall-photograph-empty {
  border-color: var(--border-light);
  background-color: var(--surface-light);
}

.wall-photograph-error-summary:focus-visible,
.wall-photograph-field :is(button, input):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

body.light-mode .wall-photograph-error-summary:focus-visible,
body.light-mode .wall-photograph-field :is(button, input):focus-visible {
  outline-color: var(--accent-light);
}

.wall-photograph-initial-control,
.wall-photograph-replacement-control {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.wall-photograph-file-label,
.wall-photograph-status {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.wall-photograph-file-input {
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  font-size: 16px;
}

.wall-photograph-slot-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wall-photograph-slot {
  display: grid;
  align-content: start;
  min-width: 0;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--border-dark);
  background-color: var(--surface-dark);
  overflow-wrap: anywhere;
}

body.light-mode .wall-photograph-slot {
  border-color: var(--border-light);
  background-color: var(--surface-light);
}

.wall-photograph-slot-rejected,
.wall-photograph-slot-removed {
  border-left: 3px solid var(--error-dark);
}

body.light-mode .wall-photograph-slot-rejected,
body.light-mode .wall-photograph-slot-removed {
  border-left-color: var(--error-light);
}

.wall-photograph-slot.is-replacing {
  border-left: 3px solid var(--accent);
}

body.light-mode .wall-photograph-slot.is-replacing {
  border-left-color: var(--accent-light);
}

.wall-photograph-preview {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 320px;
  margin-inline: auto;
  object-fit: contain;
}

.wall-photograph-source-filename,
.wall-photograph-reason,
.wall-photograph-error-summary a {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.wall-photograph-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
}

.wall-photograph-actions button {
  min-width: 44px;
  min-height: 44px;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-dark);
  background-color: var(--surface-dark);
  color: var(--text-dark);
  font: inherit;
  overflow-wrap: anywhere;
  cursor: pointer;
}

body.light-mode .wall-photograph-actions button {
  border-color: var(--border-light);
  background-color: var(--surface-light);
  color: var(--text-light);
}

.wall-photograph-primary-action {
  min-width: 44px;
  min-height: 44px;
  justify-self: start;
}

.wall-photograph-processing-status {
  min-height: 24px;
  margin: 0;
}

.wall-photograph-missing {
  display: grid;
  place-content: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border-dark);
  border-left: 3px solid var(--error-dark);
  background-color: var(--surface-dark);
  color: var(--text-dark);
  text-align: center;
  overflow-wrap: anywhere;
}

.wall-photograph-missing[data-wall-photograph-ratio-width][data-wall-photograph-ratio-height] {
  aspect-ratio: attr(data-wall-photograph-ratio-width type(<number>)) / attr(data-wall-photograph-ratio-height type(<number>));
}

body.light-mode .wall-photograph-missing {
  border-color: var(--border-light);
  border-left-color: var(--error-light);
  background-color: var(--surface-light);
  color: var(--text-light);
}

.wall-photograph-missing-without-ratio {
  min-height: 160px;
}

.wall-photograph-missing-position {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}
