/*
 * gallery-location.css — delta stylesheet for the SSR gallery location detail page
 *
 * Loaded AFTER:
 *   1. https://www.zopart.com/styles.css  (fonts, variables, base typography)
 *   2. https://www.zopart.com/site-chrome.css  (header + footer)
 *   3. exhibitions-city.css  (body flex-column, page-main, page-inner)
 *
 * Class-name prefix: gl-  (Gallery Location)
 * New classes added here must be registered in the class-name registry
 * (docs/css-class-registry.md) before the next cleanup sprint.
 */

/* ── Breadcrumbs (reuse ed- patterns with gl- override prefix) ────────────── */

.gl-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.375rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.gl-breadcrumb__link {
  color: var(--text-muted);
  text-decoration: none;
}

.gl-breadcrumb__link:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.gl-breadcrumb__sep {
  color: var(--border);
  user-select: none;
}

.gl-breadcrumb__current {
  color: var(--text-primary);
  font-weight: 500;
  max-width: 28ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 640px) {
  .gl-breadcrumb__current { max-width: none; }
}

/* ── Two-column layout: main (2/3) + sidebar (1/3) ──────────────────────── */

.gl-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}

@media (min-width: 900px) {
  .gl-body { grid-template-columns: 1fr 22rem; }
}

@media (min-width: 1200px) {
  .gl-body { grid-template-columns: 1fr 26rem; }
}

/* ── Main column ─────────────────────────────────────────────────────────── */

.gl-main { min-width: 0; }

/* ── Title block ─────────────────────────────────────────────────────────── */

.gl-title-block { margin-bottom: 1.75rem; }

.gl-title-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.25rem;
}

.gl-title {
  font-family: var(--font-header);
  font-weight: 600;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

/* Save / bookmark (gallery header) — layout; chrome from .save-control--title */
.gl-save-btn {
  flex-shrink: 0;
}

/* ── Description ─────────────────────────────────────────────────────────── */

.gl-description {
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 68ch;
}

.gl-description p + p { margin-top: 1em; }

/* ── Claim CTA box ───────────────────────────────────────────────────────── */

.gl-claim {
  margin-top: 2rem;
  padding: 1.125rem 1.375rem;
  border: 1px solid var(--border);
  background-color: #f9fafb;
  max-width: 56ch;
}

.gl-claim__heading {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}

.gl-claim__body {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.gl-claim__body strong { color: var(--text-primary); font-weight: 600; }

.gl-claim__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--text-primary);
  border-radius: 0.125rem;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}

.gl-claim__btn:hover {
  background-color: var(--text-primary);
  color: #ffffff;
  text-decoration: none;
}

.gl-claim--pending {
  background-color: #fffbeb;
  border-color: #d97706;
}

.gl-claim--pending .gl-claim__heading { color: #92400e; }

/* ── Admin action row (edit/manage, admin only) ──────────────────────────── */

.gl-admin-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.gl-admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: 0.125rem;
  background: #f9fafb;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.gl-admin-btn:hover {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: #ffffff;
}

/* ── Exhibitions ─────────────────────────────────────────────────────────── */

.gl-section-heading {
  font-family: var(--font-header);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.gl-exhibitions { margin-top: 2.5rem; }

.gl-exhibitions__columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 600px) {
  .gl-exhibitions__columns { grid-template-columns: 1fr 1fr; gap: 0; }
  .gl-exhibitions__col--current {
    padding-right: 1.5rem;
    border-right: 1px solid var(--border);
  }
  .gl-exhibitions__col--upcoming { padding-left: 1.5rem; }
}

