.participant-photo-box {
  display: grid;
  gap: 0.65em;
}

.participant-photo-preview {
  width: 112px;
  aspect-ratio: 7 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(31, 73, 125, 0.35);
  background: #f7f7f7;
  color: #555;
  font-size: 0.9em;
  text-align: center;
}

.participant-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.participant-photo-actions,
.participant-photo-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6em;
}

.participant-photo-button,
.participant-photo-modal-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6em;
  padding: 0.6em 0.85em;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: var(--accent);
  font-weight: 700;
  cursor: pointer;
}

.participant-photo-button input {
  display: none;
}

.participant-photo-modal[hidden] {
  display: none;
}

body.participant-photo-modal-open {
  overflow: hidden;
}

.participant-photo-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  box-sizing: border-box;
  height: 100vh;
  height: 100dvh;
  padding: max(.4em, env(safe-area-inset-top)) max(.4em, env(safe-area-inset-right)) max(.4em, env(safe-area-inset-bottom)) max(.4em, env(safe-area-inset-left));
  background: rgba(0, 0, 0, 0.78);
}

.participant-photo-dialog {
  box-sizing: border-box;
  width: min(420px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.8em;
  padding: 1em;
  background: #fff;
  overflow: auto;
  margin-block: auto;
}

.participant-photo-dialog h2 {
  margin: 0;
  color: var(--accent-dark);
}

.participant-photo-crop-frame {
  position: relative;
  width: min(330px, 82vw, 48.2222vh);
  aspect-ratio: 7 / 9;
  flex: 0 0 auto;
  align-self: center;
  overflow: hidden;
  background: #111;
  touch-action: none;
}

.participant-photo-crop-frame img {
  display: block;
  max-width: 100%;
}

.participant-photo-crop-frame .participant-selfservice-effect-preview {
  position: absolute;
  inset: 0;
  z-index: 8;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  pointer-events: none;
}

.participant-photo-crop-frame .participant-selfservice-effect-preview[hidden] {
  display: none;
}

.participant-photo-crop-frame .cropper-container,
.participant-photo-crop-frame .cropper-wrap-box,
.participant-photo-crop-frame .cropper-canvas,
.participant-photo-crop-frame .cropper-drag-box,
.participant-photo-crop-frame .cropper-crop-box,
.participant-photo-crop-frame .cropper-face {
  touch-action: none;
}

.participant-photo-processing {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .8em;
  padding: 1em;
  text-align: center;
  color: #fff;
  background: rgba(12, 26, 45, 0.76);
  font-weight: 700;
}

.participant-photo-processing-spinner {
  width: 2.2em;
  height: 2.2em;
  border: .3em solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: participant-photo-spin .8s linear infinite;
}

@keyframes participant-photo-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .participant-photo-processing-spinner { animation-duration: 1.6s; }
}

.participant-photo-processing[hidden] {
  display: none;
}

.participant-photo-hint {
  min-height: 1.35em;
  margin: -0.25em 0 0;
  color: #555;
  font-size: 0.95em;
  text-align: center;
}

.participant-photo-hint-notouch {
  display: none;
}

.no-touch .participant-photo-hint-touch {
  display: none;
}

.no-touch .participant-photo-hint-notouch {
  display: inline;
}

.participant-photo-adjustments {
  display: none;
  justify-content: center;
  gap: 0.6em;
}

.no-touch .participant-photo-adjustments {
  display: flex;
}

.participant-photo-adjustments button {
  width: 3em;
  min-height: 2.6em;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: rgb(31, 73, 125);
  font: inherit;
  font-size: 1.15em;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .participant-photo-hint-touch {
    display: none;
  }

  .participant-photo-hint-notouch {
    display: inline;
  }

  .participant-photo-adjustments {
    display: flex;
  }
}

.participant-photo-modal-actions {
  justify-content: flex-end;
}

@media (max-width:600px){
  .booking-details-grid {
    grid-template-columns: 1fr;
  }

  .participant-invite-row,
  .participant-invite-share-row,
  .booking-rebook-row {
    grid-template-columns: 1fr;
  }

  .participant-invite-training-card,
  .participant-invite-card,
  .participant-invite-form-card {
    flex-basis: calc(100% - 20px);
  }
}
