/* ================================
   Design tokens
==================================*/
:root{
  --font: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --bg: #fff;
  --ink: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow: 0 2px 6px rgba(0,0,0,.10);
  --brand: #0097B2;
  --accent: #ff4444;
  --primary: #8127e0;
  --secondary: #1666f1;
  --chip: #d7ccbb;
}

/* ================================
   Global
==================================*/
html, body{
  height: 100vh; 
  margin: 0;
  margin:0;
  font-family:var(--font);
  color:var(--ink);
  background:var(--bg);
}

*,
*::before,
*::after{ box-sizing:border-box; }

/* Better focus */
:focus-visible{
  outline:2px solid var(--secondary);
  outline-offset:2px;
}

/* ================================
   Page layout
==================================*/
.container{
  height: 100%;
  display:flex;
  flex-direction:column;
  padding:10px 20px;
  gap:10px;
}

/* ================================
   Top row (controls)
==================================*/
.top-row{
  display:flex;
  align-items:flex-start;
  gap:20px;
  flex-wrap:wrap;
  position:relative;
}

/* Search column */
.search-container{
  flex:1 1 320px;
  max-width:520px;
}

.search-wrapper{
  display:flex;
  align-items:center;
  position:relative;
  width:100%;
  gap:8px;
}

/* Icon button (small) */
.search-for-item{
  height:40px; width:40px;
  display:grid; place-items:center;
  font-size:16px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:10px;
  cursor:pointer;
  transition:box-shadow .15s ease, background .15s ease;
}
.search-for-item:hover{ box-shadow:var(--shadow-sm); }

/* Search input + dropdown act as a single control */
.search-input{
  flex:1;
  height:40px;
  padding:10px 12px;
  font-size:16px;
  border:1px solid var(--border);
  border-right:none;
  border-radius:20px 0 0 20px;
  outline:none;
}

/* Dropdown */
.dropdown{ height:40px; }
.dropdown-toggle{
  height:40px;
  display:flex; align-items:center;
  padding:0 14px;
  font-size:16px;
  border:1px solid var(--border);
  border-left:none;
  border-radius:0 20px 20px 0;
  background:#000; color:#fff;
  cursor:pointer;
}
.dropdown-menu{
  position:absolute;
  top:100%; right:0;
  min-width:160px;
  background:#000; color:#fff;
  border-radius:0 0 10px 10px;
  overflow:hidden;
  z-index:10;
  display:none;
  box-shadow:var(--shadow);
}
.dropdown.open .dropdown-menu{ display:block; }
.dropdown-menu a{
  display:block;
  padding:10px 14px;
  text-decoration:none;
  color:#fff;
  cursor:pointer;
}
.dropdown-menu a:hover{ background:#333; }



/* RIGHT SIDEBAR OVERLAY — hidden until JS opens it */
#results-container{
  display: none;
  position: absolute;
  top: 0; bottom: 0;   /* anchors to the RIGHT */
  width: 480px;
  overflow-y: auto;
  background: #fff;
  border-left: 1px solid var(--border);
  padding: 1rem;
  box-shadow: var(--shadow);
  z-index: 20;
}


