* {
  box-sizing: border-box;
}

/* Skip link - visible on focus */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #ffd166;
  color: #050608;
  padding: 0.5rem 1rem;
  text-decoration: none;
  z-index: 100;
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
}

/* Links - WCAG compliant light blue */
a {
  color: #5B9FFF;
  text-decoration: underline;
}

a:visited {
  color: #7BB3FF;
}

a:hover {
  color: #8FC4FF;
}

a:focus {
  outline: 3px solid #ffd166;
  outline-offset: 2px;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0b0c10;
  color: #f5f5f5;
}

#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #333;
}

main {
  display: grid;
  grid-template-columns: 2fr 1fr;
  min-height: 0;
  flex: 1;
}

#map-section {
  min-height: 0;
}

#map {
  height: 100%;
  min-height: 70vh;
  width: 100%;
}

#artwork-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

#artwork-list li {
  margin-bottom: 1rem;
  cursor: pointer;
}

#artwork-list li:hover {
  color: #ffd166;
}

.artwork-title {
  font-weight: 600;
}

.artwork-meta {
  font-size: 0.8rem;
  opacity: 0.8;
}

/* Responsive */

@media (max-width: 800px) {
  main {
    grid-template-columns: 1fr;
  }

  #map {
    min-height: 50vh;
  }
}

/* added styles for leaflet map */

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #050608;
  color: #f2f2f2;
}

header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #262730;
  background: #050608;
}

header h1 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

header p {
  margin: 0.3rem 0 0;
  font-size: 0.9rem;
  opacity: 0.8;
}

main {
  display: grid;
  grid-template-columns: 2fr 1fr;
  min-height: 0;
  flex: 1;
}

/* Map pane uses subtle border to feel like a technical view */

#map-section {
  min-height: 0;
  border-right: 1px solid #262730;
}

#map {
  height: 100%;
  min-height: 70vh;
  width: 100%;
}

/* Sidebar */
#sidebar {
  padding: 1rem;
  overflow-y: auto;
  background: radial-gradient(circle at top left, #11121c 0, #050608 60%);
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-left: 1px solid #262730;
  max-height: 100vh;  /* ADD THIS */
  height: 100%;        /* ADD THIS */
}

#sidebar h2 {
  margin-top: 0;
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.9;
}

/* Filter controls */

#filters {
  margin-bottom: 1rem;
  font-size: 0.8rem;
  position: sticky;
  top: 0;
  background: radial-gradient(circle at top left, #11121c 0, #050608 60%);
  z-index: 10;
  padding-bottom: 0.5rem;
}

.filter-group {
  margin-bottom: 0.5rem;
}

.filter-group label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  opacity: 0.7;
  margin-bottom: 0.15rem;
}

.filter-group select,
.filter-group input {
  width: 100%;
  padding: 0.25rem 0.35rem;
  background: #11121c;
  border: 1px solid #2c2e3a;
  color: #f2f2f2;
  font-size: 0.8rem;
}

/* List styling */

#artwork-list {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

#artwork-list li {
  margin-bottom: 0.85rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid #1a1b22;
  cursor: pointer;
}

#artwork-list li:last-child {
  border-bottom: none;
}

#artwork-list li:hover {
  color: #ffd166;
}

.artwork-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.artwork-meta {
  font-size: 0.75rem;
  opacity: 0.8;
}

.artwork-tags {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.7;
}

/* Popup tweaks */

.leaflet-popup-content-wrapper {
  background: #050608;
  color: #f2f2f2;
  border-radius: 0;
  border: 1px solid #262730;
}

.leaflet-popup-tip {
  background: #050608;
}

/* Responsive */

/* @media (max-width: 800px) {
  main {
    grid-template-columns: 1fr;
  }

  #map {
    min-height: 50vh;
  }

  #sidebar {
    border-top: 1px solid #262730;
  }

  #artwork-list {
    max-height: 40vh;
  }
} */
 /* Compact filters on mobile - side by side */
