:root {
  color-scheme: light dark;

  /* --bg-color: rgb(227, 231, 238);
  --text-color: rgb(11, 18, 32); */
  --color-bg: #F7F8FA;
  --color-surface: #FFFFFF;
  --color-navy-900: #0A1633;
  --color-navy-700: #142B5E;
  --color-text-primary: #0B1220;
  --color-text-secondary: #5B6472;
  --color-text-greyed: #5B6472;
  --color-border: #E3E7EE;
  --color-focus: #142b5e;
  --color-contrast: #5B6472;
  --color-greyed: #5b64726e;

}

:root[style*="color-scheme: dark"] {
  /* --bg-color: #0b1220;
  --text-color: rgb(247, 248, 250); */
  --color-bg: #0B1220;
  --color-surface: #111a2e;
  --color-navy-900: #0A1633;
  --color-navy-700: #1B3778;
  --color-text-primary: #F7F8FA;
  --color-text-secondary: #B7BFCC;
  --color-text-greyed: #31353d;
  --color-border: #22304B;
  --color-focus: #B7BFCC;
  --color-contrast: #0B1220;
  --color-greyed: #15171a6e;

}








.node {
    fill: steelblue;
}

.link {
    stroke: white;
    stroke-opacity: 0.6;
    z-index: 100;
}

body, html {
    padding: 0;
    margin: 0;
    width: 100vw;
    height: 100vh;
    overflow-x: hidden; 
    overflow-y: auto; 
    opacity: 1; 
    transition: opacity 0.5s ease-in-out;
    overscroll-behavior-y: auto; 
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    background-color: var(--color-bg);
    color: var(--color-text-primary);
}

/* Minimal auth overlay on loading page */
#auth-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(360px, 90vw);
    padding: 16px 20px;
    border-radius: 12px;
    background: var(--color-bg);
    color: #f7f8fa;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
    z-index: 10;
}

.auth-title {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-primary)
}

#auth-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.auth-tab {
    flex: 1;
    border: none;
    background: transparent;
    color: #b7bfcc;
    padding: 6px 8px;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 999px;
}

.auth-tab-active {
    background: #f7f8fa;
    color: #0b1220;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.auth-input {
    width: 100%;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    font-size: 0.85rem;
    outline: none;
    color: var(--color-text-primary);
    background-color: var(--color-surface);
}

.auth-input:focus {
    border-color: #1b3778;
}

.auth-button {
    margin-top: 4px;
    padding: 6px 8px;
    border-radius: 6px;
    border: none;
    background: var(--color-navy-700);
    color: #f7f8fa;
    font-size: 0.85rem;
    cursor: pointer;
}

.auth-button:hover {
    background: var(--color-focus);
}

.auth-error {
    margin-top: 4px;
    min-height: 1em;
    font-size: 0.8rem;
    color: #ffb4b4;
}

.auth-hidden {
    display: none;
}

#continue-hint {
    position: fixed;
    top: 80vh;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    opacity: 0;
    transition: opacity 0.7s ease;
    pointer-events: none; /* Let clicks pass through to window */
}

#continue-hint.continue-hint-visible {
    opacity: 1;
}

html {
    scroll-snap-type: y proximity; 
}

.header {
  width: 100vw;
  height: 50px;
  background-color: var(--color-surface);
  border: 1px solid #22314b;
  position: relative;
}

body.hidden {
    opacity: 0;
}

input, textarea, select {
    font-family: inherit;
}

a {
  text-decoration: none;
}
a:link {
  color: var(--color-text-primary); /* Default state for unvisited links */
}

a:visited {
  color: var(--color-text-primary); /* Color after the user has visited the link */
}

a:hover {
  color: var(--color-text-primary); /* Color when the user mouses over the link */
}

a:active {
  color: black; /* Color at the moment the link is clicked */
}


div.search_box_group {
    position: absolute;
    border: 0px;
    /* background: green; */
    top: 80%;
    left: 5%;
    width: 50%;
    height: 10%;
    font-size: 1rem;
    visibility: hidden;
}
#bottom_panel_text_input {
    height:100%;
    width: 100%;
    text-align: left;
    vertical-align: top;
    font-size:10pt;
    color: white;
    background: transparent;
}

