/* Photo slideshow on traveler cards. Builds on app.css tokens. */
.gal { border-bottom: 1px solid var(--line); }
.gal-stage { position: relative; aspect-ratio: 3 / 2; background: var(--soft); overflow: hidden; outline: none; }
.gal-stage:focus-visible { box-shadow: inset 0 0 0 2px var(--ink); }
.gal-stage img { display: block; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; user-select: none; }
.gal-stage .badges { z-index: 2; }

.gal-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); font-size: 22px; line-height: 30px; padding: 0; color: var(--ink); opacity: 0; transition: opacity .15s; z-index: 2; }
.gal-arrow.prev { left: 10px; }
.gal-arrow.next { right: 10px; }
.gal-stage:hover .gal-arrow, .gal-arrow:focus-visible, .gal-stage:focus-within .gal-arrow { opacity: 1; }
.gal-arrow:hover { border-color: var(--ink); }
@media (hover: none) { .gal-arrow { opacity: 1; } }

.gal-pill { position: absolute; bottom: 10px; font-size: 12px; background: var(--bg); border: 1px solid var(--line); padding: 1px 8px; border-radius: 999px; z-index: 2; }
.gal-label { left: 10px; }
.gal-count { right: 10px; font-variant-numeric: tabular-nums; }

.gal-empty { display: flex; flex-direction: column; justify-content: flex-end; padding: 16px; aspect-ratio: auto; height: 168px; }
.gal-empty .place { font-size: 26px; line-height: 1.1; letter-spacing: -0.01em; }
.gal-empty .city { font-size: 13px; color: var(--ink-2); }
.gal-note { font-size: 12px; color: var(--muted); margin-top: 6px; }

.gal-text { background: var(--bg); overflow-y: auto; padding: 44px 16px 14px; }
.gal-am { display: grid; gap: 8px; font-size: 13px; line-height: 1.45; }
.gal-am-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; }
.gal-am-h { color: var(--muted); }
.gal-am-row:first-child .gal-am-h { color: var(--ink); }
.gal-am-times { margin: 4px 0 0; color: var(--muted); }

.gal-cap { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; padding: 10px 16px 0; font-size: 13px; }
.gal-place { font-size: 17px; line-height: 1.25; }
.gal-tabs { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 6px 16px 10px; font-size: 13px; }
.gal-tabs button { background: none; border: 0; padding: 2px 0; color: var(--ink-2); border-bottom: 1px solid transparent; }
.gal-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.gal-tabs button:hover { color: var(--ink); }
.gal-tabs .gal-all { margin-left: auto; text-decoration: underline; text-underline-offset: 3px; }

/* All photos */
body.galbox-open { overflow: hidden; }
.galbox { position: fixed; inset: 0; background: var(--bg); z-index: 50; overflow-y: auto; outline: none; }
.galbox-top { position: sticky; top: 0; background: var(--bg); border-bottom: 1px solid var(--line); display: flex; gap: 18px; align-items: baseline; padding: 14px 24px; z-index: 1; }
.galbox-top > span { margin-right: auto; }
.galbox-grid { max-width: 1180px; margin: 0 auto; padding: 8px 24px 64px; }
.galbox-grid h3 { font-size: 15px; font-weight: 400; margin: 24px 0 10px; }
.galbox-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.galbox-thumbs button { padding: 0; border: 0; background: var(--soft); aspect-ratio: 1; cursor: zoom-in; }
.galbox-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; animation: gal-in .25s ease-out; }
@keyframes gal-in { from { opacity: 0; } }
.galbox-thumbs button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.galbox-one { position: relative; max-width: 1180px; margin: 0 auto; padding: 20px 64px 40px; text-align: center; }
.galbox-one img { max-width: 100%; max-height: calc(100vh - 150px); object-fit: contain; }
.galbox-one .gal-arrow { opacity: 1; }
.galbox-one .gal-arrow.prev { left: 16px; }
.galbox-one .gal-arrow.next { right: 16px; }
@media (max-width: 640px) {
  .galbox-top { padding: 12px 16px; gap: 12px; }
  .galbox-grid { padding: 4px 16px 48px; }
  .galbox-thumbs { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .galbox-one { padding: 12px 0 32px; }
  .galbox-one .gal-arrow { top: auto; bottom: 0; transform: none; }
  .gal-am-row { grid-template-columns: 1fr; gap: 0; }
}
