/* styles.css */

/* ============ Global Colour Tokens (edit these to re-theme) ============ */
/* Branding: dark slate panels, electric blue primary, orange action,
   rainbow gradient borders, aqua–indigo utilities. */
:root{
  /* Core brand */
  --brand-primary: #323e48;                 /* Electric Blue */
  --brand-primary-rgb: 50,62,72;

  --brand-secondary: #0a2c4b;               /* Legacy token (kept for compatibility) */
  --brand-secondary-rgb: 10,44,75;

  --brand-slate: #323e48;                   /* Dark Slate panel bg */
  --brand-slate-rgb: 50,62,72;

  --brand-accent: #E96924;                  /* Orange CTA */
  --brand-accent-rgb: 233,105,36;

  --brand-aqua: #5EC9E3;                    /* Aqua accent */
  --brand-aqua-rgb: 94,201,227;

  --brand-indigo: #243969;                  /* Indigo */
  --brand-indigo-rgb: 36,57,105;

  /* Backwards-compatible tokens mapped to new scheme */
  --brand-navy: var(--brand-slate);
  --brand-navy-rgb: var(--brand-slate-rgb);

  /* Neutrals & utility */
  --white: #ffffff;
  --black: #000000;
  --grey-100: #1e1e1e;
  --grey-200: #2a2a2a;
  --muted-border: #ccc;
  --success: #4caf50;
  --danger: #ff6b6b;

  /* Opacity helpers */
  --o-70: 0.7;
  --o-80: 0.8;
  --o-90: 0.9;

  /* Rainbow gradient borders */
  --border-gradient-h: linear-gradient(to right,
      #0071CE 0%, #6C69CD 14%, #A05CC1 29%, #C74EAB 43%, #E2448E 57%,
      #F1446D 71%, #F3534A 86%, #E96924 100%);
  --border-gradient-v: linear-gradient(to bottom,
      #0071CE 0%, #6C69CD 14%, #A05CC1 29%, #C74EAB 43%, #E2448E 57%,
      #F1446D 71%, #F3534A 86%, #E96924 100%);

  /* Utility gradient (unchanged API) */
  --panel-gradient: linear-gradient(145deg, var(--brand-aqua), var(--brand-indigo));
}

/* Import Cesium Widgets CSS */
@import url(Cesium/Widgets/widgets.css);

/* Import Font Awesome for Icons */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

/* Import Fancybox CSS */
@import url('https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.css');
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

.roboto-<uniquifier> {
  font-family: "Roboto", sans-serif;
  font-optical-sizing: auto;
  font-weight: <weight>;
  font-style: normal;
  font-variation-settings: "wdth" 100;
}

/* Reset default margins and paddings */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Roboto, sans-serif;
  border-radius:0 ;
}

/* Full viewport for Cesium container */
html, body, #cesiumContainer {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* Logo positioning */
#logo {
  position: relative;
  top: 10px;
  left: 0px;
  padding-bottom:20px;
  z-index: 2;
  object-fit:contain;
}
.cesium-viewer-bottom {
  display: none !important;
}

/* Model Title Bar styling (colours/border only) */
.model-title-bar {
  position: absolute;
  top: -1px;
  border: 3px solid; 
  border-top: none;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(var(--brand-navy-rgb), var(--o-70));
  backdrop-filter: saturate(180%) blur(20px);
  will-change:opacity;
  padding: 10px 20px;
  border-image: var(--border-gradient-h) 20;
}
.model-title-bar h2 {
  color: var(--white);
  margin: 0;
}

/* COG Viewer Styles */
#cog-viewer {
  background-color: var(--grey-100);
}
#infoContent a{
	color: var(--white);
}

#cog-canvas {
  background:
    linear-gradient(45deg, var(--grey-200) 25%, transparent 25%),
    linear-gradient(-45deg, var(--grey-200) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--grey-200) 75%),
    linear-gradient(-45deg, transparent 75%, var(--grey-200) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}
#orthoBackdrop{
  background: rgba(var(--brand-navy-rgb), var(--o-70)) !important;
  backdrop-filter: saturate(180%) blur(20px);
  will-change:opacity;
}
#orthoViewer{
  background: var(--white);
  border: solid 5px;
  border-image: var(--border-gradient-h) 20;
}