/* Style the tab */
.tab {
  overflow: hidden;
  border: 1px solid #ffb4b4;
  background-color: #f1f1f1;
  position: absolute;
  border: 0px;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0.5;
  top: 70%;
  /* left: 5%; */
  width: 100%;
  height: 30%;
  font-size: 1rem;
  color: white;
  visibility: hidden;
  position: absolute;
}

/* Style the buttons that are used to open the tab content */
.tab button {
  background-color: inherit;
  float: left;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 14px 16px;
  /* transition: 0.3s; */
  color: white;
  visibility: inherit;
}

/* Change background color of buttons on hover */
.tab button:hover {
  background-color: #ddd;
}

/* Create an active/current tablink class */
.tab button.active {
  background-color: #464646;
}

/* Style the tab content */
.tabcontent {
  display: none;
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-top: none;
  position: absolute;
  border: 0px;
  /* background: green; */
  top: 75%;
  left: 5%;
  width: 95%;
  height: 25%;
  font-size: 1rem;
  color: white;
  visibility: inherit;
  position: absolute;

}
.sideBySideInput {
  display: flex; /* Makes the container a flex container */
  align-items: center; /* Aligns items vertically in the center */
  flex-wrap: wrap;
  flex-direction: row;
  /* width: 100%; */
  /* height: 100%; */
}

/* .input-column {
  position: relative;
  height: 20vh;
  width: 100%;
} */

.topButton button{
  background-color: inherit;
  float: left;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  outline: none;
  cursor: pointer;
  /* padding: 14px 16px; */
  color: white;
  opacity: 0.5;
  visibility: inherit;
  font-size: 3rem;
}

.topButton button:hover {
  background-color: #ddd;
}

.topButton button:active {
  background-color: #464646;
}

.topButton.showNewAgentModal {
  position: absolute;
  top: 5%;
  left: 5%;
}
.topButton.showSim {
  position: absolute;
  top: 5%;
  left: 85%;
}
.topButton.runSim {
  position: absolute;
  top: 5%;
  left: 85%;
}
.topButton.pauseSim {
  position: absolute;
  top: 5%;
  left: 75%;
}
/* The Modal (background) */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

/* Modal Content/Box */
.agentModal {
  background-color: #fefefe;
  margin: 15% auto; /* 15% from the top and centered */
  padding: 20px;
  border: 1px solid #888;
  width: 80%; /* Could be more or less, depending on screen size */
}

.dataModal {
  background-color: #ffffffe5;
  margin: 15% auto; /* 15% from the top and centered */
  padding: 20px;
  border: 1px solid #888;
  width: 80%; /* Could be more or less, depending on screen size */
}

/* The Close Button */
.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.scrollable-list-container {
  height: 120px; /* Set a fixed height for the container */
  top: -50px;
  overflow-y: scroll; /* Enable vertical scrolling when content overflows */
  border: 1px solid #ccc; /* Optional: Add a border for visual clarity */
  padding: 10px; /* Optional: Add padding inside the container */
  position: relative;
}

/* Optional: Style the list items for better appearance */
.scrollable-list-container ul {
  list-style: none; /* Remove default bullet points */
  padding: 0;
  margin: 0;
}

.scrollable-list-container li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}
.scrollable-list-container li:hover {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  background-color: #464646;
}
.scrollable-list-container li:last-child {
  border-bottom: none;
}

.rounded {
  box-sizing: border-box;
  border-radius: 15px;
  padding: 10px;
}

.centered {
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Centers horizontally */
  align-items: center;     /* Centers vertically */
}

.dialogue {
  background-color: rgba(255, 255, 255, 0.66);
  margin: 2px;
  max-width: 66%;
  padding: 10px;
  word-wrap: break-word;
  display: inline-block;
  white-space: pre-wrap;
}
.dialogue-left {
  background-color: rgba(0, 0, 0, 0.66);
  color: white;
}