.gl-exhibitions__col-heading {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.gl-exhibitions__empty {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Past exhibitions band */
.gl-past-band {
  margin-top: 3rem;
  padding-block: 2rem;
  background-color: #f9fafb;
  /* Pull to page edges on mobile, align with content on larger screens */
  margin-inline: -1rem;
  padding-inline: 1rem;
}

@media (min-width: 640px) {
  .gl-past-band { margin-inline: -1.5rem; padding-inline: 1.5rem; }
}

@media (min-width: 1024px) {
  .gl-past-band { margin-inline: -2rem; padding-inline: 2rem; }
}

.gl-past-band__heading {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.gl-past-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 600px) {
  .gl-past-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Past exhibitions mini list (3+ items) ──────────────────────────────── */

.gl-past-mini {
  list-style: none;
  padding: 0;
  margin: 0;
}

.gl-past-mini__item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border);
}

.gl-past-mini__item:first-child { border-top: 1px solid var(--border); }

.gl-past-mini__thumb-link { flex: 0 0 auto; display: block; }

.gl-past-mini__thumb {
  width: 5rem;
  aspect-ratio: 3/2;
  object-fit: cover;
  display: block;
}

.gl-past-mini__thumb--placeholder {
  width: 5rem;
  aspect-ratio: 3/2;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gl-past-mini__thumb--placeholder i {
  font-size: 1rem;
  color: #d1d5db;
}

.gl-past-mini__body {
  flex: 1;
  min-width: 0;
}

.gl-past-mini__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  line-height: 1.3;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gl-past-mini__title:hover { text-decoration: underline; }

.gl-past-mini__artist {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gl-past-mini__dates {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

.gl-past-mini__save {
  flex: 0 0 auto;
}

/* ── Exhibition card (within gallery page) ───────────────────────────────── */

.gl-ex-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.gl-ex-card__img-wrap {
  position: relative;
  aspect-ratio: 3/2;
  overflow: hidden;
  background: var(--bg-card);
}

.gl-ex-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gl-ex-card__img:hover { transform: scale(1.02); }

.gl-ex-card__img-link { display: block; }

.gl-ex-card__placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gl-ex-card__placeholder i {
  font-size: 2rem;
  color: #d1d5db;
}

.gl-ex-card__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  text-decoration: none;
}

.gl-ex-card__title:hover { text-decoration: underline; }

.gl-ex-card__artist {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.gl-ex-card__dates {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */

.gl-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  /* Stick sidebar to top on large screens */
}

@media (min-width: 900px) {
  .gl-sidebar {
    position: sticky;
    top: 2rem;
  }
}

/* ── Carousel ────────────────────────────────────────────────────────────── */

.gl-carousel {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 50%, #d1d5db 100%);
}

.gl-carousel__track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  height: 100%;
}

.gl-carousel__slide {
  flex: 0 0 100%;
  height: 100%;
}

.gl-carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gl-carousel__slide--gradient {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 50%, #d1d5db 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gl-carousel__slide--gradient i {
  font-size: 3rem;
  color: #9ca3af;
}

.gl-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.85);
  border: none;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: background-color 0.15s;
  z-index: 2;
}

.gl-carousel__arrow:hover { background: #ffffff; }
.gl-carousel__arrow--prev { left: 0.5rem; }
.gl-carousel__arrow--next { right: 0.5rem; }

.gl-carousel__dots {
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.375rem;
}

.gl-carousel__dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transition: background-color 0.2s;
}

.gl-carousel__dot--active { background: rgba(255,255,255,0.95); }

/* ── Sidebar section (hours, contact, website, other locations) ──────────── */

.gl-sidebar-section {}

.gl-sidebar-section__heading {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  margin-bottom: 0.875rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* ── Opening hours ───────────────────────────────────────────────────────── */

.gl-hours {
  border-collapse: collapse;
  font-size: 0.8125rem;
  width: 100%;
}

.gl-hours__day {
  color: var(--text-muted);
  padding-right: 1rem;
  padding-bottom: 0.3125rem;
  white-space: nowrap;
  vertical-align: top;
  min-width: 6rem;
}

.gl-hours__time {
  color: var(--text-primary);
  padding-bottom: 0.3125rem;
  vertical-align: top;
}

.gl-appointment-note {
  margin-top: 0.625rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Contact ─────────────────────────────────────────────────────────────── */

.gl-contact__address {
  font-size: 0.875rem;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.gl-contact__phone {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ── Map ─────────────────────────────────────────────────────────────────── */

.gl-map {
  width: 100%;
  aspect-ratio: 4/3;
  border: 1px solid var(--border);
  filter: grayscale(100%);
  /* Leaflet overrides via JS */
}

/* ── Website button ──────────────────────────────────────────────────────── */

.gl-website-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--text-primary);
  border-radius: 0.125rem;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}

.gl-website-btn:hover {
  background-color: var(--text-primary);
  color: #ffffff;
  text-decoration: none;
}

/* ── Other locations list ────────────────────────────────────────────────── */

.gl-other-locations {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.gl-other-location__link {
  font-size: 0.875rem;
  color: var(--text-primary);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

.gl-other-location__link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.gl-other-location__city {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 0.375rem;
}