.spinner {
  border: 5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 5px solid var(--white);
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Toolbar (colours/border only) */
#toolbar {
  width:100%;
  position: absolute;
  bottom: -1px;
  padding-bottom: 15px;
  padding-top: 15px;
  padding-right:20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 290;
  background: rgba(var(--brand-navy-rgb), var(--o-70));
  backdrop-filter: saturate(180%) blur(20px);
  will-change:opacity;
  display: flex;
  justify-content: flex-end;
  transition: justify-content .3s ease;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 3px solid var(--white);
  border-image: var(--border-gradient-h) 1;
}
#toolbar h1 {
  color: var(--white);
  font-size: 20px;
  margin: 0;
}
#toolbar .fas {
  padding-right: 5px;
}

/* Initially hide all toolbar buttons (shown via JS) */
#toolbar button { display: none; }

/* Responsive justify (unchanged) */
body:has(#sidePanel.minimised),
body:has(#sidePanel[style*="display: none"]) {
  #toolbar { justify-content: center !important; transition: justify-content 0.3s ease; }
}
body:has(#sidePanel):not(:has(#sidePanel.minimised)):not(:has(#sidePanel[style*="display: none"])) #toolbar {
  justify-content: flex-end !important; transition: justify-content 0.3s ease;
}

body:has(#sidePanel.minimised),
body:has(#sidePanel[style*="display: none"]) {
  #instructionsContainer { justify-content: center !important; transition: justify-content 0.3s ease; }
}
body:has(#sidePanel):not(:has(#sidePanel.minimised)):not(:has(#sidePanel[style*="display: none"])) #instructionsContainer {
  justify-content: flex-end !important; transition: justify-content 0.3s ease;
}

.toggle-icon:hover{ color: var(--white); }

#adminToggleButton { display: none; }

/* Button styles (colour only) */
#toolbar button,
#clearButton,
#contactButton,
#adminToggleButton,
#adminPanel button,
#saveModelPositionButton,
#resetModelPositionButton,
#savePinCustomizationButton,
#loadMoreButton {
  color: var(--white);
  background-color: transparent;
  border: 1px solid var(--white);
  padding: 5px 10px;
  cursor: pointer;
  font-weight: 550;
  font-size:15px;
  outline: none;
  transition: background-color 0.3s, color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}
#toolbar button.active,
#adminToggleButton.active {
  display: inline-flex;
  background-color: var(--white);
  color: var(--brand-primary);
}
#toolbar button:hover{
  background: var(--white);
  color: var(--brand-primary);
}

/* Side Panel (colour/border only) */
#sidePanel {
  position: fixed;
  left: -1px;
  top:0px;
  width: 350px;
  height: 100%;
  background: rgba(var(--brand-primary-rgb), var(--o-70)); /* keep translucency, mapped to new blue */
  backdrop-filter: saturate(180%) blur(20px);
  will-change:opacity;
  padding: 15px;
  padding-top:0px;
  z-index: 300;
  overflow-y: auto;
  transition: transform 0.3s ease;
  border-right: 3px solid;
  border-image: var(--border-gradient-v) 1;
}
#sidePanel.minimised { transform: translateX(-100%); }
#sidePanel h3 { color: var(--white); margin-top:10px; margin-bottom: 10px; }

.side-panel-close-button {
  color: #0a2b4e;
  background: var(--white);
  border: 1px solid var(--white);
  font-size: 27px;
  position: absolute;
  top: 3px;
  right: 3px;
  cursor: pointer;
  padding: 0 7px;
}
#sidePanelContent button {
  width: 200px;
  margin: 5px 0;
  border: 1px solid var(--white);
}

/* Toggle Side Panel Button (colour only) */
#toggleSidePanel {
  position: fixed;
  top: 100px;
  transition: left 0.3s ease;
  background: rgba(var(--brand-navy-rgb), var(--o-70));
  backdrop-filter: saturate(180%) blur(20px);
  will-change:opacity;
  color: var(--white);
  border: 1px solid var(--white);
  padding: 10px;
  z-index: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}
#toggleSidePanel:hover {
  background: var(--brand-primary);
  color: var(--white);
}

/* Inputs and dropdowns (colour only) */
#coordinateSystemDropdown,
#searchRadius {
  color: var(--white);
  background-color: transparent;
  border: 1px solid var(--white);
  padding: 5px 10px;
  cursor: pointer;
  outline: none;
}
#coordinateSystemDropdown option {
  background-color: rgba(42,42,42,0.9);
  color: var(--white);
}

/* Measurement Unit and Decimals */
#measurementUnitDropdown,
#measurementDecimals {
  color: var(--brand-primary);
  font-weight: bold;
  background-color: var(--white);
  border: 1px solid var(--white);
  padding: 5px 10px;
  cursor: pointer;
  outline: none;
}