.scrollable {
  /* For Firefox */
  scrollbar-width: none;
  /* For Internet Explorer and Edge */
  -ms-overflow-style: none;
  /* Keep scrolling enabled */
  overflow-y: auto; 
}

/* For Chrome, Safari, and Opera */
.scrollable::-webkit-scrollbar {
  display: none;
}

.font {
  /* font-family: "Courier New", serif */
  font-family: 'IBM Plex Mono', monospace;
}

.clickable {
  cursor: pointer;

}
.clickable:hover {
  /* background-color: #002e5e;  */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Add shadow to look elevated */
  border: 0.1px solid white;
}
.clickable:active {
  /* transform: scale(0.99); */
  background-color: #1d1d1d; /* Even darker blue */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2)
}

.clickable2 {
  cursor: pointer;

}
.clickable2:hover {
  background-color: #ffffff; /* Darker blue on hover */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Add shadow to look elevated */
}
.clickable2:active {
  /* transform: scale(0.95); */
  background-color: #001b3a; /* Even darker blue */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2)
}


input::placeholder { /* Standard syntax */
  color: #ffffff61; /* Red color, use any color name, HEX, RGB, etc. */
  opacity: 1; /* Fixes Firefox's default lower opacity */
}

input:focus {
  outline: none;

}

/* Shared styles for dropup menus */
.dropup-button,
.dropup-option {
  min-width: 180px;
  width: fit-content;
  display: block;
  padding: 6px 12px;
  background-color: var(--color-surface);
  color: var(--color-text-primary);
  box-sizing: border-box;
  font-size: 0.9rem;
  white-space: nowrap;
}

.dropup-option {
  border-bottom: 1px solid var(--color-border);
}

.dropup-option:last-child {
  border-bottom: none;
}

.dropup-option:hover {
  background-color: var(--color-bg);
}

.dropup-container {
  position: relative;
  background-color: transparent;
  color: var(--color-text-primary);
  margin-right: auto;
  word-wrap: break-word;
  display: flex;
  align-items: center;
}

.dropup-content {
  display: none; /* Hidden by default */
  position: absolute;
  bottom: 100%; /* Appears ABOVE the button */
  left: 0;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
  padding: 4px 0;
  max-height: 260px;
  overflow-y: auto;
  font-size: 0;
  z-index: 1000;
}

.unselect {
  color: #464646;
  background-color: #2b2b2b;
}

/* Show class to be toggled via JS */
.show {
  display: block;
  color: white;
}

.grayscale {
  filter: grayscale(66%);
}

#exp-sankey-container {
    position: relative;
    width: 100%;    
    height: 100%;   
    overflow: hidden;

    flex: 1;        
    
    min-height: 0;  
}

#exp-sankey-container svg, 
#exp-sankey-container canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;    /* Stretch to container */
    height: 100%;   /* Stretch to container */
}

#pop-mini-sim-container {
  position: relative;
  height: 100%;
}

#pop-mini-sim {
    /* position: absolute; */
    display: block;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}

.slider {
  text-align: center;
  height: 8px; /* Track height */
  width: 250px;
  letter-spacing: -0.6px;
  background-color: #ffffff00;
  color: rgba(255, 255, 255, 0.341);
  cursor: row-resize;
  user-select: none; /* disable selection */
}

.survey-choice {
  background-color: #ffffff28;
  field-sizing: content;
  color: white;
}

.survey-choice:hover {
  background-color: #ffffff53;
  field-sizing: content;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Add shadow to look elevated */
}

.run-button {
  height: 5vh;
  background-color: #00000060;
}


.sidebar {
  height: 100%;
  width: 0;
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  overflow-x: hidden;
  transition: 0.5s;
  padding-top: 60px;
  font-size: small;
}

.sidebar a {
  padding: 8px 8px 8px 32px;
  text-decoration: none;
  font-size: small;
  color: var(--color-text-primary);
  display: block;
  transition: 0.3s;
}

.sidebar a:hover {
  color: var(--color-text-primary);
}