/* Live results (typeahead) */
.search-results-dropdown{
  position:absolute;
  top:100%; left:0; right:0;
  margin-top:4px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:6px;
  max-height:250px;
  overflow-y:auto;
  box-shadow:var(--shadow);
  z-index:10;
  display:none;
}
.search-results-dropdown div{
  padding:10px;
  cursor:pointer;
}
.search-results-dropdown div:hover{ background:#f3f4f6; }

/* Editor + side buttons block */
.fp-left-column{
  display:flex;
  gap:10px;
  flex:1 1 320px;
  max-width:420px;
}

.fp-editor-wrapper{
  flex:1;
  background:#fff;
  border:2px solid var(--brand);
  border-radius:8px;
  padding:6px;
}

.fp-editor-toolbar{
  display:flex; gap:8px; margin-bottom:6px;
}
.fp-editor-toolbar button{
  padding:4px 10px;
  font-size:13px;
  border:none;
  background:#f3f4f6;
  border-radius:6px;
  cursor:pointer;
}
.fp-editor-toolbar button:hover{ background:#e5e7eb; }

.fp-editor-content{
  width:100%;
  height:100px;
  padding:6px;
  font-size:13px;
  border:1px solid var(--border);
  border-radius:6px;
  outline:none;
  overflow-y:auto;
  background:#fff;
}
.fp-editor-content:empty::before{
  content:attr(data-placeholder);
  color:#9ca3af;
  pointer-events:none;
}

/* Side buttons */
.fp-side-buttons{ display:flex; flex-direction:column; gap:10px; }
.fp-side-button{
  width:74px; height:54px;
  color:#fff;
  font-size:12px; font-weight:700;
  border:none; border-radius:10px;
  cursor:pointer;
  box-shadow:var(--shadow-sm);
}
.fp-btn-search{ background:var(--primary); }
.fp-btn-map{ background:var(--secondary); }

/* ================================
   Range slider
==================================*/
.fp-range-slider-wrapper{
  display:flex; flex-direction:column; align-items:center;
  margin-top:14px; width:100%;
}
.fp-range-slider{ position:relative; width:100%; height:30px; }
.fp-range-slider input[type=range]{
  position:absolute; top:0; width:100%;
  height:6px; background:none; pointer-events:none;
  -webkit-appearance:none;
  z-index:2;
}
/* thumb */
.fp-range-slider input[type=range]::-webkit-slider-thumb{
  -webkit-appearance:none;
  pointer-events:all;
  width:12px; height:12px;
  background:var(--accent);
  border:2px solid #fff;
  border-radius:50%;
  box-shadow:0 0 2px rgba(0,0,0,.4);
  cursor:pointer;
}
/* track between thumbs */
.fp-slider-track{
  position:absolute; top:50%; transform:translateY(-50%);
  height:6px; border-radius:4px;
  background:var(--accent);
  z-index:1;
}
.fp-slider-labels{
  display:flex; justify-content:space-between;
  font-size:12px; color:#374151; width:100%; margin-top:6px;
}

/* Search history button */
.search-history{
  position:absolute; right:20px; top:10px;
  padding:10px 14px;
  background:#e5e7eb; color:#08143b;
  border:none; border-radius:10px;
  cursor:pointer;
}

/* ================================
   Main area (graph + optional panel)
==================================*/
.main-area{
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: stretch;
  gap: 10px;
  min-height: 500px;   /* gives the graph room */
}

.main-area.has-results .whiteboard { margin-right: 360px; }


.whiteboard{
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  border: 1px solid #333;
  background: #fff;
}


/* Floating circle buttons */
.left-icon,
.right-icon{
  position:absolute;
  display:grid; place-items:center;
  background:#6cf; color:#000;
  border:none; border-radius:50%;
  font-size:24px; width:50px; height:50px;
  cursor:pointer;
  box-shadow:var(--shadow-sm);
  z-index:5;
}
.left-icon{ left:20px; top:50%; transform:translateY(-50%); }
.right-icon{ right:10px; bottom:10px; }


/* ================================
   Highlighter bar (restored + tokenized)
==================================*/

/* Container */
.bottom-bar{
  background: var(--chip);
  height: 60px;
  width: 50%;
  border-radius: 25px;
  border: 1px solid #333;
  margin-top: 10px;
  align-self: center;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  padding: 0 10px;
}

/* "Add highlighter" button – beat generic button rules */
#addHighlighterBtn,
button#addHighlighterBtn{
  appearance: none;
  -webkit-appearance: none; /* Safari */
  margin-left: 10px;
  padding: 10px 20px;
  background: #fff;
  border: 1px solid #aaa;
  border-radius: 20px;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  box-shadow: none;
}

/* Tag list / chips */
#highlighterList{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

/* Each chip/icon */
.highlighter-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  transition: outline 0.2s ease, box-shadow 0.2s ease, transform .1s ease;
  user-select: none;
}

/* Selected state */
.highlighter-icon.active{
  outline: 3px solid var(--brand);
  box-shadow: 0 0 10px rgba(0,151,178,.5);
}

/* Optional hover focus */
.highlighter-icon:hover,
.highlighter-icon:focus-visible{
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* === Modal & Overlay === */
#overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 999;
}

#highlighterModal {
  display: none;
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 30px;
  border-radius: 25px;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  z-index: 1000;
  width: 320px;
  font-family: sans-serif;
}

#highlighterModal h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
}

#highlighterModal input,
#highlighterModal select,
#highlighterModal textarea {
  margin: 10px 0;
  width: 100%;
  padding: 5px;
  box-sizing: border-box;
}

/* Textarea for description */
textarea {
  resize: vertical;
  height: 80px;
  font-family: monospace;
}

/* Color Palette for Highlighters */
.color-options {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.color-swatch {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: 0.2s ease;
}

.color-swatch.selected {
  border: 3px solid black;
}

/* Modal Save/Cancel Buttons */
.modal-buttons {
  display: flex;
  justify-content: space-between;
}

#cancelBtn, #saveBtn {
  padding: 10px 20px;
  font-size: 1rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  width: 45%;
}

#cancelBtn {
  background-color: #ccc;
  color: black;
}

#saveBtn {
  background-color: #5CE1E6;
  color: black;
}



/* end */