/* Contact Button (fixed version further down remains; colours only here) */
#contactButton {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background-color: rgba(var(--brand-primary-rgb), var(--o-70));
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--white);
  padding: 10px 15px;
  cursor: pointer;
  z-index: 300;
}
#contactButton i { font-size: 16px; }

/* Toggle Switch Styles (unchanged layout; colours adjusted) */
.toolbar-toggle-switch { display: inline-flex; align-items: center; cursor: pointer; font-size: 14px; }
.switch-container { position: relative; width: 50px; height: 24px; margin-right: 8px; flex-shrink: 0; }
.switch-container input { display: none; }
.switch-container .slider { position: absolute; top:0; left:0; right:0; bottom:0; background-color: #ccc; transition: .4s; border-radius: 34px; }
.switch-container .slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 4px; bottom: 4px; background-color: var(--white); transition: .4s; border-radius: 50%; }
.switch-container input:checked + .slider { background-color: #2196F3; }
.switch-container input:checked + .slider:before { transform: translateX(26px); }
.toggle-title { display: inline-block; vertical-align: middle; font-weight: 600; }

/* Admin Panel (colours only) */
#adminPanel {
  position: fixed;
  bottom: 80px;
  left: 20px;
  background: var(--panel-gradient);
  box-shadow: inset 1px 4px 2px -3px rgba(0,0,0,0.7),
              inset -1px -3px 3px -2px rgba(255,255,255,0.2);
  padding: 15px;
  z-index: 1000;
  max-width: 300px;
}
#adminPanel h3,
#adminPanel h4 { color: var(--white); margin-bottom: 10px; }
#adminPanel button {
  color: var(--white); background-color: transparent; border: 1px solid var(--white);
  padding: 5px 10px; cursor: pointer;  outline: none;
  transition: background-color 0.3s, color 0.3s; display: flex; align-items: center; justify-content: center;
}
#adminPanel button:hover { background-color: var(--white); color: var(--black); }
#adminPanel input { width: 100%; margin-top: 5px; padding: 5px; border: 1px solid var(--muted-border);  }
#adminPanel label { margin-top: 10px; color: var(--white); }
#adminPanel div { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }

/* Hidden class */
.hidden { display: none !important; }

/* Mini-Map (colours only) */
#modelMiniMapContainer {
  position: absolute;
  top: 50px;
  right: 10px;
  width: 400px;
  height: 300px;
  border: 1px solid var(--muted-border);
  z-index: 500;
  transition: all 0.3s ease;
}
.hidden-minimised { display: none; }
#closeMinimap {
  padding: 0 !important;
  margin-top: 0;
  position: absolute;
  top: 0;
  right: 0;
  color: var(--white);
  background: var(--brand-primary);
  border: 1px solid var(--white);
  width: 30px;
  height: 30px;
  font-size: 25px;
  cursor: pointer;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s, color 0.3s;
}
#closeMinimap:hover { background-color: var(--white); color: var(--brand-primary); }
#toggleMinimap {
  position: absolute;
  top: 50px;
  right: 10px;
  background: var(--brand-primary);
  color: var(--white);
  border: 1px solid var(--white);
  width: 36px;
  height: 36px;
  font-size: 18px;
  cursor: pointer;
  z-index: 1001;
  transition: background-color 0.3s, color 0.3s;
  display: none;
  align-items: center;
  justify-content: center;
}
#toggleMinimap:hover { background-color: var(--white); color: var(--brand-primary); }
#modelMiniMap { width: 100%; height: 100%; }
.fas.fa-download { color: var(--brand-primary) !important; }