.sidebar .closebtn {
  position: absolute;
  top: 0;
  right: 25px;
  font-size: 36px;
  margin-left: 50px;
}

.sidebar.sidebar-open {
  width: 250px;
}


.sidebarButton {
  position: absolute;
  font-size: 30px;
  cursor: pointer;
  background-color: #11111100;
  color: var(--color-text-primary);
  padding: 5px 15px;
  border: none;
  z-index: 100;
}

.sidebarButton:hover {
  color: #444;
}

.homeButton {
  position: absolute;
  margin-left: 50px;
  font-size: arge;
  font: courier new;
  cursor: pointer;
  color: var(--color-text-primary);
  padding: 15px 15px;
  border: none;
  z-index: 100;
}

.homeButton:hover {
  color: #444;
}

/* wrapper for feedback + theme toggle so they stay together on the right */
.header-right-actions {
  position: absolute;
  right: 0;
  margin-right: 20px;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-right-actions .darkModeBtn {
  position: static;
  margin: 0;
}

.darkModeBtn {
  position: absolute;
  border: 0;
  right: 0;
  margin-right: 20px;
  margin-top: 5px;
  width: auto;
}

.darkModeBtn:hover {
  background-color: var(--color-contrast);
}

#main {
  transition: margin-left .5s;
  padding: 16px;
  margin-left: 0;
}

#main.sidebar-open {
  margin-left: 250px;
}

.progressBar {
  justify-content: space-around;
  background-color: rgba(0, 0, 0, 0.252);
  width: 25%;
  height: 15px;
  margin: auto;
  margin-top: 2%;
  align-items: center;
  overflow: visible;   
  padding: 0;
  z-index: 99;

}

.stepIndicator {
  width: 30px;
  height: 30px;
  background-color: #111;
  padding: 0;
  margin: 0;
  margin-top: -7.5px;
  overflow: visible;   
}

.stepIndicator:hover {
  background-color: #444;
}

.stepIndicator.active {
  background-color: #111;
  box-shadow: 0 0 10px 1px #ffffff;
  transition: 0.7s;
}
.main-step {
  display: none;
  width: 100v;
  /* height: 90vh; */
  /* overflow-y: auto;  */
  /* overflow-x: hidden; */
}

.main-step.active {
  display: block;
}

.population-variable {
  position: relative;
  background-color:var(--color-bg);
  /* color: white; */
  min-width: 50px;
  min-height: 5px;
  border: 1px solid var(--color-border);
  width: fit-content;
  height: fit-content;
}

#constraint-input {
  color: var(--color-text-secondary)
}

input::placeholder {
  color: var(--color-text-greyed); /* Change to your desired color */
  opacity: 1;  /* Required for Firefox */
}
/* WebKit (Chrome, Safari, Edge) */
::-webkit-input-placeholder {
  color: var(--color-text-greyed);
  opacity: 1;
}


.population-variable-definition {
  position: static;
  margin-top: 8px;
  background-color: var(--color-contrast);
  display: none;
  width: fit-content;
  min-width: 200px;
  /* max-width: 500px; */
  /* height: 100px; */
  /* min-height: 60px; */
  max-height: 200px;
  border: 1px solid var(--color-border)
}
.population-variable-definition.show {
  display: flex;
}

.bottom-caret:hover::after {
  content: "";
  position: absolute;
  bottom: -10px; /* Moves it above the top edge */
  left: 50px;
  transform: translateX(-50%); /* Centers the caret horizontally */
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid #ffffff; /* Matches the container color */
}

.condition-dropdown {
  width: 200px; 
  padding: 10px;
  color: var(--color-text-secondary); 
  background-color: var(--color-contrast);
  border: 1px solid var(--color-border);
  cursor: pointer; 
}

/* Style the options within the dropdown */
.condition-dropdown option {
  background-color: #444;
  color: var(--color-text-secondary);
}

.hidden {
  display: none;
}

.dark {
  background-color: var(--color-bg);
  color: var(--color-text-secondary);
}

