/* Keep long localized labels inside the form at every viewport width. */
.photo-modal__card > *,
.photo-modal__details,
.whatsapp-form { min-width: 0; }
.whatsapp-form > div { display: flex; flex-direction: column; gap: 10px; }
.whatsapp-form input { flex: none; width: 100%; min-width: 0; min-height: 50px; box-sizing: border-box; font-size: 16px; border-radius: 6px; }
.whatsapp-form button { flex: 0 0 auto; min-height: 48px; border-radius: 6px; }
.whatsapp-note, .whatsapp-success { overflow-wrap: anywhere; }

@media (max-width: 850px) {
  .photo-modal {
    padding: 12px;
    padding-top: max(12px, env(safe-area-inset-top));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
  .photo-modal__card {
    display: block;
    width: 100%;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scroll-padding: 20px;
  }
  .photo-modal__image-wrap {
    height: clamp(150px, 30svh, 280px);
    min-height: 0;
  }
  .photo-modal__image-wrap .photo-modal__image,
  .photo-modal.is-visible .photo-modal__image-wrap:not(.is-revealed) .photo-modal__image {
    height: 100% !important;
    min-height: 0;
    max-height: none;
  }
  .photo-modal__details { padding: 22px 18px 26px; }
  .photo-modal h3 { font-size: clamp(24px, 6.5vw, 32px); line-height: 1.15; margin-bottom: 22px; overflow-wrap: break-word; }
  .whatsapp-form > div { display: flex; flex-direction: column; gap: 10px; }
  .whatsapp-form input { flex: none; width: 100%; min-height: 50px; padding: 13px 12px; box-sizing: border-box; }
  .whatsapp-form button { width: 100%; min-height: 48px; padding: 12px; font-size: 16px; white-space: normal; }
  .whatsapp-form label { font-size: 13px; letter-spacing: .2px; }
  .whatsapp-note, .whatsapp-success { font-size: 12px; line-height: 1.5; }
  .photo-modal__close { width: 44px; height: 44px; right: 10px; top: 10px; }
  .photo-reveal-hint { left: 12px; right: 12px; bottom: 12px; }
  .profile-gate__card, .unlock-card { max-height: calc(100dvh - 28px); overflow-y: auto; }
}

.whatsapp-form button{width:100%;padding:13px 16px;font-size:16px}.whatsapp-fallback{display:inline-block;margin-top:12px;color:#75ee98;font-size:13px}.whatsapp-fallback[hidden]{display:none}

/* Let portrait photographs use the full mobile card width. */
@media (max-width:850px) {
  .photo-modal__image-wrap {
    height:auto;
    min-height:0;
    background:#17111e;
  }
  .photo-modal__image-wrap .photo-modal__image,
  .photo-modal.is-visible .photo-modal__image-wrap:not(.is-revealed) .photo-modal__image {
    width:100%;
    height:auto !important;
    aspect-ratio:4 / 5;
    object-fit:cover !important;
    object-position:center 25% !important;
    min-height:0;
    max-height:none;
  }
  .photo-reveal-hint {
    position:static;
    margin:0;
    padding:12px 18px;
    border:0;
    border-radius:0;
    background:#21192a;
    color:#d5ccdf;
    font-size:12px;
    line-height:1.5;
    backdrop-filter:none;
  }
  .photo-modal__image-wrap.is-revealed .photo-reveal-hint { display:none; }
}