/* Model List Panel (colours only) */
#modelListPanel {
  position: absolute;
  top: 120px;
  right: -1px;
  width: 230px;
  max-height: 400px;
  background: rgba(var(--brand-primary-rgb), var(--o-70));
  backdrop-filter: saturate(180%) blur(20px);
  will-change:opacity;
  z-index: 300;
  overflow-y: auto;
  transition: all 0.3s ease;
  border: 1px solid var(--white);
}
#modelListPanel h2 { color: var(--white); padding: 8px; font-size: 22px; padding-top: 8px; padding-left: 8px; }
.hidden-model-list { display: none; }
#closeModelList {
  position: absolute; top: 3px; right: 3px;
  color: #0a2b4e; background: var(--white); border: 1px solid var(--white);
 width: 30px; height: 30px; font-size: 25px; cursor: pointer; z-index: 1001;
  display: flex; align-items: center; justify-content: center;
}
#closeModelList:hover { background-color: var(--white); color: var(--brand-primary); }
#toggleModelList {
  position: absolute; top: 80px; right: 10px;
  background: rgba(var(--brand-navy-rgb), var(--o-70));
  backdrop-filter: saturate(180%) blur(20px);
  will-change:opacity; color: var(--white);
  border: 1px solid var(--white);
  width: 36px; height: 36px; font-size: 18px; cursor: pointer; z-index: 1001;
  display: none; align-items: center; justify-content: center;
}
#toggleModelList:hover { background-color: var(--brand-primary); color: var(--white); }
#modelList { list-style: none; padding: 10px; margin: 0; }
#modelList li {
  padding: 8px; margin-bottom: 5px; background-color: transparent;
  border: 1px solid var(--white); padding: 5px 10px; cursor: pointer;  font-weight: 550;
  outline: none; transition: background-color 0.3s, color 0.3s; color: var(--white);
}
#modelList li:hover { background: var(--brand-aqua); }

/* Photo Modal styles (colour/border only) */
#photoModal {
  display: none;
  position: fixed;
  z-index: 300;
  left: 0;
  top: 0;
  width: 100%;
  height: calc(100% - 0px);
  overflow: auto;
  background: rgba(var(--brand-navy-rgb), var(--o-70));
  backdrop-filter: saturate(180%) blur(20px);
  will-change:opacity;
  align-items: center;
  justify-content: center;
}
#photoModalContent {
  background: rgba(var(--brand-navy-rgb), var(--o-70));
  backdrop-filter: saturate(180%) blur(20px);
  will-change:opacity;
  border:solid 5px;
  border-image: var(--border-gradient-h) 20;
  margin: auto;
  margin-top: 70px;
  padding: 20px;
  width: 90%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
#paginationControls { display: flex; justify-content: space-between; width: 100%; margin-top: 15px; }
#paginationControls button {
  background-color: var(--brand-aqua); border: none; 
  padding: 10px 20px; color: var(--white); font-weight: bold; cursor: pointer; transition: background-color 0.3s;
}
#paginationControls button:hover { background-color: var(--brand-indigo); color: var(--white); }
#photoModalContent h2 { color: var(--white); }
#closePhotoModal {
  color: var(--white); position: absolute; top: 5px; right: 5px; font-size: 45px; font-weight: bold;
  background: none; border: none; cursor: pointer; transition: color 0.3s;
}
#closePhotoModal:hover, #closePhotoModal:focus { color: #27406F; }
#mainPhotoContainer { text-align: center; margin-bottom: 20px; }
#mainPhotoTitle { font-style: Roboto; font-size: 18px; color: var(--white); margin-bottom: 10px; }
#mainPhotoWrapper {
  position: relative; overflow: hidden; width: 1000px; height: 440px;
  background: rgba(var(--brand-primary-rgb), 1);
  backdrop-filter: saturate(180%) blur(20px); will-change:opacity;
  border: 1px solid var(--white); 
}
#mainPhoto { position: absolute; top: 0; left: 0; transform-origin: top left; cursor: grab; user-select: none; transition: none; }

#relatedPhotosContainer { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 15px; }
#relatedPhotos { display: flex; flex-wrap: nowrap; gap: 10px; overflow-x: auto; flex-grow: 1; justify-content: center; }
#prevPageButton, #nextPageButton {
  background-color: var(--brand-primary); font-size: 35px; border: 1px solid var(--white);
   padding: 10px; color: var(--white); font-weight: bold; cursor: pointer; transition: background-color 0.3s;
}
#prevPageButton:hover, #nextPageButton:hover { background-color: var(--brand-indigo); }
.relatedPhotoItem img {
  width: 100px; height: 100px; object-fit: cover; cursor: pointer; border: 2px solid var(--white); 
  box-shadow: 0 0 5px rgba(0,0,0,0.3); transition: transform 0.3s, border-color 0.3s;
}
.relatedPhotoItem img:hover { transform: scale(1.05); border-color: #00FFFF; }
img.thumbnail.active { border-color: #00FFFF; box-shadow: 0 0 10px #00FFFF; }

/* Load More Button */
#loadMoreButton {
  margin-top: 20px; padding: 10px 20px; cursor: pointer; background-color: var(--brand-aqua);
  border: none;  color: var(--white); font-weight: bold; transition: background-color 0.3s, color 0.3s;
}
#loadMoreButton:hover { background-color: var(--brand-indigo); color: var(--white); }
#accessibilityGuide { margin-top: 10px; font-size: 14px; color: var(--white); text-align: center; }

/* Contact Modal (colours only) */
#contactModal {
  display: none; position: fixed; z-index: 301; left: 0; top: 0; width: 100%; height: 100%;
  overflow: hidden; background-color: rgba(0,0,0,0.8); align-items: center; justify-content: center;
}
#contactModal iframe { width: 80%; height: 80%; border: none;  }
#closeModalButton {
  position: absolute; top: 20px; right: 40px; font-size: 30px; color: var(--white);
  background: none; border: none; cursor: pointer; transition: color 0.3s;
}
#closeModalButton:hover { color: #ccc; }