@media (max-width: 800px) {
  main {
    grid-template-columns: 1fr;
  }
  
  #map {
    min-height: 50vh;
  }
  
  #sidebar {
    border-top: 1px solid #262730;
  }
  
  /* ADD THIS - makes filters horizontal */
  #filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }
  
  .filter-group {
    flex: 1;
    margin-bottom: 0;
  }
  
  .filter-group label {
    font-size: 0.65rem;
    margin-bottom: 0.1rem;
  }
  
  .filter-group select,
  .filter-group input {
    font-size: 0.75rem;
    padding: 0.2rem 0.3rem;
  }
  
  /* Give artwork list more room */
  #artwork-list {
    max-height: 50vh; /* Increase from 40vh */
  }
}


/* Desaturate all map tiles */
.leaflet-tile-pane {
  filter: grayscale(100%) contrast(1.05) brightness(0.95);
}

/* tour controls */
#tour-controls {
  margin-bottom: 1rem;
  display: flex;
  gap: 0.4rem;
  position: sticky;
  top: 80px;
  background: radial-gradient(circle at top left, #11121c 0, #050608 60%);
  z-index: 10;
  padding-bottom: 0.5rem;
}

#tour-controls button {
  flex: 1;
  padding: 0.25rem 0.4rem;
  background: #11121c;
  border: 1px solid #2c2e3a;
  color: #f2f2f2;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
}

#tour-controls button:disabled {
  opacity: 0.4;
  cursor: default;
}

#tour-controls button:hover:not(:disabled) {
  border-color: #ffd166;
}
/* Fullscreen image modal */
#image-modal {
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(5, 6, 8, 0.98);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

/* Statement modal */
#statement-modal {
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(5, 6, 8, 0.49);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

#statement-modal .modal-content {
  max-width: 600px;
  background: #11121c;
  border: 1px solid #262730;
  padding: 2rem;
  border-radius: 4px;
  text-align: left;
}

#statement-modal h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: #ffd166;
}

#statement-modal p {
  margin: 0;
  line-height: 1.6;
  color: #f2f2f2;
  font-size: 1rem;
}

#statement-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  background: #050608;
  border: 2px solid #ff3333;
  border-radius: 50%;
  color: #ff3333;
  font-size: 1.8rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  z-index: 10001;
  transition: all 0.2s ease;
}

#statement-close:hover {
  background: #ff3333;
  color: #050608;
}

#statement-close:focus {
  outline: 3px solid #ffd166;
  outline-offset: 2px;
}

.modal-hidden {
  display: none !important;
}

.modal-content {
  position: relative;
  max-width: 95%;
  max-height: 95%;
  text-align: center;
}

/* Utility: visually hidden (for live regions, skip links, etc.) */
.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
  border: 0; padding: 0; margin: -1px;
}

#modal-image {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

#modal-caption {
  /* margin-top: 1rem; */
  color: #f2f2f2;
  font-size: 1rem;
  opacity: 0.9;
  /* padding-bottom: 3rem; */
}

#modal-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  background: #050608;
  border: 2px solid #ff3333;
  border-radius: 50%;
  color: #ff3333;
  font-size: 1.8rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  z-index: 10001;
  transition: all 0.2s ease;
}

#modal-close:hover {
  background: #ff3333;
  color: #050608;
}

#modal-close:focus {
  outline: 3px solid #ffd166;
  outline-offset: 2px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  #image-modal {
    padding: 1rem;
  }

  #modal-close {
    font-size: 2.5rem;
    right: 1rem;
    top: 0.5rem;
  }
}

/* Force desktop sidebar scroll */
@media (min-width: 801px) {
  #app {
    height: 100vh;
    max-height: 100vh;
  }
  
  main {
    height: 100%;
    overflow: hidden;
  }
  
  #sidebar {
    height: 100%;
    max-height: 100%;
  }
}