.mid-dark {
  background-color:  #49494969;
  color: white;
}

.greyed-out {
  color: rgba(255, 255, 255, 0.437);
}

.noborder {
  border: 0px;
}
.redborder {
  border: 2px solid red;
}

.var-suggestion {
  width: fit-content;
  height: fit-content;
  /* height: 20px; */
}

.first-input {
  width: 80%;
}

.first-input-filter {
  margin-bottom: auto;
  border: 1px solid var(--color-border);
}

.first-input-container {
  z-index: 10000;
  background-color: var(--color-surface);
}

.invalid-input {
  border: 2px solid red !important;
  outline: none;
}

.variable-range-input {
  width: fit-content;
  height: 50px;
  border: 1px solid var(--color-border);
  box-sizing: border-box;
  border-radius: 15px;
  padding: 10px;
}


/* geography dropdowns */

.multiselect-container {
  position: relative;
  width: 300px;
}

#state-search-input {
  width: 100%;
  padding: 8px;
  box-sizing: border-box;
}

#location-search-input {
  width: 100%;
  padding: 8px;
  box-sizing: border-box;
}

.geo-dropdown-content {
  display: none; /* Hidden by default */
  position: absolute;
  top: 100%;
  /* background-color: #ffffff00; */
  /* border: 1px solid #ddd; */
  /* width: 100%; */
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  /* margin-top: 50px; */
}

.geo-dropdown-item {
  padding: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  width: fit-content;
  min-width: 500px;
}

/* .geo-dropdown-item:hover {
  background-color: #f1f1f1;
} */

.geo-dropdown-item input {
  margin-right: 10px;
}

.continue-btn {
  position: absolute;
  bottom: 10vh;
  right: 100px;
  width: 100px;
  height: 40px;
}

.loader {
    position: fixed;
    top: 50vh;
    left: 50vw;
    border: 8px solid #f3f3f3; /* Light grey background */
    border-top: 8px solid #000000; /* Blue spinning part */
    border-radius: 80%; /* Creates a circle */
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite; /* Animation name, duration, timing, loop count */
    z-index: 1000;
}

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

.generate-survey-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}
.generate-survey-spinner.hidden {
    display: none;
}