/* Label and Input Styles */
label { color: var(--white); display: block; }
input[type="number"],
input[type="color"],
input[type="text"],
input[type="range"] {
  width: 100%; padding: 5px; margin-top: 5px; border: 1px solid var(--muted-border);
}
button {
  padding: 12px 10px; cursor: pointer; border: none; background-color: var(--white);
  color: var(--brand-primary); font-size:14px; font-weight: bold; transition: background-color 0.3s, color 0.3s;
}
button:hover { background-color: var(--brand-indigo); color: var(--white); }

.modal {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5);
  display: none; align-items: center; justify-content: center; z-index: 2000;
}
.modal-content { background: var(--white); padding: 20px; position: relative; max-width: 90%; max-height: 90%; overflow: auto; }
.close { position: absolute; top: 10px; right: 10px; background: transparent; border: none; font-size: 24px; cursor: pointer; }
.close:hover, .close:focus { color: var(--black); }

/* Toggle Info Panel Button (colours only) */
#toggleInfoPanel {
  position: fixed;
  bottom: 35%;
  right: -1px;
  background: rgba(var(--brand-navy-rgb), var(--o-70));
  backdrop-filter: saturate(180%) blur(20px);
  will-change:opacity;
  color: var(--white);
  border: 3px solid;
  border-right:none;
  font-size: 25px;
  cursor: pointer;
  z-index: 1001;
  transition: background-color 0.3s, color 0.3s;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: translateY(50%);
  border-image: var(--border-gradient-v) 26;
}
#toggleInfoPanel.active { background: rgba(var(--brand-primary-rgb), 0.8); color: var(--white); }
#toggleInfoPanel:hover { background-color: var(--brand-primary); color: var(--white); }
.hidden-minimised { display: none !important; }
#closeInfoPanel {
  position: absolute;
  top: 3px;
  width: 30px;
  height: 30px;
  right: 3px;
  background: var(--white);
  color: #0a2b4e;
  border: 1px solid var(--white);
  font-size: 24px;
  cursor: pointer;
  padding: 0 !important;
}
#closeInfoPanel:hover { color: #ccc; }
#infoPanel {
  position: fixed;
  bottom: 150px;
  right: 0px;
  background: rgba(var(--brand-primary-rgb), var(--o-70));
  backdrop-filter: saturate(180%) blur(20px);
  will-change:opacity;
  border: 1px solid var(--white);
  padding: 15px;
  z-index: 1000;
  width: auto;
  min-width: 250px;
  max-width: 90vw;
  color: var(--white);
  overflow-y: auto;
  max-height: 70vh;
  transition: transform 0.3s ease, width 0.3s ease;
}
#infoPanel.hidden { transform: translateX(100%); }
#infoPanel h3 { margin-bottom: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Password modal styling (colours only) */
#passwordModal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.9); display: flex; justify-content: center; align-items: center; z-index: 9999; }
#passwordModalContent {
  background: linear-gradient(145deg, #1a2a6c, var(--brand-indigo), var(--brand-aqua));
  padding: 30px; text-align: center; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  max-width: 400px; width: 90%; border: 1px solid rgba(255, 255, 255, 0.2);
}
#passwordModalContent h2 { color: var(--white); margin-bottom: 20px; font-size: 24px; }
#passwordInput { width: 100%; padding: 12px; margin-bottom: 20px; border: none; font-size: 16px; background: rgba(255, 255, 255, 0.9); }
#passwordSubmit { background: var(--brand-primary); color: var(--white); border: none; padding: 12px 30px; font-size: 16px; cursor: pointer; transition: all 0.3s; }
#passwordSubmit:hover { background: #0a7cb0; transform: translateY(-2px); }
#passwordError { color: var(--danger); margin-top: 15px; font-weight: bold; display: none; }

