/*
 * Openwood — review photos.
 * Uses the storefront tokens (--ink, --line, --gray-*) so the uploader reads as
 * part of the review form rather than a bolted-on widget.
 */

.ow-rv-upload { margin-top: 16px; }
.ow-rv-upload__label {
  display: block; font-size: 12px; font-weight: 700; letter-spacing: .03em;
  text-transform: uppercase; color: var(--gray-700, #4a4a4a); margin-bottom: 3px;
}
.ow-rv-upload__hint { margin: 0 0 9px; font-size: 12.5px; color: var(--gray-500, #767676); line-height: 1.45; }

.ow-rv-upload__row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* The real input is hidden and driven by its <label> — the native "Choose
   files / No file chosen" control cannot be styled and looks foreign here. */
.ow-rv-upload__input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ow-rv-upload__btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 9px 14px; border: 1px solid var(--line, #e7e7e7); border-radius: 999px;
  background: #fff; font-size: 13px; font-weight: 600; color: var(--ink, #111);
  transition: border-color .15s ease, background .15s ease;
}
.ow-rv-upload__btn:hover { border-color: var(--ink, #111); background: var(--gray-100, #f6f6f6); }
/* Keyboard users must still see focus even though the input is visually hidden. */
.ow-rv-upload__input:focus-visible + .ow-rv-upload__count,
.ow-rv-upload__input:focus-visible ~ .ow-rv-upload__btn,
.ow-rv-upload__btn:focus-within { outline: 2px solid var(--ink, #111); outline-offset: 2px; }
.ow-rv-upload__count { font-size: 12.5px; color: var(--gray-500, #767676); font-variant-numeric: tabular-nums; }
.ow-rv-upload__err { margin: 8px 0 0; font-size: 12.5px; color: #b3261e; }

.ow-rv-upload__previews { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.ow-rv-thumb { position: relative; width: 68px; height: 68px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line, #e7e7e7); }
.ow-rv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ow-rv-thumb__x {
  position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%; cursor: pointer;
  background: rgba(17,17,17,.72); color: #fff;
}
.ow-rv-thumb__x:hover { background: #111; }

/* Photos attached to a published review */
.ow-rv-photos { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 2px; }
.ow-rv-photo { display: block; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line, #e7e7e7); }
.ow-rv-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s ease; }
.ow-rv-photo:hover img { transform: scale(1.06); }

.ow-rv-photo { cursor: zoom-in; }

/* AJAX submit feedback line, under the submit button. */
.ow-rv-note-msg {
  margin: 12px 0 0; font-size: 13.5px; line-height: 1.55; font-weight: 600;
  padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--line, #e7e7e7); background: var(--gray-50, #fafafa); color: var(--ink, #111);
}
.ow-rv-note-msg.is-ok { border-color: var(--ink, #111); }
.ow-rv-note-msg.is-err { border-color: #b3261e; color: #b3261e; background: #fdf4f3; }

/* ---------------------------------------------------------------------------
   Photo lightbox — Openwood styling: paper panel, hairline border, pill
   controls. Deliberately NOT a black cinema overlay; the storefront is a light,
   paper-and-ink design and a full-black viewer reads as a different product.
   --------------------------------------------------------------------------- */
.ow-lb { position: fixed; inset: 0; z-index: 260; display: flex; align-items: center; justify-content: center; padding: 24px; }
.ow-lb[hidden] { display: none; }
.ow-lb__scrim { position: absolute; inset: 0; background: rgba(17, 17, 17, .58); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
/* Locks the page behind the viewer. `position: fixed` rather than
   `overflow: hidden` so iOS Safari does not scroll the page underneath. */
body.ow-lb-open { overflow: hidden; }

.ow-lb__panel {
  position: relative; z-index: 1;
  display: grid; align-items: center;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "prev stage next" "thumbs thumbs thumbs";
  gap: 14px;
  width: min(1040px, 100%); max-height: 100%;
  padding: 16px; border-radius: 22px;
  border: 1px solid var(--line, #e7e7e7); background: var(--paper, #fff);
  box-shadow: 0 30px 90px rgba(17, 17, 17, .28);
}
.ow-lb__stage {
  grid-area: stage; margin: 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.ow-lb__stage img {
  display: block; max-width: 100%; max-height: min(70vh, 640px);
  width: auto; height: auto; object-fit: contain;
  border-radius: 14px; background: var(--gray-100, #f6f6f6);
}
.ow-lb__cap { font-size: 12.5px; color: var(--gray-500, #767676); font-weight: 600; text-align: center; }

.ow-lb__x, .ow-lb__nav {
  display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer;
  border: 1px solid var(--line, #e7e7e7); border-radius: 50%;
  background: var(--paper, #fff); color: var(--ink, #111);
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.ow-lb__x:hover, .ow-lb__nav:hover { background: var(--ink, #111); border-color: var(--ink, #111); color: #fff; }
.ow-lb__x { position: absolute; top: 10px; right: 10px; z-index: 2; width: 36px; height: 36px; }
.ow-lb__nav { width: 44px; height: 44px; flex: none; }
.ow-lb__nav--prev { grid-area: prev; }
.ow-lb__nav--next { grid-area: next; }
.ow-lb__nav[hidden] { display: none; }

.ow-lb__thumbs {
  grid-area: thumbs; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  padding-top: 4px;
}
.ow-lb__thumbs[hidden] { display: none; }
.ow-lb__t {
  width: 54px; height: 54px; padding: 0; cursor: pointer; overflow: hidden;
  border: 1px solid var(--line, #e7e7e7); border-radius: 10px; background: none;
  opacity: .55; transition: opacity .15s ease, border-color .15s ease;
}
.ow-lb__t img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ow-lb__t:hover { opacity: 1; }
.ow-lb__t.is-on { opacity: 1; border-color: var(--ink, #111); box-shadow: 0 0 0 1px var(--ink, #111); }

@media (max-width: 640px) {
  .ow-lb { padding: 12px; }
  .ow-lb__panel { padding: 12px; border-radius: 18px; gap: 10px; }
  /* Arrows move under the photo — 44px controls either side leave almost no
     room for the image itself on a phone. */
  .ow-lb__panel { grid-template-columns: 1fr auto auto; grid-template-areas: "stage stage stage" "thumbs prev next"; }
  .ow-lb__thumbs { justify-content: flex-start; }
  .ow-lb__nav { width: 40px; height: 40px; }
  .ow-lb__stage img { max-height: 58vh; }
}

@media (max-width: 480px) {
  .ow-rv-thumb, .ow-rv-photo { width: 60px; height: 60px; }
}