.bottom-container {
  position: absolute;
  bottom: 2vh;
  right: 50px;
  color: rgba(255, 255, 255, 0.667);
  font-style: italic;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.bottom-message {
  position: absolute;
  padding: 10px;
  left: 0;
  bottom: 0;
  color: var(--color-text-secondary);
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  font-style: italic;
  width: 50%;
  min-width: 300px;
  height: 20vh;
  overflow-y: scroll;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.bottom-message::-webkit-scrollbar {
  display: none;
}

.spacer {
  height: 30vh;
}

.v-tree-selector { font-family: sans-serif; border: 1px solid #ccc; padding: 10px; border-radius: 4px; }
.v-tree-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; min-height: 30px; }
.v-tree-tag { background: #000000; color: white; border: 1px solid #03a9f4; padding: 2px 8px; border-radius: 12px; font-size: 12px; display: flex; align-items: center; }
.v-tree-tag-remove { margin-left: 5px; cursor: pointer; color: #ffffff; font-weight: bold; }
.v-tree-list ul { list-style: none; padding-left: 20px; margin: 5px 0; }
.v-tree-item { display: flex; align-items: center; gap: 5px; padding: 2px 0; }
.v-tree-spacer { width: 15px; }
.v-tree-node.collapsed > ul { display: none; }
label { cursor: pointer; user-select: none; }

/* Hide nested levels by default */
.v-tree-node .v-tree-level {
    display: none;
}

/* Show nested levels when parent is expanded */
.v-tree-node.expanded > .v-tree-level {
    display: block;
}

.v-tree-toggler {
    cursor: pointer;
    display: inline-block;
    width: 20px;
    text-align: center;
    transition: transform 0.2s ease;
}

/* Optional: Rotate the arrow for a smoother effect */
.v-tree-node.expanded > .v-tree-item > .v-tree-toggler {
    transform: rotate(90deg);
}

.v-tree-search-container {
    margin-bottom: 15px;
}

.v-tree-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    outline: none;
    background-color: #000000;
    color: white;
}

.v-tree-search:focus {
    border-color: #03a9f4;
}

/* Hide nodes that don't match the filter */
.v-tree-node.v-hidden {
    display: none;
}

/* Maintain existing collapse/expand logic */
.v-tree-node .v-tree-level { display: none; }
.v-tree-node.expanded > .v-tree-level { display: block; }

.tile {
  display: inline-block;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Add shadow to look elevated */
  max-width: 350px;
  height: 170px;
  justify-content: center;
  flex: 1 1 350px;
  position: relative;
}

.tiles {
  display: flex;
  flex-wrap: wrap; 
  justify-content: left;
  gap: 20px; 
  padding: 16px;
}

.info-tag {
  width: fit-content;
  font-size: x-small;
  margin: 10px;
}

.new {
  border-style: dashed;
  background-color: var(--color-bg);
}
.new:hover {
  background-color: var(--color-surface);
}

.green {
  background-color: oklch(87.92% 0.22463 151.293 / 0.308);
}

.delete-sim-btn {
  position: absolute;
  top: 8px;
  right: 10px;
  padding: 2px 6px;
  font-size: 12px;
  border-radius: 999px;
  background-color: rgba(0, 0, 0, 0.55);
  color: #fff;
  cursor: pointer;
  z-index: 5;
}

.delete-sim-btn:hover {
  background-color: rgba(220, 38, 38, 0.9);
}

.circle {
  width: 50px;
  height: 50px;
  background-color: var(--color-navy-900);
  border-radius: 50%;

  display: flex;
  justify-content: center;
  align-items: center;
}

/* Generated survey questions (step 1) */
.generated-survey-questions {
  margin-top: 24px;
  width: 100%;
}
.generated-survey-questions .survey-q-card {
  background-color: var(--color-surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}
.generated-survey-questions .survey-q-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}
.generated-survey-questions .survey-q-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text-primary);
}
.generated-survey-questions .survey-q-type-select {
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 6px 28px 6px 10px;
  font-size: 0.9rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
.generated-survey-questions .survey-q-prompt {
  width: 100%;
  min-height: 48px;
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--color-text-primary);
  font-size: 0.95rem;
  margin-bottom: 16px;
  resize: vertical;
}
.generated-survey-questions .survey-q-delete {
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
}
.generated-survey-questions .survey-q-delete:hover {
  color: var(--color-text-primary);
  background-color: rgba(255, 255, 255, 0.08);
}
.generated-survey-questions .survey-options-heading {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  margin-bottom: 10px;
}
.generated-survey-questions .survey-option-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.generated-survey-questions .survey-option-row input[type="text"],
.generated-survey-questions .survey-option-row input[type="number"] {
  flex: 1;
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--color-text-primary);
  font-size: 0.9rem;
}
.generated-survey-questions .survey-option-remove {
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 2px 6px;
  font-size: 1rem;
}
.generated-survey-questions .survey-add-option {
  color: var(--color-navy-700);
  cursor: pointer;
  font-size: 0.9rem;
  margin-top: 8px;
}
.generated-survey-questions .survey-add-option:hover {
  text-decoration: underline;
}
.generated-survey-questions .survey-numeric-fields {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.generated-survey-questions .survey-numeric-fields label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}
.generated-survey-questions .survey-numeric-fields input {
  width: 80px;
}
.generated-survey-questions .survey-questions-count {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  margin-bottom: 12px;
}

/* ============================================================
   Demographics filter panel (new population definition UI)
   ============================================================ */

/* NLP input bar */
.demo-nlp-wrapper {
  max-width: 95%;
  margin-top: 16px;
  position: relative;
}
.demo-nlp-bar {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  gap: 8px;
}
.demo-nlp-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--color-text-primary);
  font-size: 14px;
  font-family: inherit;
}
.demo-nlp-send {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s;
}
.demo-nlp-send:hover { color: var(--color-text-primary); }
.demo-nlp-send.loading { opacity: 0.5; pointer-events: none; }

