/* Client galleries, the find page and the admin page. They sit inside jk7photo.com's own header and footer,
   so /styles.css loads first and this file only adds what galleries need. */
:root {
  --soft: #f3f3f3;
  --heart: #c2402f;
  --gap: 10px;
}
.g-wrap h1, .g-wrap h2, .g-wrap p { margin: 0; }
.g-wrap img, .g-wrap video { display: block; max-width: 100%; }
.g-wrap button:where(:not(.g-btn)) { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.g-wrap { min-height: 60vh; padding-top: 24px; }

/* ---------- find your gallery ---------- */
.g-find { max-width: 560px; margin: 40px auto 100px; padding: 0 var(--gutter); text-align: center; color: var(--muted); }
.g-find > p:first-of-type { margin-top: 14px; }
.g-find .g-unlock { margin-top: 28px; }
.g-sub { font: 500 11px/1 var(--ui); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin: 48px 0 12px !important; }
.g-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); text-align: left; }
.g-list a { display: flex; justify-content: space-between; gap: 16px; padding: 16px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--head); transition: background-color 0.2s ease-out; }
.g-list a:hover { background: #fafafa; }
.g-list strong { font-weight: 500; }
.g-list span { color: var(--muted); font-size: 14px; white-space: nowrap; }
.g-help { margin-top: 48px !important; font-size: 14px; }
.g-help a { color: var(--head); }
.g-find .g-error { margin-top: 18px; }

.g-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--head); color: #fff;
  font: 600 13px/26px var(--ui); letter-spacing: 1.3px; text-transform: uppercase;
  padding: 10px 28px; border: 0; cursor: pointer; transition: background-color 0.2s ease-out, opacity 0.2s ease-out;
}
.g-btn:hover { background: #2b2b2b; }
.g-btn:disabled { opacity: 0.5; cursor: progress; }
.g-btn-line { background: transparent; color: var(--head); box-shadow: inset 0 0 0 1px var(--head); }
.g-btn-line:hover, .g-btn-line[aria-pressed='true'] { background: var(--head); color: #fff; }
.g-btn-small { padding: 6px 14px; font-size: 11px; line-height: 20px; }

.g-notice { max-width: 520px; margin: 80px auto 120px; padding: 0 24px; text-align: center; color: var(--muted); }
.g-notice h1 { font: 330 40px/1.1 var(--display); font-variation-settings: 'SOFT' 100; color: var(--head); margin-bottom: 18px; }
.g-notice a { color: var(--head); }
.g-unlock { display: flex; gap: 8px; margin-top: 28px; }
.g-unlock input, .a-main input, .a-main textarea {
  flex: 1; min-width: 0; padding: 14px 16px; font: 400 16px/20px var(--ui); color: var(--text);
  border: 1px solid var(--line); border-radius: 0; background: #fff;
}
.g-unlock input:focus, .a-main input:focus { outline: none; border-color: var(--head); }
.g-error { margin-top: 14px; color: var(--heart); }

/* ---------- gallery ---------- */
.g-main { padding: 0 var(--gutter); }
.g-hero { text-align: center; padding: 24px 0 40px; }
.g-title { font: 330 clamp(34px, 5vw, 52px)/1.05 var(--display); font-variation-settings: 'SOFT' 100; color: var(--head); }
.g-meta { margin-top: 12px; color: var(--muted); font-size: 14px; letter-spacing: 0.4px; }
.g-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.g-status { min-height: 22px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.g-fav-count { font-variant-numeric: tabular-nums; }

.g-grid { position: relative; }
.t { position: absolute; display: block; overflow: hidden; background: var(--soft); }
.t img, .t video { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.25s linear; }
.t.is-loaded img, .t.is-loaded video { opacity: 1; }
.t.is-hidden { display: none; }

/* Heart and download sit on each tile; shown on hover, always on touch screens and when picked. */
.t-tools { position: absolute; inset: auto 8px 8px auto; display: flex; gap: 6px; opacity: 0; transition: opacity 0.2s ease-out; }
.t:hover .t-tools, .t:focus-within .t-tools { opacity: 1; }
@media (hover: none) { .t-tools { opacity: 1; } }
.t-btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(4px); text-decoration: none; }
.t-btn svg { width: 18px; height: 18px; }
.t-btn:hover { background: rgba(0, 0, 0, 0.72); }
.t-fav[aria-pressed='true'] { color: var(--heart); background: #fff; }
.t-fav[aria-pressed='true'] svg path { fill: currentColor; }
.t.is-fav .t-tools { opacity: 1; }
.t.is-fav .t-dl { opacity: 0; }
.t.is-fav:hover .t-dl { opacity: 1; }

/* Sound toggle for videos: starts muted (browsers require it); one tap plays Joe's audio. */
.t-video .sound { position: absolute; left: 8px; bottom: 8px; }
.sound { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(4px); }
.sound svg { width: 18px; height: 18px; }
.sound .on { display: none; }
.sound[aria-pressed='true'] .on { display: inline; }
.sound[aria-pressed='true'] .off { display: none; }

.g-name { border: 0; padding: 32px; max-width: 360px; width: calc(100% - 32px); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18); }
.g-name::backdrop { background: rgba(255, 255, 255, 0.7); }
.g-name h2 { font: 330 28px/1.1 var(--display); color: var(--head); margin-bottom: 8px; }
.g-name p { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.g-name input { width: 100%; padding: 12px 14px; font: inherit; border: 1px solid var(--line); margin-bottom: 14px; }

/* Lightbox: Pixieset-style white viewer, plus heart and download. */
.pswp { --pswp-bg: #fff; --pswp-placeholder-bg: var(--soft); --pswp-icon-color: var(--head); --pswp-icon-color-secondary: #fff; --pswp-icon-stroke-width: 0; }
.pswp__button--fav .pswp__icn, .pswp__button--dl .pswp__icn { fill: none; stroke: var(--head); stroke-width: 1.6; }
.pswp__button--fav.is-on .pswp__icn { fill: var(--heart); stroke: var(--heart); }

/* ---------- admin ---------- */
.a-main { max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter) 40px; }
.a-main h1 { font: 330 40px/1.1 var(--display); color: var(--head); margin: 8px 0 24px; }
.a-main h2 { font: 330 26px/1.2 var(--display); color: var(--head); margin: 40px 0 14px; }
.a-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.a-login { max-width: 360px; margin: 40px auto; display: grid; gap: 12px; text-align: center; }
.a-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.a-table th { text-align: left; font: 500 11px/1 var(--ui); letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--line); }
.a-table td { padding: 14px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.a-table td.num { font-variant-numeric: tabular-nums; color: var(--muted); }
.a-table a { color: var(--head); }
.a-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; align-items: end; }
.a-form label { display: grid; gap: 6px; font-size: 13px; color: var(--head); }
.a-form small { color: var(--muted); font-size: 12px; }
.a-link { display: flex; gap: 8px; align-items: stretch; }
.a-link input { flex: 1; font-size: 14px; color: var(--muted); }
.a-drop {
  display: grid; place-items: center; gap: 10px; padding: 44px 20px; margin-top: 12px;
  border: 1px dashed #bdbdbd; background: #fafafa; text-align: center; color: var(--muted); cursor: pointer;
  transition: border-color 0.2s ease-out, background-color 0.2s ease-out;
}
.a-drop.is-over { border-color: var(--head); background: #f2f2f2; }
.a-drop strong { color: var(--head); font-weight: 500; }
.a-queue { margin: 12px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); display: grid; gap: 4px; }
.a-queue li { display: flex; justify-content: space-between; gap: 12px; }
.a-queue .is-error { color: var(--heart); }
.a-queue .is-done { color: #3d7a4a; }
.a-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.a-thumb { position: relative; aspect-ratio: 1; background: var(--soft); overflow: hidden; }
.a-thumb img, .a-thumb video { width: 100%; height: 100%; object-fit: cover; }
.a-thumb-tools { position: absolute; inset: auto 4px 4px 4px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px; opacity: 0; transition: opacity 0.2s; }
.a-thumb:focus-within .a-thumb-tools { opacity: 1; }
.a-thumb:hover .a-thumb-tools { opacity: 1; }
.a-thumb .is-cover { position: absolute; top: 4px; left: 4px; background: #fff; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; padding: 2px 6px; }
.a-main .a-chip { background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 11px; line-height: 16px; padding: 3px 8px; white-space: nowrap; }
.a-main .a-chip:hover { background: rgba(0, 0, 0, 0.8); }
.a-people { display: grid; gap: 18px; }
.a-person strong { color: var(--head); font-weight: 500; }
.a-person .a-thumbs { margin-top: 8px; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
.a-danger { color: var(--heart); text-decoration: underline; font-size: 13px; }
.a-tabs, .a-pages { display: flex; flex-wrap: wrap; gap: 6px; }
.a-tabs a, .a-pages a { padding: 8px 16px; font: 500 12px/20px var(--ui); letter-spacing: 1.4px; text-transform: uppercase; text-decoration: none; color: var(--head); box-shadow: inset 0 0 0 1px var(--line); }
.a-tabs a[aria-current], .a-pages a[aria-current] { background: var(--head); color: #fff; box-shadow: none; }
.a-pages { margin-bottom: 14px; }
.a-hint { color: var(--muted); font-size: 14px; margin-bottom: 28px !important; }
.a-hint a { color: var(--head); white-space: nowrap; }
.a-check { display: flex !important; align-items: center; gap: 8px !important; grid-column: 1 / -1; }
.a-sec { padding: 22px 0 30px; border-top: 1px solid var(--line); }
.a-sec-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.a-sec-head input { flex: 1 1 220px; padding: 10px 12px; font: 400 18px/24px var(--display); border: 1px solid var(--line); color: var(--head); }
.a-sec-head select { padding: 10px 8px; font: inherit; font-size: 14px; border: 1px solid var(--line); background: #fff; }
.a-sec-head .a-chip:disabled { opacity: 0.3; }
@media (hover: none) { .a-thumb-tools { opacity: 1; } }
.a-thumb.is-pending { opacity: 0.5; }
.a-drop-small { padding: 22px 16px; }
.a-new-sec { margin-top: 28px; grid-template-columns: 1fr auto; }
.a-saved { font-size: 13px; color: #3d7a4a; }

/* Website tab: the editor, with the live page beside it on wide screens and above it on narrow ones. */
.a-main.a-wide { max-width: 1680px; }
.a-site { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.a-preview { min-width: 0; }
.a-edit { min-width: 0; }
.a-preview { order: -1; }
.a-preview-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font: 500 11px/1 var(--ui); letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); }
.a-seg { display: inline-flex; box-shadow: inset 0 0 0 1px var(--line); }
.a-seg button { padding: 7px 12px; font: inherit; letter-spacing: inherit; color: var(--head); }
.a-seg button[aria-pressed] { background: var(--head); color: #fff; }
.a-preview-frame { position: relative; overflow: hidden; background: #f3f3f3; box-shadow: inset 0 0 0 1px var(--line); display: flex; justify-content: center; }
.a-preview-frame iframe { border: 0; flex: none; transform-origin: top center; background: #fff; }
@media (min-width: 1200px) {
  .a-site { grid-template-columns: minmax(0, 1fr) minmax(420px, 40%); align-items: start; }
  .a-preview { order: 0; position: sticky; top: 16px; }
}

/* Top of the page: a small copy of the hero. The dot is the spot that stays in view (click to move it). */
.a-hero { padding: 0 0 30px; }
.a-hero h2 { margin-top: 0 !important; }
.a-hero-box { position: relative; aspect-ratio: 16 / 7; overflow: hidden; cursor: crosshair; background: #222; }
.a-hero-box.is-over { outline: 2px dashed var(--head); outline-offset: 4px; }
.a-hero-photo, .a-hero-shade { position: absolute; inset: 0; background-size: cover; pointer-events: none; }
.a-hero-title { position: absolute; inset: 0; display: grid; place-items: center; padding: 0 24px; text-align: center; color: #fff; font: 360 clamp(22px, 3vw, 34px)/1.1 var(--display); pointer-events: none; }
.a-hero-dot { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5); pointer-events: none; transition: left 0.2s ease-out, top 0.2s ease-out; }
.a-hero-dot::after { content: ''; position: absolute; inset: 5px; background: #fff; border-radius: 50%; }
.a-hero-fields { display: grid; grid-template-columns: 1fr 220px; gap: 14px 20px; margin-top: 14px; align-items: end; }
.a-hero-fields label { display: grid; gap: 6px; font-size: 13px; color: var(--head); }
.a-hero-fields input[type=range] { accent-color: var(--head); padding: 0; border: 0; }
.a-small { grid-column: 1 / -1; color: var(--muted); font-size: 13px; line-height: 19px; }
.a-row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.a-row .g-btn { cursor: pointer; }

/* Drag to reorder. The dotted handle is what a finger drags; a mouse can grab the whole photo. */
.a-thumbs .a-thumb { cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.a-thumbs .a-thumb:focus-visible { outline: 2px solid var(--head); outline-offset: 2px; }
.a-thumbs:empty { min-height: 90px; outline: 1px dashed #bdbdbd; outline-offset: -1px; background: #fafafa; }
.a-thumbs:empty::before { content: 'Drag photos here'; display: grid; place-items: center; height: 90px; grid-column: 1 / -1; color: var(--muted); font-size: 13px; }
.a-grip { position: absolute; top: 4px; right: 4px; width: 26px; height: 30px; display: grid; place-items: center; background: rgba(0, 0, 0, 0.55); color: #fff; touch-action: none; cursor: grab; }
.a-grip svg { width: 8px; height: 13px; }
.a-thumb.is-dragging { opacity: 0.25; }
.a-thumb.is-hero { box-shadow: 0 0 0 3px var(--head); }
.a-thumb.is-hero::after { content: 'Top photo'; position: absolute; top: 4px; left: 4px; background: var(--head); color: #fff; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; padding: 2px 6px; }
.a-ghost { position: fixed; top: 0; left: 0; z-index: 1000; pointer-events: none; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28); }
.a-ghost .a-thumb-tools { display: none; }
html.is-sorting, html.is-sorting * { cursor: grabbing !important; }
html.is-sorting .a-preview-frame iframe { pointer-events: none; }

/* Text tab: one box per block of words; rates are rows of name, price and up to 3 lines. */
.a-text h2 { margin: 0 0 6px !important; }
.a-text > .a-small { margin: 0 0 14px; }
.a-text > textarea, .a-text > input { width: 100%; resize: vertical; }
.a-text .a-row { margin-top: 14px; }
.a-rates { display: grid; gap: 12px; margin-bottom: 12px; }
.a-rate { display: grid; grid-template-columns: 1fr 120px; gap: 10px 14px; padding: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.a-rate label { display: grid; gap: 6px; font-size: 13px; color: var(--head); }
.a-rate small { color: var(--muted); font-size: 12px; }
.a-rate-lines { grid-column: 1 / -1; }
.a-rate-lines textarea { resize: vertical; }
.a-rate-tools { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
.a-rate-tools .a-danger { margin-left: auto; }
.a-saved.is-pending { color: var(--muted); }
.a-saved.is-bad { color: var(--heart); }

@media (max-width: 767px) {
  :root { --gap: 6px; }
  .g-unlock { flex-direction: column; }
  .g-list a { flex-direction: column; gap: 4px; }
  .a-table th:nth-child(n+3):not(:last-child), .a-table td:nth-child(n+3):not(:last-child) { display: none; }
  .a-hero-fields { grid-template-columns: 1fr; }
  .a-hero-box { aspect-ratio: 4 / 3; }
  .a-sec-head select { flex: 1 1 40%; }
  .a-rate { grid-template-columns: 1fr; }
}
