/* photo-capture.css – styles of the reusable photo-capture component.
   All classes are prefixed "pc-" to avoid clashes with the host app. */

.pc {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 320px;
}

/* 1. Source */
.pc-source {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: safe center;   /* scrolls from the top when the content is taller */
  min-height: 0;
  overflow-y: auto;
  gap: 16px;
  padding: 24px 16px;
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}

.pc-hint {
  text-align: center;
  opacity: 0.7;
  margin-bottom: 8px;
}

.pc-big-btn {
  min-height: 72px;
  font-size: 1.15rem;
}

/* 2./3. Stage: cropper or result image, fills the free height */
.pc-stage {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  overflow: hidden;
  background: #000;
}

.pc-crop-img {
  display: block;
  max-width: 100%;       /* required by Cropper.js */
}

.pc-stage--result {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pc-result-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.pc-info {
  padding: 8px 16px;
  font-size: 16px;
  line-height: 1.5;
  text-align: center;
  min-height: 2.5em;
}

/* Bottom action bar – large touch targets within thumb reach */
.pc-bar {
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  gap: 4px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.pc-bar .q-btn {
  flex: 1 1 auto;      /* width follows the label, so long words get the space of short ones */
  min-width: 0;
  min-height: 56px;
  max-width: 140px;
  padding: 4px 2px;
}

/* Up to five buttons (batch) must fit a 360 px wide phone */
.pc-bar .q-btn .block {
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Settings bottom sheet */
.pc-settings {
  width: 100%;
  max-width: 560px;
}

/* Long settings (date stamp) scroll inside the sheet */
.pc-settings {
  max-height: 85vh;
  overflow-y: auto;
}

/* photo-settings form */
.ps-note {
  opacity: 0.6;
}

/* Batch summary: error list */
.pc-errors {
  max-height: 30vh;
  overflow-y: auto;
  border-radius: 4px;
}
