/* =====================================================================
   EXHIBITIONS PAGE — REFINED OVERRIDES
   Drop-in CSS to layer on top of artzcollector.css.
   Targets .exhibitions-roundup and surrounding elements only.
   Cross-browser: Chrome, Firefox, Safari (macOS + iOS), Android Chrome.
   ===================================================================== */

/* ------------------------------------
   1. SECTION SPACING & HEADINGS
   ------------------------------------ */

/* H2 – week heading: cleaner weight, generous breathing room */
.exhibitions-roundup h2 {
  font-family: var(--font-head, "Raleway", system-ui, sans-serif);
  font-weight: 600;                       /* was 700 – slightly lighter feels more refined */
  font-size: clamp(1.3rem, 2.2vw, 1.65rem);
  letter-spacing: 0.01em;
  margin: 2rem 0 0.5rem;
  padding-bottom: 0.5rem;
  position: relative;
  color: var(--ink, #222);
}

/* Accent underline – thinner, subtler */
.exhibitions-roundup h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--teal, #0f766e);
  opacity: 0.8;
}

/* Counts line under the H2 */
.exhibitions-roundup > p {
  margin: 0.25rem 0 1.5rem;
  font-size: 0.9rem;
  color: var(--ink-muted, #555);
  line-height: 1.5;
}

/* H3 – section labels (Private Views, Exhibitions, etc.) */
.exhibitions-roundup h3 {
  font-family: var(--font-head, "Raleway", system-ui, sans-serif);
  font-weight: 600;
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  letter-spacing: 0.02em;
  margin: 2rem 0 0.75rem;
  padding-left: 14px;
  position: relative;
  color: var(--ink, #222);
}

/* Vertical accent bar before H3 – refined */
.exhibitions-roundup h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 4px;
  height: 1em;
  border-radius: 2px;
  background: var(--teal, #0f766e);
  opacity: 0.75;
}


/* ------------------------------------
   2. TABLE — DESKTOP REFINEMENT
   ------------------------------------ */

.exhibitions-roundup table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;           /* allows border-spacing if needed */
  border-spacing: 0;
  margin-bottom: 1.25rem;
  font-size: 0.92rem;                  /* slightly smaller for density */
  line-height: 1.55;
}

/* Wrap rather than overflow */
.exhibitions-roundup th,
.exhibitions-roundup td {
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

/* --- THEAD --- */
.exhibitions-roundup thead th {
  text-align: left;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted, #555);
  padding: 0.65rem 0.75rem;
  border-bottom: 2px solid var(--line, #e5e5e5);
  background: transparent;             /* remove coloured header bands – cleaner */
}

/* --- TBODY --- */
.exhibitions-roundup tbody td {
  padding: 0.75rem 0.75rem;            /* was 10px 8px – more generous */
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  vertical-align: top;
  color: var(--ink, #222);
}

/* Alternate row tint – very subtle */
.exhibitions-roundup tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.015);
}

/* Hover – gentle lift across all tables */
.exhibitions-roundup tbody tr {
  transition: background 0.15s ease;
}

.exhibitions-roundup tbody tr:hover {
  background: rgba(15, 118, 110, 0.04);  /* unified subtle teal hover */
}

/* Title cell – slightly bolder */
.exhibitions-roundup tbody td[data-th="Title"] {
  font-weight: 600;
  color: var(--ink, #222);
}

/* Venue cell – slightly muted to differentiate */
.exhibitions-roundup tbody td[data-th="Venue"] {
  color: var(--ink-muted, #555);
}

/* Price cell */
.exhibitions-roundup tbody td[data-th="£"] {
  color: var(--ink-muted, #555);
}

/* Tags – still hidden */
.exhibitions-roundup table th:nth-child(7),
.exhibitions-roundup table td[data-th="Tags"] {
  display: none;
}


/* ------------------------------------
   3. COLUMN PROPORTIONS (6-col visible)
   ------------------------------------ */

@media (min-width: 861px) {
  /* Unified column widths for ALL exhibition tables
     (overrides the per-section rules in artzcollector.css) */

  /* Title – col 1 */
  .exhibitions-roundup table th:nth-child(1),
  .exhibitions-roundup table td:nth-child(1),
  #private-views + table thead th:nth-child(1),
  #private-views + table tbody td:nth-child(1),
  #exhibitions + table thead th:nth-child(1),
  #exhibitions + table tbody td:nth-child(1),
  #closing-soon + table thead th:nth-child(1),
  #closing-soon + table tbody td:nth-child(1),
  #edinburgh + table thead th:nth-child(1),
  #edinburgh + table tbody td:nth-child(1)          { width: 27%; }

  /* Artist(s) – col 2 */
  .exhibitions-roundup table th:nth-child(2),
  .exhibitions-roundup table td:nth-child(2),
  #private-views + table thead th:nth-child(2),
  #private-views + table tbody td:nth-child(2),
  #exhibitions + table thead th:nth-child(2),
  #exhibitions + table tbody td:nth-child(2),
  #closing-soon + table thead th:nth-child(2),
  #closing-soon + table tbody td:nth-child(2),
  #edinburgh + table thead th:nth-child(2),
  #edinburgh + table tbody td:nth-child(2)          { width: 19%; }

  /* Venue – col 3 */
  .exhibitions-roundup table th:nth-child(3),
  .exhibitions-roundup table td:nth-child(3),
  #private-views + table thead th:nth-child(3),
  #private-views + table tbody td:nth-child(3),
  #exhibitions + table thead th:nth-child(3),
  #exhibitions + table tbody td:nth-child(3),
  #closing-soon + table thead th:nth-child(3),
  #closing-soon + table tbody td:nth-child(3),
  #edinburgh + table thead th:nth-child(3),
  #edinburgh + table tbody td:nth-child(3)          { width: 20%; }

  /* Dates / Date-Time – col 4 */
  .exhibitions-roundup table th:nth-child(4),
  .exhibitions-roundup table td:nth-child(4),
  #private-views + table thead th:nth-child(4),
  #private-views + table tbody td:nth-child(4),
  #exhibitions + table thead th:nth-child(4),
  #exhibitions + table tbody td:nth-child(4),
  #closing-soon + table thead th:nth-child(4),
  #closing-soon + table tbody td:nth-child(4),
  #edinburgh + table thead th:nth-child(4),
  #edinburgh + table tbody td:nth-child(4)          { width: 16%; }

  /* £ – col 5 */
  .exhibitions-roundup table th:nth-child(5),
  .exhibitions-roundup table td:nth-child(5),
  #private-views + table thead th:nth-child(5),
  #private-views + table tbody td:nth-child(5),
  #exhibitions + table thead th:nth-child(5),
  #exhibitions + table tbody td:nth-child(5),
  #closing-soon + table thead th:nth-child(5),
  #closing-soon + table tbody td:nth-child(5),
  #edinburgh + table thead th:nth-child(5),
  #edinburgh + table tbody td:nth-child(5)          { width: 10%; }

  /* Link – col 6 */
  .exhibitions-roundup table th:nth-child(6),
  .exhibitions-roundup table td:nth-child(6),
  #private-views + table thead th:nth-child(6),
  #private-views + table tbody td:nth-child(6),
  #exhibitions + table thead th:nth-child(6),
  #exhibitions + table tbody td:nth-child(6),
  #closing-soon + table thead th:nth-child(6),
  #closing-soon + table tbody td:nth-child(6),
  #edinburgh + table thead th:nth-child(6),
  #edinburgh + table tbody td:nth-child(6)          { width: 8%; }
}


/* ------------------------------------
   4. SECTION-SPECIFIC THEAD TINTS
   (very subtle — just enough to
   distinguish each section)
   ------------------------------------ */

/* Private Views – faint teal */
#private-views + table thead th {
  border-bottom-color: rgba(15, 118, 110, 0.25);
}

/* Exhibitions – neutral */
#exhibitions + table thead th {
  border-bottom-color: var(--line, #e5e5e5);
}

/* Closing Soon – warm amber hint */
#closing-soon + table thead th {
  border-bottom-color: rgba(200, 150, 30, 0.3);
}

/* Edinburgh – faint purple */
#edinburgh + table thead th {
  border-bottom-color: rgba(120, 80, 200, 0.25);
}


/* ------------------------------------
   5. INFO BADGE / LINK BUTTON
   ------------------------------------ */

.exhibitions-roundup .badge,
.exhibitions-roundup .badge--available {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  background: rgba(15, 118, 110, 0.05);
  color: var(--teal, #0f766e);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
  display: inline-block;
}

.exhibitions-roundup .badge:hover,
.exhibitions-roundup .badge--available:hover {
  background: rgba(15, 118, 110, 0.1);
  border-color: rgba(15, 118, 110, 0.35);
  text-decoration: none;
}

/* Ensure links in the table don't get underlines from global a:hover */
.exhibitions-roundup a {
  text-decoration: none;
}

.exhibitions-roundup a:hover {
  text-decoration: none;
}


/* ------------------------------------
   6. STATS LINE — SUBTLE PILLS
   ------------------------------------ */

/* Make the counts read as quiet inline badges */
.exhibitions-roundup > p strong {
  font-weight: 600;
  color: var(--ink, #222);
}


/* ------------------------------------
   7. HR / DIVIDERS
   ------------------------------------ */

.page--glasgow-exhibitions .hr {
  margin: 2rem 0 1.5rem;
  background: var(--line, #e5e5e5);
}


/* ------------------------------------
   8. ARCHIVE SECTION
   ------------------------------------ */

.page--glasgow-exhibitions details {
  margin: 1.25rem 0 0;
  border: 1px solid var(--line, #e5e5e5);
  border-radius: 8px;
  background: var(--bg, #f8f8f8);
}

.page--glasgow-exhibitions details[open] {
  background: #fafafa;
}

.page--glasgow-exhibitions details > summary {
  cursor: pointer;
  padding: 0.7rem 1rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-muted, #555);
  list-style: none;
}

.page--glasgow-exhibitions details > summary::-webkit-details-marker {
  display: none;
}

.page--glasgow-exhibitions details > summary::before {
  content: "▸";
  margin-right: 0.5rem;
  display: inline-block;
  color: var(--ink-subtle, #7a7a7a);
  transition: transform 0.15s ease;
}

.page--glasgow-exhibitions details[open] > summary::before {
  content: "▾";
}

.archive-meta {
  margin: 0.25rem 0 0.75rem;
  font-size: 0.88rem;
  color: var(--ink-subtle, #7a7a7a);
}


/* ------------------------------------
   9. CLOSING SOON TABLE — Warm nudge
   ------------------------------------ */

/* Optional: give Closing Soon rows a very faint warm background */
#closing-soon + table tbody tr {
  background: rgba(230, 170, 30, 0.02);
}

#closing-soon + table tbody tr:hover {
  background: rgba(230, 170, 30, 0.06);
}


/* =====================================================
   10. MOBILE — CARD LAYOUT (≤ 720px)
   Better touch targets, cleaner labels, more breathing room
   ===================================================== */

@media (max-width: 720px) {

  /* Reset table-layout to auto for block display */
  .exhibitions-roundup table {
    table-layout: auto;
  }

  .exhibitions-roundup table th,
  .exhibitions-roundup table td,
  .exhibitions-roundup table td[data-th] {
    width: 100% !important;
  }

  .exhibitions-roundup thead {
    display: none;
  }

  .exhibitions-roundup table,
  .exhibitions-roundup tbody,
  .exhibitions-roundup tr,
  .exhibitions-roundup td {
    display: block;
    width: 100%;
  }

  /* Each row becomes a card */
  .exhibitions-roundup tbody tr {
    border: 1px solid var(--line, #e5e5e5);
    border-radius: 10px;
    background: #fff;
    margin: 0 0 0.85rem;
    padding: 0.85rem 1rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.15s ease;
  }

  .exhibitions-roundup tbody tr:nth-child(even) {
    background: #fff;                   /* no alternating on mobile cards */
  }

  .exhibitions-roundup tbody tr:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  }

  /* Reset cell borders */
  .exhibitions-roundup tbody td {
    border: 0;
    padding: 0.3rem 0;
    font-size: 0.94rem;
    line-height: 1.5;
  }

  /* Data labels */
  .exhibitions-roundup tbody td::before {
    content: attr(data-th);
    display: block;
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-subtle, #7a7a7a);
    margin-bottom: 0.1rem;
  }

  /* Title – make it the card headline */
  .exhibitions-roundup tbody td[data-th="Title"] {
    font-weight: 700;
    font-size: 1rem;
    color: var(--ink, #222);
    padding-bottom: 0.15rem;
  }

  .exhibitions-roundup tbody td[data-th="Title"]::before {
    display: none;                      /* no label needed — it's obviously the title */
  }

  /* Artist — secondary emphasis */
  .exhibitions-roundup tbody td[data-th="Artist(s)"] {
    font-size: 0.92rem;
    color: var(--ink-muted, #555);
    padding-bottom: 0.4rem;
  }

  .exhibitions-roundup tbody td[data-th="Artist(s)"]::before {
    display: none;                      /* artist reads naturally after the title */
  }

  /* Venue */
  .exhibitions-roundup tbody td[data-th="Venue"] {
    color: var(--ink, #222);
  }

  /* Dates */
  .exhibitions-roundup tbody td[data-th="Dates"],
  .exhibitions-roundup tbody td[data-th="Date / Time"] {
    color: var(--ink, #222);
  }

  /* Price */
  .exhibitions-roundup tbody td[data-th="£"] {
    font-size: 0.88rem;
    color: var(--ink-muted, #555);
  }

  /* Link badge – larger touch target on mobile */
  .exhibitions-roundup .badge,
  .exhibitions-roundup .badge--available {
    padding: 0.35rem 0.9rem;
    font-size: 0.85rem;
    margin-top: 0.35rem;
  }

  /* Tags cell – hidden on mobile too */
  .exhibitions-roundup tbody td[data-th="Tags"] {
    display: none !important;
  }

  /* Closing Soon row warm tint on mobile */
  #closing-soon + table tbody tr {
    border-left: 3px solid rgba(210, 155, 30, 0.4);
  }

  /* H2 */
  .exhibitions-roundup h2 {
    font-size: 1.2rem;
    margin: 1.25rem 0 0.4rem;
  }

  /* H3 */
  .exhibitions-roundup h3 {
    font-size: 1rem;
    margin: 1.5rem 0 0.6rem;
  }

  /* Counts line */
  .exhibitions-roundup > p {
    font-size: 0.85rem;
    margin-bottom: 1rem;
  }
}


/* =====================================================
   11. TABLET TWEAKS (721–960px)
   ===================================================== */

@media (min-width: 721px) and (max-width: 960px) {
  .exhibitions-roundup table {
    font-size: 0.9rem;
  }

  .exhibitions-roundup thead th {
    font-size: 0.78rem;
    padding: 0.6rem 0.5rem;
  }

  .exhibitions-roundup tbody td {
    padding: 0.65rem 0.5rem;
  }
}


/* =====================================================
   12. PRINT STYLES (bonus)
   ===================================================== */

@media print {
  .exhibitions-roundup table {
    font-size: 0.85rem;
  }

  .exhibitions-roundup tbody tr:hover {
    background: none;
  }

  .exhibitions-roundup .badge,
  .exhibitions-roundup .badge--available {
    border: 1px solid #999;
    background: none;
    color: #333;
  }
}
