.photo-editor {
  padding: clamp(16px, 3vw, 28px);
}

.photo-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px 24px;
}

.photo-toolbar-actions,
.photo-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.photo-toolbar-actions {
  margin-inline-start: auto;
}

.photo-toolbar-group {
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.photo-toolbar-group span {
  font-size: 14px;
}

@media (max-width: 600px) {
  .photo-toolbar {
    display: grid;
  }

  .photo-toolbar-group .button,
  .photo-toolbar-actions .button {
    width: 100%;
  }

  .photo-toolbar-actions {
    margin-inline-start: 0;
  }
}

.photo-toolbar-group span,
.photo-status,
.photo-card-status {
  color: #5f625d;
  overflow-wrap: anywhere;
}

.photo-status {
  margin: 14px 0 0;
}

.photo-status:empty,
.photo-grid:empty {
  display: none;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 16px;
  padding: 0;
  margin: 20px 0 0;
  list-style: none;
}

.photo-card {
  max-width: 440px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dedfdc;
  border-radius: 12px;
}

.photo-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1600 / 1237;
  object-fit: contain;
  background: #f1f1f2;
}

.photo-card-body {
  display: grid;
  gap: 9px;
  padding: 14px;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.photo-card-actions .button {
  text-decoration: none;
}

.photo-result-dialog {
  box-sizing: border-box;
  width: min(1200px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  padding: 16px;
  border: 0;
  border-radius: 12px;
  background: #fff;
}

.photo-result-dialog::backdrop {
  background: #171719c7;
}

.photo-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.photo-result-header h2 {
  margin: 0;
  font-size: 18px;
}

.photo-result-dialog img {
  display: block;
  width: 100%;
  max-height: calc(100dvh - 120px);
  object-fit: contain;
}
