/* Material design style for newsletter button */
#modal-newsletter-button {
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  background-color: #C24A35;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
  cursor: pointer;
}
#modal-newsletter-button:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
#modal-newsletter-button:active {
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
  background-color: #A3362A;
}
        
/* Make the map fill the entire browser window */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden; /* Prevent scrolling in kiosk mode */
  user-select: none; /* Prevent text selection */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  touch-action: manipulation; /* Optimize touch interactions */
  -webkit-touch-callout: none; /* Disable iOS callout */
  -webkit-tap-highlight-color: transparent; /* Remove tap highlight */
}

/* Use Inter for all headings - optimized for large displays */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', 'Source Sans Pro', system-ui, -apple-system, sans-serif;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1 {
    font-size: 32px;
    font-weight: 700;
    margin: 20px 0 0;
}
h2 {
    font-size: 28px;
    font-weight: 500;
    margin: 0 0 10px 0;
}
h3 {
    font-size: 25px;
    font-weight: 700;
    margin: 0 0 10px 0;
}
h4 {
    font-size: 21px;
    font-weight: 500;
    margin: 0;
}

/* Use Inter for all paragraph (body) text - optimized for large displays */
p {
  font-family: 'Inter', 'Source Sans Pro', system-ui, -apple-system, sans-serif;
  font-size: 21px;
  font-weight: 500;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.main-banner {
    position:absolute;
    z-index: 10;
    top:0;
    left:0;
    width:100%;
    margin:20px 0;
    color:#FFFFFF;
    text-align: center;
    background-color: #C24A35 /*#e74c3c*/;
}
.main-banner h1 {
    font-size: 63px;
    margin: 0;
}

#map {
  height: 100%;
  width: 100%;
  /*touch-action: manipulation;*/ /* tells the browser to treat taps as clicks immediately */
}

/* Modal overlay styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.modal-content {
  background: #B0AAA3;
  padding: 60px;
  border-radius: 8px;
  width: 50vw;
  height: 70vh;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  position: relative;
  display: flex;
  flex-direction: column;
  transform: scale(0);
  transition: transform 0.3s ease;
}

/* Video modal overlay */
#video-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1100;
}
#video-modal-content {
  position: relative;
  width: 70vw;
  max-height: 80vh;
  aspect-ratio: 16 / 9;  /* enforce 16:9 */
}
#video-modal-iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
}
#video-modal-close {
  position: absolute;
  top: -10px;
  right: -10px;
  background: #fff;
  border: none;
  font-size: 28px;
  border-radius: 50%;
  width: 48px; /* Larger for touch */
  height: 48px;
  cursor: pointer;
  line-height: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#video-modal-close:hover, #video-modal-close:active {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

#modal-description img {
  display: block;     /* avoid inline-img whitespace */
  width: 100%;        /* stretch to container's width */
  height: auto;       /* auto-adjust height to preserve aspect ratio */
  object-fit: contain;/* ensure the entire image fits inside */
}

#modal-description li {
  padding-bottom:10px;
}

.modal-content.show {
  transform: scale(1);
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 32px; /* Larger for touch */
  color: #333;
  cursor: pointer;
  padding: 10px; /* Larger touch target */
  min-width: 44px; /* Minimum touch target size */
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.modal-close:hover, .modal-close:active {
  background-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}
.modal-photo {
  /*width: 240px;
  height: auto;
  margin-bottom: 10px;
  display: block;
  border-radius: 4px;*/
  display: block;
  width: auto;
  max-height: 50%; 
  max-width:100%;    
  object-fit: contain;  
  margin-bottom: 1rem;
}

#modal-body {
  flex: 1;
  display: flex;
  gap: 20px; /* spacing between columns */
  min-height: 0;
}
.modal-column {
  flex: 1;
  overflow-y: auto;
  min-height: 0; /* allow the column to shrink within the flex container and enable scrolling */
}

.column2 {
  overflow-y: scroll;
  scrollbar-gutter: stable; /* reserve space and force visible gutter */
  padding-right: 5px;        /* space between content and scrollbar */
}
#modal-video {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  border-radius: 4px;
  margin-bottom:20px;
}

/* Thumbnail container aspect ratio & play overlay */
#modal-video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  cursor: pointer;
}
#modal-video-thumbnail {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Play button icon */
#modal-video-container::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 50px 0 50px 80px;
  border-color: transparent transparent transparent #C24A35;
}

/* Looping video container and styling */
#modal-loop-video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin-top: 10px; /* match inline margin */
}
#modal-loop-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  border-radius: 4px;
}

/* Always show scrollbars in WebKit browsers for the second column only */
.column2::-webkit-scrollbar {
  width: 8px;
}
.column2::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}
.column2::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 4px;
}

/* Ensure Video.js player fits within the video modal */
#video-modal-content .video-js,
#video-js-player {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
}
/* Make poster image cover the area */
.video-js .vjs-poster {
  object-fit: cover;
}

/* Kiosk Mode Enhancements */
.kiosk-mode {
  /* Removed fullscreen positioning - using browser's normal window */
}

/* Touch Optimization */
.touch-target {
  min-width: 44px;
  min-height: 44px;
  padding: 8px;
  touch-action: manipulation;
}

/* Enhanced Start Over Button */
#start-over {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  padding: 15px 20px; /* Larger for touch */
  min-width: 120px;
  min-height: 48px;
  background: #fff;
  border: 2px solid #ccc;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: all 0.2s ease;
  touch-action: manipulation;
}

#start-over:hover, #start-over:active {
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(0,0,0,0.3);
  background: #f0f0f0;
}

/* Screensaver removed - using modal cycling instead */

/* Loading States */
.loading {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #C24A35;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Error States */
.error-message {
  background: #ff4444;
  color: white;
  padding: 20px;
  border-radius: 8px;
  margin: 20px;
  text-align: center;
  font-size: 18px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Health Status Indicator - Hidden for kiosk use */
.health-indicator {
  display: none;
}

/* Maintenance Mode */
.maintenance-mode {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  color: white;
  text-align: center;
}

.maintenance-content {
  max-width: 500px;
  padding: 40px;
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

/* Gesture Feedback */
.gesture-feedback {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: scale(0);
  transition: transform 0.3s ease-out;
  z-index: 1000;
}

.gesture-feedback.active {
  transform: scale(1);
}

/* Touch to Begin Message */
.touch-to-begin {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  background: rgba(194, 74, 53, 0.9);
  color: white;
  padding: 20px 40px;
  border-radius: 50px;
  font-size: 28px;
  font-weight: bold;
  text-align: center;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  animation: pulse 2s infinite;
  display: none;
  font-family: 'Inter', 'Source Sans Pro', system-ui, -apple-system, sans-serif;
}

@keyframes pulse {
  0%, 100% { 
    opacity: 0.8; 
    transform: translateX(-50%) scale(1);
  }
  50% { 
    opacity: 1; 
    transform: translateX(-50%) scale(1.05);
  }
}