/* Fine-tune toggle */
.demo-panel-wrapper { margin-top: 12px; }
.demo-panel-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-secondary);
  font-size: 13px;
  padding: 6px 0;
  font-family: inherit;
  user-select: none;
}
.demo-panel-toggle:hover { color: var(--color-text-primary); }

/* Demographics panel */
.demo-panel {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 20px 24px;
  margin-top: 6px;
}
.demo-section-header {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}

/* Search row above grid */
.demo-search-row {
  position: relative;
  margin-bottom: 20px;
  max-width: 320px;
}
.demo-search-input {
  width: 100%;
  padding: 7px 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-size: 13px;
  font-family: inherit;
  box-sizing: border-box;
  outline: none;
}
.demo-search-input:focus { border-color: var(--color-focus); }
.demo-search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  max-height: 220px;
  overflow-y: auto;
  display: none;
}
.demo-search-result-item {
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  color: var(--color-text-primary);
}
.demo-search-result-item:hover { background: var(--color-navy-700); color: white; }

/* Filter grid */
.demo-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px 24px;
}
@media (max-width: 700px) {
  .demo-filter-grid { grid-template-columns: 1fr 1fr; }
}

/* Individual filter cell */
.demo-filter-item { position: relative; min-width: 0; }
.demo-filter-label {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}

/* The clickable trigger area */
.demo-filter-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px 5px 10px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-bg);
  cursor: pointer;
  min-height: 36px;
  gap: 6px;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.demo-filter-trigger:hover,
.demo-filter-trigger.open { border-color: var(--color-focus); }

/* Tags inside the trigger */
.demo-filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.demo-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--color-navy-700);
  color: #fff;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 12px;
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.demo-filter-tag-remove {
  cursor: pointer;
  opacity: 0.75;
  font-size: 11px;
  line-height: 1;
  flex-shrink: 0;
}
.demo-filter-tag-remove:hover { opacity: 1; }
.demo-filter-placeholder {
  color: var(--color-text-secondary);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Clear × and caret */
.demo-filter-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.demo-filter-clear {
  cursor: pointer;
  color: var(--color-text-secondary);
  font-size: 15px;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.15s;
}
.demo-filter-trigger.has-values .demo-filter-clear,
.demo-filter-trigger:hover .demo-filter-clear { opacity: 1; }
.demo-filter-caret {
  color: var(--color-text-secondary);
  font-size: 11px;
  transition: transform 0.15s;
}
.demo-filter-trigger.open .demo-filter-caret { transform: rotate(180deg); }

/* Dropdown panel */
.demo-filter-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: 280px;
  z-index: 150;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  overflow: hidden;
}
.demo-filter-dropdown-search {
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-size: 13px;
  box-sizing: border-box;
  outline: none;
  font-family: inherit;
}
.demo-filter-options {
  max-height: 210px;
  overflow-y: auto;
}
.demo-filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  color: var(--color-text-primary);
  transition: background 0.1s;
}
.demo-filter-option:hover { background: rgba(27, 55, 120, 0.12); }
.demo-filter-option.selected { background: var(--color-navy-700); color: #fff; }
.demo-filter-option input[type="checkbox"] {
  accent-color: var(--color-navy-700);
  pointer-events: none;
  flex-shrink: 0;
}

/* Range inputs inside dropdown */
.demo-range-inputs {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  align-items: center;
}
.demo-range-inputs input {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  min-width: 0;
}
.demo-range-inputs input:focus { border-color: var(--color-focus); }
.demo-range-sep {
  color: var(--color-text-secondary);
  font-size: 12px;
  flex-shrink: 0;
}

/* ============================================================ */

/* Fixed footer for run survey button */
.page-footer {
  width: 100vw;
  height: 69px;
  padding: 10px;
  bottom: 0;
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  
}

.page-footer-run-btn {
  border: 1px solid var(--color-border);
  background-color: var(--color-navy-700);
  color: white;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 50px;
}