/*
 * exhibition-detail.css — delta stylesheet for the SSR exhibition 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, empty-state)
 *
 * Class-name prefix: ed-  (Exhibition Detail)
 */

/* ── Breadcrumbs ─────────────────────────────────────────────────────────────── */

.ed-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;
}

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

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

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

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

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

/* ── Title block (inside left column) ───────────────────────────────────────── */

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

/* h1 is inline so the save button flows directly after the last word */
.ed-title-line {
  margin-bottom: 0.5rem;
}

.ed-title {
  font-family: var(--font-header);
  font-weight: 600;
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: inline;
}

/* ── Save button — flows inline after the title text; chrome from .save-control--title ─ */

.ed-save-btn {
  margin-left: 0.625rem;
  position: relative;
  top: -0.15em;
}

.save-control__label {
  line-height: 1;
}

/* ── Attribution (artists, gallery, dates) ───────────────────────────────────── */

.ed-artists {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

/* Persistent underline makes links unambiguous at a glance */
.ed-artist__link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--border);
}

.ed-artist__link:hover {
  text-decoration-color: var(--text-primary);
}

.ed-gallery {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.ed-gallery__link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--border);
}

.ed-gallery__link:hover {
  text-decoration-color: var(--text-primary);
}

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

/* ── Two-column layout ───────────────────────────────────────────────────────── */

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

@media (min-width: 900px) {
  .ed-body { grid-template-columns: 1fr 40%; }
}

/* Right column: image only */
.ed-sidebar {
  align-self: start;
}

/* ── Exhibition image ─────────────────────────────────────────────────────────── */

.ed-aside-image {
  width: 100%;
  height: auto;
  display: block;
  /* No border — clean image edge into the meta box below */
}

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

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

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

.ed-description h2,
.ed-description h3 {
  font-family: var(--font-header);
  font-weight: 600;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.ed-description a {
  color: inherit;
  text-decoration: underline;
}

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

.ed-claim {
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  background-color: #f9fafb;
  max-width: 60ch;
}

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

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

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

.ed-claim__inline-link {
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ed-claim__inline-link:hover {
  opacity: 0.75;
}

/* ── Meta box (below description in left column) ────────────────────────────── */

.ed-meta {
  margin-top: 2rem;

  border: 1px solid var(--border);
  padding: 1.25rem 1.25rem 1.5rem;
  background-color: var(--bg-card);
  font-size: 0.875rem;
}

/* Dates line at top of meta */
.ed-meta__dates {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 0.875rem;
}

/* Venue block: gallery name + address, no labels */
.ed-meta__venue {
  margin-bottom: 1.25rem;
}

.ed-meta__venue-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
  line-height: 1.3;
}

.ed-meta__venue-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--border);
}

.ed-meta__venue-link:hover {
  text-decoration-color: var(--text-primary);
}

.ed-meta__venue-address {
  color: var(--text-muted);
  line-height: 1.4;
}

/* Hours block: label sits above the table */
.ed-meta__hours {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.ed-meta__hours-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 0.625rem;
}

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

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

.ed-hours__day {
  color: var(--text-muted);
  padding-right: 1rem;
  padding-bottom: 0.25rem;
  white-space: nowrap;
  vertical-align: top;
}

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

/* ── Instagram Share ─────────────────────────────────────────────────────────── */

.ed-ig-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(to right, #7c3aed, #db2777);
  color: #ffffff;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s;
}

.ed-ig-btn:hover { opacity: 0.9; }

/* Mobile only — Instagram's post flow does not work on desktop */
@media (min-width: 768px) {
  .ed-ig-btn { display: none; }
}

/* Full-viewport overlay backdrop */
.ed-ig-modal {
  position: fixed;
  inset: 0;
  background: rgba(75, 85, 99, 0.5);
  overflow-y: auto;
  z-index: 50;
  display: none;           /* shown by JS via style.display = '' */
}

/* Centred card inside the backdrop */
.ed-ig-modal__card {
  position: relative;
  top: 2.5rem;
  margin: 1rem auto;
  padding: 1.5rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  width: calc(100% - 2rem);
  max-width: 28rem;
  max-height: 90vh;
  overflow-y: auto;
  box-sizing: border-box;
}

.ed-ig-modal__body { text-align: center; }

.ed-ig-modal__icon {
  margin-bottom: 1rem;
  font-size: 2.5rem;
  background: linear-gradient(to right, #7c3aed, #db2777);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ed-ig-modal__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 1rem;
}

/* Exhibition image inside modal */
.ed-ig-modal__img-wrap {
  margin-bottom: 1rem;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.ed-ig-modal__img-wrap.hidden { display: none; }

.ed-ig-modal__img {
  width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: contain;
  display: block;
}

/* Step list */
.ed-ig-modal__steps {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  color: #374151;
  margin-bottom: 1.5rem;
}

.ed-ig-modal__step {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.ed-ig-modal__step-icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.125rem;
  font-size: 0.7rem;
  font-weight: 600;
}

.ed-ig-modal__step-icon--green {
  background: #dcfce7;
  color: #16a34a;
}

.ed-ig-modal__step-icon--blue {
  background: #dbeafe;
  color: #2563eb;
}

.ed-ig-modal__step-text { font-size: 0.875rem; }

/* Action buttons */
.ed-ig-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ed-ig-modal__open-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  background: linear-gradient(to right, #7c3aed, #db2777);
  color: #ffffff;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s;
}

.ed-ig-modal__open-btn:hover { opacity: 0.9; }

.ed-ig-modal__close-btn {
  width: 100%;
  padding: 0.5rem 1rem;
  background: transparent;
  border: none;
  color: #6b7280;
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.15s;
}

.ed-ig-modal__close-btn:hover { color: #111827; }
