/* GENERATED FILE - DO NOT EDIT.
   Source: shared/photo-crop.css - run `npm run sync:shared` after editing. */

/* Crop sheet for profile photos (circle), trip covers (16:9) and group photos (4:3). */

.lb-crop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  background: #1a1410;
  color: #f7f1e6;
  font-family: var(--sans, "Outfit", system-ui, sans-serif);
}

/* The sheet is a modal <dialog> (top layer, above an open edit window): full screen, no dialog frame. */
dialog.lb-crop {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
}
dialog.lb-crop:not([open]) {
  display: none;
}
dialog.lb-crop::backdrop {
  background: #1a1410;
}

.lb-crop-head {
  padding: calc(0.85rem + var(--safe-top, env(safe-area-inset-top, 0px))) 1.1rem 0.35rem;
  text-align: center;
}

.lb-crop-head h2 {
  margin: 0;
  font-family: var(--serif, "Fraunces", Georgia, serif);
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.lb-crop-head p {
  margin: 0.35rem 0 0;
  color: rgba(247, 241, 230, 0.72);
  font-size: 0.92rem;
}

.lb-crop-stage {
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 0.6rem 1rem;
}

.lb-crop-frame {
  position: relative;
  overflow: hidden;
  background: #13251e;
  box-shadow: 0 0 0 1px rgba(247, 241, 230, 0.35);
  touch-action: none;
  user-select: none;
}

.lb-crop-frame.is-avatar {
  width: min(72vw, 280px);
  aspect-ratio: 1;
  border-radius: 50%;
}

/* Trip cover: landscape 16:9, the shape of every cover card and banner. */
.lb-crop-frame.is-cover {
  width: min(88vw, 560px);
  aspect-ratio: 16 / 9;
  border-radius: 14px;
}

.lb-crop-frame.is-group {
  width: min(82vw, 320px);
  aspect-ratio: 4 / 3;
  border-radius: 0.35rem;
}

.lb-crop-frame canvas {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  transform-origin: 0 0;
  pointer-events: none;
  opacity: 0;
}

.lb-crop-frame.is-ready canvas {
  opacity: 1;
}

.lb-crop-wait {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.65rem;
  margin: 0;
  padding: 0.8rem;
  color: #f7f1e6;
  font-size: 0.82rem;
  line-height: 1.2;
  text-align: center;
}

.lb-crop-wait[hidden] {
  display: none;
}

.lb-crop-spin {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  border: 2px solid rgba(247, 241, 230, 0.28);
  border-top-color: #f7f1e6;
  animation: lb-crop-spin 0.7s linear infinite;
}

@keyframes lb-crop-spin {
  to {
    transform: rotate(360deg);
  }
}

.lb-crop-zoom {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  padding: 0.2rem 1.25rem 0.85rem;
  font-size: 0.85rem;
  color: rgba(247, 241, 230, 0.8);
}

.lb-crop-zoom input[type="range"] {
  width: 100%;
  accent-color: #f7f1e6;
}

.lb-crop-bar {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 0.65rem;
  padding: 0.35rem 1rem calc(0.9rem + var(--safe-bot, env(safe-area-inset-bottom, 0px)));
}

.lb-crop-bar button {
  border: 0;
  border-radius: 999px;
  min-height: 3rem;
  font: 600 0.95rem/1 var(--sans, "Outfit", system-ui, sans-serif);
  cursor: pointer;
}

.lb-crop-cancel {
  background: transparent;
  color: #f7f1e6;
}

.lb-crop-use {
  background: #f7f1e6;
  color: #1a1410;
}

.lb-crop-use:disabled,
.lb-crop-cancel:disabled {
  opacity: 0.45;
}

.lb-crop-error {
  margin: 0;
  padding: 0 1.25rem 0.8rem;
  text-align: center;
  color: #f0c7a0;
  font-size: 0.92rem;
}

/* Desktop (web audit 2026-10-20 W-66): a centred window, not the phone's full screen — a 1240 px zoom slider and a
   720 px "Use photo" read as broken on a wide screen. Phones (and the app) keep the full-screen sheet. */
@media (min-width: 40rem) {
  dialog.lb-crop {
    width: min(44rem, calc(100vw - 3rem));
    height: fit-content;
    max-height: calc(100dvh - 3rem);
    margin: auto;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  }
  dialog.lb-crop::backdrop {
    background: rgba(20, 16, 12, 0.72);
  }
  dialog.lb-crop .lb-crop-head {
    padding-top: 1.2rem;
  }
  dialog.lb-crop .lb-crop-stage {
    padding: 1rem 1.5rem;
  }
  dialog.lb-crop .lb-crop-zoom {
    padding: 0.2rem 1.5rem 0.6rem;
  }
  dialog.lb-crop .lb-crop-bar {
    display: flex;
    justify-content: flex-end;
    padding: 0.5rem 1.5rem 1.2rem;
  }
  dialog.lb-crop .lb-crop-bar button {
    min-width: 8.5rem;
    min-height: 2.75rem;
    padding: 0 1.4rem;
  }
  dialog.lb-crop .lb-crop-cancel {
    margin-right: auto;
    box-shadow: inset 0 0 0 1px rgba(247, 241, 230, 0.45);
  }
}
