:root{
  --accent: rgba(156,71,255,1);
  --pp-font: "PP Supply Sans", sans-serif;
}

/* No results message */
.no-results {
  position: fixed;
  top: 36px;
  left: 0;
  right: 0;
  bottom: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  color: var(--accent);
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.list.show-no-results .no-results {
  opacity: 1;
}

.no-results-sorry {
  font-family: "PP Playground", var(--pp-font);
  font-weight: 500;
  font-size: 120px;
  line-height: 1;
  margin-bottom: 8px;
}

.no-results-sub {
  font-family: var(--pp-font);
  font-weight: 200;
  font-size: 14px;
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
}

/* base */
body{
  font-family: var(--pp-font);
  color: var(--accent);
  margin: 0;
  overflow-x: hidden;
}

/* font-face definitions */
@font-face {
  font-family: "PP Supply Sans";
  src: local("PP Supply Sans"),
       url("../fonts/PPSupplySans-Regular.woff2") format("woff2"),
       url("../fonts/PPSupplySans-Regular.woff") format("woff"),
       url("../fonts/PPSupplySans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PP Supply Sans";
  src: local("PP Supply Sans Bold"),
       url("../fonts/PPSupplySans-Bold.woff2") format("woff2"),
       url("../fonts/PPSupplySans-Bold.woff") format("woff"),
       url("../fonts/PPSupplySans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PP Supply Sans";
  src: local("PP Supply Sans Ultralight"),
       url("../fonts/PPSupplySans-Ultralight.woff2") format("woff2"),
       url("../fonts/PPSupplySans-Ultralight.woff") format("woff"),
       url("../fonts/PPSupplySans-Ultralight.ttf") format("truetype");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

/* PP Playground Medium font */
@font-face {
  font-family: "PP Playground";
  src: local("PP Playground Medium"),
       url("../fonts/PPPlayground-Medium.woff2") format("woff2"),
       url("../fonts/PPPlayground-Medium.woff") format("woff"),
       url("../fonts/PPPlayground-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* canvas / background */
.canvas {
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,1);
  position: fixed;
  top: 0;
  left: 0;
  overflow: hidden;
  z-index: -1;
}

.list {
  width: 100%;
  height: auto;
  margin: 0;
  position: relative;
  padding: 0;
  padding-top: 36px;
  padding-bottom: 120px;
  overflow: hidden;
}

/* Site header */
.site-header {
  width: 100%;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0;
  box-sizing: border-box;
  border: 1px solid var(--accent);
  border-left: none;
  border-right: none;
  background-color: white;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  overflow: hidden;
}

/* Header column identifiers */
.header-columns {
  display: flex;
  align-items: center;
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.header-col {
  display: inline-block;
  font-family: var(--pp-font);
  font-weight: 200;
  color: var(--accent);
  line-height: 36px;
  -webkit-font-smoothing: antialiased;
  text-transform: uppercase;
  padding: 2px 20px 0;
}

.col-artist {
  flex: 0 0 200px;
  padding-left: 12px;
  font-weight: 400;
}

.col-studio {
  flex: 0 0 180px;
}

.col-location {
  flex: 0 0 180px;
}

/* Hide location header at tablet sizes */
@media (max-width: 1024px) {
  .col-location {
    display: none;
  }
}

/* Fixed bottom stroke */
.bottom-stroke {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--accent);
  z-index: 1000;
}

.header-logotype {
  font-family: var(--pp-font);
  font-weight: 700;
  color: var(--accent);
  line-height: 36px;
  -webkit-font-smoothing: antialiased;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  top: 0;
  padding: 2px 12px 0;
  z-index: 2;
  background-color: white;
  white-space: nowrap;
}

/* common row sizing */
.row {
  width: 100%;
  height: 30px;
  padding: 11px 14px;
  box-sizing: border-box;
  position: relative;
  overflow: visible;
}

/* stacked list styling with collapsed borders */
.list > .row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  margin: 0;
  padding: 0;
  height: 36px;
  width: 100%;
  background-color: transparent;
  border: 1px dotted var(--accent);
  border-left: none;
  border-right: none;
  border-radius: 0;
  transition: background-color 300ms ease-in-out, opacity 600ms;
  cursor: pointer;
}

.list > .row:hover {
  background-color: var(--accent);
}
.list > .row:first-of-type,
.list > .no-results + .row {
  border-top: none !important;
  margin-top: 0 !important;
  position: relative;
  z-index: 1;
}
.list > .row + .row {
  border-top: 0;
  margin-top: -1px;
}

/* text reset inside rows */
.row .name,
.row .studio,
.row .neighbourhood,
.row .number {
  position: static;
  margin: 0;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  height: 36px;
  line-height: 1;
  font-family: var(--pp-font);
  font-weight: 200;
  color: var(--accent);
  -webkit-font-smoothing: antialiased;
  text-transform: uppercase;
  transition: color 300ms ease-in-out;
  padding-top: 2px;
}

.list > .row:hover .name,
.list > .row:hover .studio,
.list > .row:hover .neighbourhood,
.list > .row:hover .number {
  color: white !important;
}

/* name column - left aligned */
.row .name {
  flex: 0 0 200px;
  text-align: left;
  padding-left: 12px;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
}

/* studio column */
.row .studio {
  flex: 0 0 180px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
}

/* neighbourhood column */
.row .neighbourhood {
  flex: 0 0 180px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
}

/* numbers column - right aligned, pushed to the end */
.row .number {
  flex: 0 0 auto;
  margin-left: auto;
  text-align: right;
  padding-right: 12px;
  white-space: nowrap;
}

/* ensure list colors */
.list .row .name,
.list .row .studio,
.list .row .neighbourhood,
.list .row .number { color: var(--accent) !important; }

/* Hide neighbourhood at tablet sizes (studio stays visible) */
@media (max-width: 1024px) {
  .row .neighbourhood {
    display: none;
  }
}

/* Hover image preview */
.hover-preview {
  position: fixed;
  display: none;
  pointer-events: none;
  z-index: 5000;
}

.hover-preview img {
  max-height: 400px;
  width: auto;
  display: block;
  filter: 
    drop-shadow(1px 0 0 var(--accent))
    drop-shadow(-1px 0 0 var(--accent))
    drop-shadow(0 1px 0 var(--accent))
    drop-shadow(0 -1px 0 var(--accent));
}


/* Mobile filter toggle — hidden on desktop */
.mobile-filter-toggle {
  display: none;
}

/* Bottom container with frosted glass effect */
.bottom-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  padding: 16px 16px 18px 16px;
  border-top: 1px solid var(--accent);
  border-radius: 0;
  /* Frosted glass effect */
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  /* Match the box styling */
  box-sizing: border-box;
}

/* Buttons wrapper */
.buttons-wrapper {
  display: flex;
  flex-direction: row;
  gap: 0;
  align-items: stretch;
}

/* Button section wrapper */
.button-section {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  flex: 1 1 0;
  padding: 0 16px;
}

/* Stroke between button sections */
.button-section + .button-section {
  padding-top: 0;
  position: relative;
}

.button-section + .button-section::before {
  content: '';
  position: absolute;
  left: 0;
  top: -16px;
  bottom: -18px;
  height: auto;
  border-left: 1px dotted var(--accent);
  pointer-events: none;
}

/* Section subheader */
.section-subheader {
  font-family: var(--pp-font);
  font-weight: 700;
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
  white-space: nowrap;
  padding: 3px 0;
  line-height: normal;
  display: inline-block;
  position: relative;
  top: 1px;
  margin-right: 4px;
}

/* Button group layout */
.button-group {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

/* Toggle button base styles */
.toggle-btn {
  font-family: var(--pp-font);
  font-weight: 400;
  font-size: 11px;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 4px 10px 3px;
  cursor: pointer;
  transition: background-color 300ms ease-in-out, color 300ms ease-in-out;
  -webkit-font-smoothing: antialiased;
  white-space: nowrap;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.toggle-btn:hover {
  background: rgba(156, 71, 255, 0.1);
}

/* Active/toggled state */
.toggle-btn.active {
  background: var(--accent) !important;
  color: white !important;
}

/* When dropdown open, keep list rows visually unchanged (prevent hover from inverting text) */
body.dropdown-open .list > .row:hover {
  background-color: transparent !important;
}
body.dropdown-open .list > .row .name,
body.dropdown-open .list > .row .studio,
body.dropdown-open .list > .row .neighbourhood,
body.dropdown-open .list > .row .number {
  color: var(--accent) !important;
}

body.dropdown-open {
  overflow: hidden;
}

body.dropdown-open .list {
  visibility: hidden;
}

/* Row expanded state — the clicked row grows to fill between header and footer */
/* Row is moved to body so it escapes Isotope's transform context */
.row.row-expanded {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 1500;
  background: white;
  display: block;
  overflow: hidden;
  border: none;
  transition: top 0.5s ease-in-out, height 0.5s ease-in-out;
  padding: 0;
}

/* Placeholder left in the list to keep Isotope layout stable */
.row-placeholder {
  visibility: hidden;
}

/* Text bar inside expanded row — mirrors the normal row layout */
.row-text-bar {
  display: flex;
  align-items: center;
  height: 36px;
  width: 100%;
  border-bottom: 1px dotted var(--accent);
  box-sizing: border-box;
}

/* Collapse overlay — inherits text styling */
.collapse-overlay .name,
.collapse-overlay .studio,
.collapse-overlay .neighbourhood,
.collapse-overlay .number {
  position: static;
  margin: 0;
  padding: 0 20px;
  display: inline-block;
  line-height: 36px;
  font-family: var(--pp-font);
  font-weight: 200;
  color: var(--accent);
  -webkit-font-smoothing: antialiased;
  text-transform: uppercase;
}

.collapse-overlay .name {
  flex: 0 0 200px;
  text-align: left;
  padding-left: 12px;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
}

.collapse-overlay .studio {
  flex: 0 0 180px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
}

.collapse-overlay .neighbourhood {
  flex: 0 0 180px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
}

.collapse-overlay .number {
  flex: 0 0 auto;
  margin-left: auto;
  text-align: right;
  padding-right: 12px;
  white-space: nowrap;
}

/* Gallery inside the expanded row — horizontal scroll */
.row-gallery {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  /* equal padding: 12px on all sides, top accounts for the text bar border */
  padding: 12px;
  align-items: flex-start;
  height: calc(100% - 36px); /* fill remaining space below the 36px text bar */
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: hidden;
  transition: transform 0.5s ease-in-out;
  /* hide scrollbar but still allow scrolling */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.row-gallery::-webkit-scrollbar {
  display: none;
}

/* End zone spacer at right side of gallery */
.gallery-endzone {
  flex-shrink: 0;
  width: 100px;
  min-width: 100px;
  align-self: stretch;
}

.row-gallery img {
  height: calc(100% - 0px);
  width: auto;
  flex-shrink: 0;
  display: block;
  border: 1px solid var(--accent);
  padding: 0;
  background: transparent;
  object-fit: contain;
  position: relative;
  z-index: 1;
  transition: opacity 0.3s ease;
}

/* Dim images when hovering the end zone */
.row-gallery.endzone-hover img {
  opacity: 0.5;
}

/* Endzone is the positioning context for the arrow */
.gallery-endzone {
  position: relative;
}

/* Cursor-follow tooltip on endzone hover */
.endzone-tooltip {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--pp-font);
  font-weight: 400;
  font-size: 9px;
  color: var(--accent);
  text-transform: uppercase;
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.endzone-tooltip.visible {
  opacity: 1;
}

/* Arrow — lives inside endzone, scrolls with gallery content */
.gallery-arrow {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 10px; /* 10px gap from the last image */
  right: 24px;
  z-index: 3;
  pointer-events: none;
  animation: arrow-flash 0.7s ease-in-out infinite;
}

@keyframes arrow-flash {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.2; }
}

/* Gallery close (X) button — hidden off-screen left, revealed by scrolling */
.gallery-close {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  position: relative;
  cursor: pointer;
  align-self: center;
  z-index: 10;
  transition: opacity 300ms ease-in-out;
}

.gallery-close::before,
.gallery-close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 5px;
  background: var(--accent);
}

.gallery-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.gallery-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.gallery-close:hover {
  opacity: 0.2;
}

/* Stem — always visible, spans from last image edge to chevron */
.gallery-arrow::before {
  content: '';
  position: absolute;
  left: 0;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  height: 5px;
  background: var(--accent);
}

/* Extended tail — fades in on endzone hover, stretches far left across all images */
.gallery-arrow.show-tail::before {
  left: -200vw;
}

.gallery-arrow.show-tail {
  animation: none;
  opacity: 1;
}

/* Arrowhead chevron pointing right — always visible */
.gallery-arrow::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  width: 20px;
  height: 20px;
  border-top: 5px solid var(--accent);
  border-right: 5px solid var(--accent);
  transform: translateY(-50%) rotate(45deg);
  transform-origin: center center;
  box-sizing: border-box;
}

/* ============================================================
   MOBILE BREAKPOINT (≤768px)
   ============================================================ */
@media (max-width: 768px) {

  /* ---- LIST ROWS: show only name + number (studio/neighbourhood hidden, shown via marquee) ---- */
  .row .studio,
  .row .neighbourhood {
    display: none !important;
  }

  .row .name {
    flex: 0 0 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    z-index: 2;
  }

  .row .number {
    position: relative;
    z-index: 2;
  }

  /* ---- MOBILE MARQUEE ---- */
  .mobile-marquee {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    height: 36px;
    display: inline-flex;
    align-items: center;
    position: relative;
  }

  .mobile-marquee-inner {
    display: inline-flex;
    align-items: center;
    gap: 0;
    white-space: nowrap;
    animation: marquee-scroll 8s linear infinite;
  }

  .mobile-marquee-inner span {
    font-family: var(--pp-font);
    font-weight: 200;
    color: var(--accent);
    text-transform: uppercase;
    -webkit-font-smoothing: antialiased;
    line-height: 1;
    padding: 0 20px;
    padding-top: 2px;
  }

  /* Active row with marquee: accent bg, white text */
  .row.marquee-active,
  .row-text-bar.marquee-active {
    background-color: var(--accent) !important;
  }

  .row.marquee-active .name,
  .row.marquee-active .number,
  .row-text-bar.marquee-active .name,
  .row-text-bar.marquee-active .number {
    color: white !important;
  }

  .row.marquee-active .mobile-marquee-inner span,
  .row-text-bar.marquee-active .mobile-marquee-inner span {
    color: white;
  }

  @keyframes marquee-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
  }

  /* ---- HEADER COLUMNS: match list ---- */
  .col-studio,
  .col-location {
    display: none !important;
  }

  .col-artist {
    flex: 1 1 auto;
  }

  /* ---- COLLAPSE OVERLAY: match list ---- */
  .collapse-overlay .studio,
  .collapse-overlay .neighbourhood {
    display: none !important;
  }

  .collapse-overlay .name {
    flex: 0 0 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* ---- NO RESULTS ---- */
  .no-results-sorry {
    font-size: 64px;
  }

  .no-results-sub {
    font-size: 12px;
  }

  /* ---- MOBILE FILTER TOGGLE BUTTON ---- */
  .mobile-filter-toggle {
    display: block;
    width: 100%;
    font-family: var(--pp-font);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    -webkit-font-smoothing: antialiased;
    border: none;
    border-top: 1px solid var(--accent);
    border-radius: 0;
    padding: 10px 0;
    cursor: pointer;
    transition: background-color 400ms ease-in-out, color 400ms ease-in-out;
    /* Default closed state: filled purple, white text */
    background: var(--accent);
    color: white;
    /* Always at the very bottom */
    flex-shrink: 0;
    position: relative;
    z-index: 2;
  }

  /* Open state: white bg, purple text */
  .mobile-filter-toggle.open {
    background: white;
    color: var(--accent);
  }

  /* ---- BOTTOM FILTER BAR ---- */
  .bottom-container {
    padding: 0;
    max-height: none;
    overflow: visible;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column-reverse; /* button at bottom, filters above */
    transform: translateZ(0); /* GPU layer — immune to reflows */
    will-change: transform;
  }

  /* Filters panel: animate max-height for smooth reveal */
  .bottom-container .buttons-wrapper {
    flex-direction: column;
    gap: 10px;
    padding: 0 10px;
    max-height: 0;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    transition: max-height 400ms ease-in-out, padding 400ms ease-in-out;
  }

  /* Show filters when open */
  .bottom-container .buttons-wrapper.filters-open {
    display: flex;
    max-height: 45vh;
    padding: 10px 10px 12px;
    overflow-y: auto;
  }

  .button-section {
    flex: none;
    padding: 0;
    flex-wrap: wrap;
  }

  /* Add horizontal divider between stacked sections instead */
  .button-section + .button-section {
    padding-top: 10px;
    border-top: none;
    position: relative;
  }

  .button-section + .button-section::before {
    display: block;
    content: '';
    position: absolute;
    top: 0;
    left: -10px;
    right: -10px;
    height: 0;
    border-top: 1px dotted var(--accent);
  }

  .button-group {
    gap: 6px;
    justify-content: flex-start;
  }

  .toggle-btn {
    font-size: 10px;
    padding: 4px 8px 3px;
  }

  .section-subheader {
    font-size: 10px;
  }

  /* ---- EXPANDED ROW / GALLERY ---- */
  .row-gallery {
    gap: 8px;
    padding: 8px;
    height: calc(100% - 36px);
  }

  .row-gallery img {
    height: calc(100% - 0px);
    width: auto;
    max-width: none;
    object-fit: unset;
  }

  .gallery-endzone {
    width: 60px;
    min-width: 60px;
  }

  .gallery-arrow::after {
    width: 14px;
    height: 14px;
    border-width: 4px;
  }

  .gallery-close {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
  }

  .gallery-close::before,
  .gallery-close::after {
    width: 20px;
    height: 4px;
  }

  /* ---- HOVER PREVIEW: disable on mobile (touch) ---- */
  .hover-preview {
    display: none !important;
  }

  /* Let the endzone tooltip pass taps through to endzone beneath */
  .endzone-tooltip {
    pointer-events: none;
  }

  /* Soft flash on the endzone tooltip when it appears on mobile */
  .endzone-tooltip.visible {
    animation: tooltip-flash 1.2s ease-in-out infinite;
  }

  @keyframes tooltip-flash {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.3; }
  }

  /* ---- LIST PADDING ---- */
  .list {
    padding-bottom: 180px; /* extra room for taller stacked filter bar */
  }
}