/* Security overlay */
#securityOverlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); z-index: 9998; display: none; pointer-events: none; }

/* Hide content until authenticated */
.protected-content { display: none; }

/* Disable text selection */
body { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }

/* Subtle background pattern (unchanged) */
body::after {
  content: "";
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0) 20%),
    radial-gradient(circle at 90% 80%, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0) 20%);
  pointer-events: none; z-index: -1;
}

/* Volume button (colour only) */
.volume-button { background: var(--brand-primary); color: var(--white); border: none; padding: 6px 10px; font-size: 14px; cursor: pointer; margin-top: 5px; }
.volume-button i { margin-right: 5px; }

/* Instructions Container (colour only) */
#instructionsContainer {
	display:flex;
  position: absolute; top:-41px; left: 50%; transform: translateX(-50%);
  background: rgba(var(--brand-primary-rgb), 1);
  backdrop-filter: saturate(180%) blur(40px); will-change:opacity;
  color: var(--white); padding: 8px 12px; border: solid 1px var(--white);
   font-size: 15px; z-index: 1100;
}
#instructionsContainer.hidden { display: none; }

/* Contact Button duplicate (keep for compatibility; colours only) */
#contactButton {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: var(--brand-primary);
  color: var(--white);
  border: none;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  z-index: 1100;
}
#contactButton i { margin-right: 5px; }

/* Volume Progress UI (unchanged sizing; themed colours) */
#volumeProgressContainer { position: fixed; top: 60%; left: 50%; transform: translateX(-50%); width: 300px; z-index: 10000; display: none; }
.volume-progress-container { position: relative; width: 100%; height: 20px; background-color: #ddd; border-radius: 4px; overflow: hidden; }
.volume-progress-fill { background-color: var(--success); height: 100%; width: 0%; transition: width 0.1s; }
.volume-progress-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 12px; font-weight: bold; color: var(--black); pointer-events: none; }

/* Volume Results Modal (colours only) */
#volumeResultsModal {
  display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: var(--panel-gradient);
  box-shadow: inset 1px 4px 2px -3px rgba(0,0,0,0.7),
              inset -1px -3px 3px -2px rgba(255,255,255,0.2);
  border: 1px solid var(--white); z-index: 10000; width: 320px;
}
#volumeResultsModal .modal-header { background: var(--white); color: var(--brand-primary); padding: 12px; border-top-left-radius: 8px; border-top-right-radius: 8px; font-size: 16px; font-weight: bold; position: relative; }
#volumeResultsModal .modal-header span.close-modal { position: absolute; right: 12px; top: 8px; cursor: pointer; font-size: 18px; font-weight: normal; }
#volumeResultsModal .modal-content { padding: 16px; font-size: 14px; line-height: 1.5; color: var(--white); }
#volumeResultsModal .modal-content p { margin: 8px 0; }
#volumeResultsModal .modal-content em { display: block; margin-top: 4px; font-size: 0.9em; color: var(--white); }

/* Loading Overlay (unchanged sizing; colours) */
#loadingOverlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); z-index: 9999; align-items: center; justify-content: center; flex-direction: column; }
#loadingOverlay .spinner { border: 8px solid #f3f3f3; border-top: 8px solid #3498db; border-radius: 50%; width: 60px; height: 60px; animation: spin 1s linear infinite; }

/* =================================================
   Responsive Layout Adjustments (unchanged)
   ================================================= */
@media (max-width: 1920px) and (min-width: 1190px) {
  #modelMiniMapContainer { width: 300px; height: 225px; top: 10px; right: 10px; }
  #modelListPanel { width: 250px; top: 120px; right: 10px; }
  #toggleMinimap, #toggleModelList { width: 40px; height: 40px; font-size: 20px; }
}

@media (max-width: 1190px) {
  #modelTitleBar, #toolbar h1 ,#logo{ display: none !important; }
  #toolbar button { font-size: 0; padding: 8px; }
  #toolbar button i { font-size: 20px; margin: 0; }
  #toolbar { width:100%; flex-direction: row; justify-content: space-around; padding: 5px; }
  #mainPhotoContainer, #mainPhotoWrapper{ width:100%; }
  #mainPhotoWrapper{ height:300px; }
  #mainPhotoTitle { font-size:15px; }
  #photoModalContent{ margin-top:5px; }
  #modelMiniMapContainer, #modelListPanel { display: none; }
  #contactButton { bottom: 10px; left: 10px; padding: 8px 12px; font-size: 14px; }
}
