@charset "utf-8";
/* CSS Document */

/* Add to top of your CSS */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');


/* ========== GLOBAL RESETS ========== */

:root {
  --primary: #00BFFF;
  --primary-dark: #0d1a40;
  --secondary: #3b5998;
  --highlight: #65b2ff;
  --background: #f5f7fa;
  --input-bg: #dbe9ff;
  --text: #1c1e21;
  --muted: #8c9bab;
  --danger: #e63946;
}

html, body {
  height: 100%;
  margin: 0px 0px 0px 0px;
  padding: 0; 
  overflow-y: hidden;
  font-family: 'Inter', sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial;
  background: #000000;	
}


.hidden {
  display: none !important;
}

button:not(.close-x-button):not(.view-toggle-btn):not(.modal-remove-button):not(.action-icon-button)
.mobile-form button:not(.close-x-button):not(.view-toggle-btn):not(.modal-remove-button):not(.action-icon-button):not(.dm-button) {
  background: #0782DB;
  color: white;
  border: none;
  padding: 9px;
  font-size: 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.3s ease;
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-top: 10px;	
  width: auto;
  max-width: 300px;
  align-self: center;
}

button:not(.close-x-button):not(.action-icon-button):not(.icon-button):hover {
  background: #033EB4;
}

/* ========== WRAPPERS & LAYOUT ========== */

body.mobile-form {
  width: 100%;
  height: calc(var(--vh, 1vh) * 100);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.ghost-dot-icon {
  opacity: 1;
}


  #appWrapper {
    background-color: black;
    background-size: cover;  width: 100%;
    height: calc(var(--vh, 1vh) * 100);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
  }

#mainView {
  flex: 1;
  position: relative;
  width: 100%;
  height: auto;
  min-height: 100vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
 box-sizing: border-box;
	overflow: visible;
}

body.mobile-form main {
  position: relative;
  flex-grow: 1;
  width: 100%;
  max-width: 100%;
  padding: 62px auto;
  overflow: visible;
	-webkit-overflow-scrolling: touch;
  background-color: #fff;
	box-sizing: border-box;
}


/* ========== NAVIGATION ========== */
#topNav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background-color: #111;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 999;
  border-bottom: 1px solid #333;
}

.topTab {
  color: white;
  font-size: 12px;
  font-weight: bold;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.topTab:hover {
  background-color: #222;
  transform: scale(1.05);
  cursor: pointer;
}
 
#bottomNav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 46px;
  background-color: #111;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 500;
  border-top: 1px solid #333;
}

.navButton {
  color: white;
  font-weight: bold;
  font-size: 14px;
  padding: 2px 15px;
  text-align: center;
  border-radius: 8px;
  transition: transform 0.2s ease, background-color 0.3s ease;
}

.navButton i {
  font-size: 18px;
}

.navButton img {
  height: 28px;
  width: auto;
}
.navButton:active,
.navButton:hover {
  background-color: #222;
  transform: scale(1.2);
}
.navButton {
  color: white;
  font-weight: bold;
  font-size: 14px;
  padding: 4px 15px;
  text-align: center;
  border-radius: 8px;
  transition: transform 0.2s ease, background-color 0.3s ease;
}

.addButton i {
  font-size: 18px;
}

.addButton img {
  height: 34px;
  width: auto;
}
.addButton:active,
.addButton:hover {
  background-color: #222;
  transform: scale(1.2);
}
.addButton {
  color: white;
  font-weight: bold;
  font-size: 14px;
  padding: 4px 10px;
  text-align: center;
  border-radius: 8px;
  transition: transform 0.2s ease, background-color 0.3s ease;
}


.logout-btn {
  padding: 6px 10px;
  background: #B7090C;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}


/* ========== MAP ========== */
#map {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  height: 100vh;
  width: 100%;
}

#mapTooltip {
  position: fixed;
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
  pointer-events: none;
  display: none;
  z-index: 9999;
}

/* ========== ADD OPTIONS ========== */
#addOptions {
  position: fixed;
  bottom: 50px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-around;
  z-index: 9999;
  pointer-events: none;
}

.addOption {
  background-color: rgba(34, 34, 34, 0.85);
  color: white;
  font-size: 12px;
  font-weight: bold;
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  transition: transform 0.2s ease, background-color 0.2s ease;
  pointer-events: auto;
}

.addOption:hover,
.addOption:active {
  background-color: rgba(51, 51, 51, 0.9);
  transform: scale(1.1);
}
 
/* ========== ACTION STACK ========== */
#actionStack {
  position: relative;
  right: 0px;    
  display: flex;
  flex-direction: row;
  align-items: center;
  /*gap: 4px;  This sets uniform spacing */
  z-index: 10;
  padding: 1px;
  /*background-color: rgba(51, 51, 51, 0.6);*/
  border-radius:  13px;
  margin-top: 2px;
}


.actionBtn {
  width: 40px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.25s ease;
  }
.actionBtn img {
  width: 24px; 
  object-fit: contain;
}
.actionBtn:hover {
  transform: scale(1.20);
  /*background-color: rgba(130, 130, 130, 0.8);*/
  cursor: pointer;
}

.actionBtn.pulsing {
  animation: floatPulse 2s ease-in-out infinite;
}

.icon-stack {
  height: 75%;  
  justify-content: center;
  align-items: center;
}
.micon-stack {
  height: 75%;  
  justify-content: center;
  align-items: center;
}
.action-label {
  font-size: 0.65rem;
  color: #0306e0;
  line-height: 1.1;
  text-align: center;
  margin: 2px 0 0 0;
  height: 25%;
  position: relative;
  bottom: 0px;
}

.like-count {
  font-weight: normal;
}
@keyframes floatPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.dm-button {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  background-color: transparent;
  color: white;
  font-size: 12px;
  padding: 0;
  border: none;
  cursor: pointer;
  z-index: 6;
}
.dm-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}

.addicon {
  width: 34px;
  height: 34px;  
}

/* Avatar image, round with optional blue border when followed */
.connect-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50% !important;
  border: 2px solid transparent;
  display: block;
  transition: transform 0.2s ease;
}

.connect-avatar.followed {
  border-color: #2e90fa; /* Bright blue ring */
}

/* Follow + button */
.connect-action-button {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 12px;
  line-height: 18px;
  padding: 0;
  text-align: center;
  color: white;
  border: none;
  cursor: pointer;
  z-index: 5;
  background-color: red;
}

.connect-action-button:hover {
  transform: translateX(-50%) scale(1.1);
}

/* Basic container alignment */
.connection-stack {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

@media (min-width: 640px), screen and (min-width: 1024px) {  
  .floatingTabs { display: flex; width: 100%; overflow-x: hidden; }
  .floatingTab  { flex: 1 1 0; text-align: center; padding: 8px 0; }
  }

/* ===== Floating Controls Wrapper ===== */
#floatingTopControls {
  position: fixed;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  z-index: 700;
  display: flex; 
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

/* Tabs & Toggle stay interactive */
.floatingTabs,
.view-toggle-wrapper {
  pointer-events: auto;
}

/* ===== Floating Tabs ===== */
.floatingTabs {
  display: flex;
  overflow: auto;
  gap: 0px;
  padding: 0px 10px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 10px;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 700;
  overflow-x: auto;
  max-width: 90vw;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  justify-content: space-stretch;  
}
.floatingTabs::-webkit-scrollbar {
  display: none;  
}

.floatingTab {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  font-weight: 400;  
  background: none;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  position: relative;
  cursor: pointer;
  transition: color 0.2s ease, font-size 0.2s ease;
  flex: 0 0;
  text-align: center;
  padding: 6px 10px;
}

.floatingTab:hover,
.floatingTab:focus {
  color: white;
}

.floatingTab.active {
  color: white;
  font-size: 14px;
}

/* Tab underline animation */
#tabUnderline {
  position: absolute;
  bottom: 4px;
  height: 2px;
  background: white;
  border-radius: 999px;
  transition: left 0.3s ease, width 0.3s ease;
  z-index: 701;
}

/* ===== View Toggle Button ===== */
.view-toggle-wrapper {
  margin-top: 2px;
  background: rgba(0, 0, 0, .7);
  border: 1px solid rgba(255, 215, 0, 0.8);
  padding: 8px 4px;
  border-radius: 6px;
  font-size: 15px;
  color: white;
  text-align: center;
  z-index: 700;
  top: 210px;
  right: 2px;
  position: absolute;
}

.view-toggle-btn {
  all: unset;
  color: white;
  font-weight: 400;
  cursor: pointer;
  transition: opacity 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0; /* tighter hit area */
}

.view-toggle-btn img {
  display: block;
  width: 34px;
  height: 40px;
  pointer-events: none; /* clicks go to the button */
}

.view-toggle-btn:hover { opacity: 0.85; }
.view-toggle-btn:focus-visible { outline: 2px solid rgba(255,215,0,0.9); outline-offset: 2px; }


/* ===== Map View Specific Overrides ===== */
.map-view .floatingTabs {
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 215, 0, 0.8);
  box-shadow: none;
  backdrop-filter: none;
}

.map-view .floatingTab {
  color: white !important;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.85);
}
.map-view .floatingTab:hover,
.map-view .floatingTab:focus {
  color: #fff !important;
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.95);
}


/* ========== FORM STYLES ========== */

/* Main should control page layout, not form appearance */
main {
  padding: 1rem;
  width: 100%;
  max-width: 100%;
	overflow-y: auto;
	flex-grow: 1;
  box-sizing: border-box;
}

/* Form wrapper handles the visual "card" look */
.mobile-form .form-wrapper {
  position: relative;
  max-width: 400px;
  margin: 80 auto 0;
  padding: 8px 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  padding-bottom: 3rem ; /* makes room for submit button */	
}
.scan-form {
  position: relative;
  max-width: 400px;
  margin: 80 auto 0;
  padding: 8px 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  padding-bottom: 3rem ; /* makes room for submit button */	
}

.event-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 2rem;
}

.event-card {
  position: relative;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  overflow: hidden;
  min-height: 150px;
  color: white;
  font-size: 13px;
}

.event-card .overlay {
  background: rgba(0, 0, 0, 0.3);
  padding: 12px 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.selectbox {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255,255,255,0.85);
  color: #000;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 12px;
}

.event-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
	padding: 0px 70px 0px 0px ;
}

.event-card .meta {
  font-size: 12px;
  color: #ccc;
  margin-bottom: 6px;
}

.text-link {
  color: #0cf;
  font-weight: bold;
}


/* ========== PLATFORM ICONS ========== */

.platform-options {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 10px;
  margin-bottom: 20px;
}

.platform-icon {
  position: relative;
  cursor: pointer;
  transition: transform 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.platform-icon input[type="radio"] {
  display: none;
}

.platform-icon span {
  display: inline-block;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.platform-icon span img {
  height: 36px;
  width: auto;
}

.platform-icon:hover span img,
.platform-icon:hover span i {
  transform: scale(1.3);
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}

.platform-icon input[type="radio"]:checked ~ span img,
.platform-icon input[type="radio"]:checked ~ span i {
  transform: scale(1.4);
  border: 3px solid #0635E7;
  border-radius: 12px;
  padding: 8px;
}


/* ========== BLUESKY TOOLTIP ========== */
.bluesky-tooltip-wrapper {
  position: relative;
  display: inline-block;
  margin-left: auto;
  margin-right: 0;
}

.tooltip-bubble {
  position: absolute;
  top: -35px;
  right: 0;
  background: #2b5ef7;
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 999;
}

.bluesky-icon {
  height: 32px;
  width: auto;
  cursor: pointer;
  animation: pulse 1.5s infinite;
  transition: transform 0.2s ease;
}

.bluesky-icon:hover {
  transform: scale(1.1);
}

.bluesky-tooltip-wrapper:hover .tooltip-bubble {
  opacity: 1;
}
#blueskyBadge {
  position: fixed;
  bottom: 60px;
  right: 10px;
  z-index: 999;
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
}

#blueskyBadge img {
  height: 24px;
  width: auto;
  display: block;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(-5px); }
  100% { opacity: 1; transform: translateY(0); }
}
.floating-cancel {
  position: fixed;
  top: 80px;
  left: 150px;
  background: #B7090C;
  color: white;
  padding: 6px 10px;
  border-radius: 8px;
  z-index: 1002;
  font-size: 14px;
  cursor: pointer;
}
form {
  display: contents;
}
.custom-alert {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.custom-alert-box {
  background: #fff;
  padding: 24px;
  max-width: 320px;
  text-align: center;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.custom-alert-box p {
  margin-bottom: 16px;
  font-size: 16px;
}

.custom-alert-box button {
  padding: 8px 16px;
  background: #0635E7;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

#joinModal {
  position: fixed;
  left: 50%;
  bottom: 35%; /* This means 65% up from bottom */
  transform: translateX(-50%);
  z-index: 9999;
  background: #fff;
  padding: 18px 20px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 320px;
  text-align: center;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}



.debug-session-panel {
  position: fixed;
  top: 80px;
  left: 10px;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  max-width: 260px;
  overflow-wrap: break-word;
	
}/* Only visible when .debug-mode is on the <body> */
body:not(.debug-mode) .debug-session-panel {
  display: none;
}

.leaflet-top{
  top: 30% !important;
}

.leaflet-left{
  right: 10px !important;
}

.leaflet-control-zoom {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  border-radius: 2px;
  overflow: hidden; 

height: auto;
}

/* Zoom in/out buttons */
.leaflet-control-zoom a {
  background-color: #3B3C3D !important;
  color: #fff !important;
  border: none !important;
  width: 32px;
  height: 40px;
  font-size: 20px;
  line-height: 40px;
  text-align: center;
  display: block;
  
}

/* Optional: hover effect */
.leaflet-control-zoom a:hover {
  background-color: #444 !important;
  color: #fff !important;
}
.map-layer-toggle {
  position: absolute; /* Keep this for layering relative to map */
  top: 0px;           /* Adjust as needed */
  left: 49px;
  z-index: 1001;       /* Slightly above most elements */
 /* background: rgba(255,255,255,0.7);*/
  color: black;
  padding: 6px;
  border-radius: 8px;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  /*box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);*/
}
.layer-drawer {
  position: absolute;
  bottom: 140px;
  left: 6px;
  z-index: 400;
  width: 47px;
  height: 44px;
  background: rgba(255,255,255,0.7);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  overflow: hidden;
  transition: width 0.3s ease, height 0.3s ease;
}

.layer-drawer.open {
  width: 150px;
  height: 84px;
}
.layer-drawer.closed .map-layer-toggle {
  display: none;
}

#tileoverlay.tile-overlay-active ~ #layerDrawer,
#tileoverlay:not(.hidden) ~ #layerDrawer {
  display: none !important;
}

.map-layer-toggle input[type="radio"] {
  margin-right: 6px;
}

.map-layer-toggle label {
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
}
.map-layer-icon {
  position: absolute;
  top: 1px;  /* Was 80px before, which broke it */
  left: 1px;
  z-index: 2;
  background: rgba(255,255,255,0.7);
  padding: 9px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  cursor: pointer;
}

.map-layer-icon img {
  width: 28px;
  height: 28px;
}


.layer-switcher-header {
  font-weight: bold;
  margin-bottom: 8px;
}
#zoomSliderContainer {
  position: absolute;
  bottom: 190px;
  left: 12px;
  z-index: 400;
  background: rgba(255,255,255,0.8);
  padding: 6px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

#zoomSlider {
  writing-mode: vertical-lr;
  direction: rtl;
  height: 150px;
  width: 20px;
}

/* Spark styles */
.tag-suggestion {
  display: inline-block;
  background-color: #222;
  color: #fff;
  padding: 4px 10px;
  margin: 4px 4px 0 0;
  border-radius: 999px;
  font-size: 12px;
}
/* ===== SPARK INTEL PANEL ===== */
.spark-intel-box {
  background: #f0f4ff;
  border-left: 4px solid #0782DB;
  padding: 12px 14px;
  margin: 16px 0;
  border-radius: 8px;
  font-size: 13px;
  color: #333;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  max-height: 250px;
  overflow-y: auto;
  overflow-x: hidden;
  word-wrap: break-word;
  line-height: 1.4;
  position: relative;
  display: block;
}

#intelText {
  white-space: pre-wrap;
}

.spark-intel-box .spark-avatar {
  font-size: 18px;
  margin-bottom: 6px;
  color: #0782DB;
  font-weight: bold;
}

.spark-assist-btn:hover {
  background-color: #0635E7;
}

.pulsing {
  animation: pulse-glow 1.5s infinite;
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 0px rgba(7, 130, 219, 0.4); }
  50% { box-shadow: 0 0 12px rgba(7, 130, 219, 0.6); }
  100% { box-shadow: 0 0 0px rgba(7, 130, 219, 0.4); }
}
.social-tag {
  background: none !important;
  border: none;
  box-shadow: none;
  padding: 4px;
}

.social-tag img {
  border-radius: 6px;
  width: 42;
  transition: none;
}

.social-tag a {
  background: none;
  padding: 0;
  box-shadow: none;
}

.social-tag:hover {
  background: none;
  transform: none;
}
.ai-box {
  padding: 12px;
  border: 2px dashed #555;
  background: #f2f2f2;
  font-size: 15px;
  line-height: 1.5;
  border-radius: 6px;
  color: #333;
}

#aiPreviewPanel {
  background: #f0f4ff;
  border-left: 4px solid #0782DB;
  padding: 12px 14px;
  margin: 16px 0;
  border-radius: 8px;
  font-size: 13px;
  color: #333;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  max-height: 250px;
  overflow-y: auto;
  overflow-x: hidden;
  word-wrap: break-word;
  line-height: 1.4;
  position: relative;
  display: block;
}

#aiPreviewPanel label {
  font-weight: bold;
  display: block;
  margin-bottom: 6px;
  color: #0056b3;
}

#cleanedText {
 
}

#aiPreviewPanel button {
  padding: 6px 12px;
  font-size: 0.85em;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.ai-buttons {
  display: flex;
  flex-direction: row;
  gap: 10px;
  flex-wrap: wrap;
}

#acceptBtn {
  background-color: #007bff;
  color: white;
}

#rejectBtn {
  background-color: #e0e0e0;
  color: #333;
}
/* Incident modal */
#incidentImageModal.incident-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.incident-modal.hidden { display: none; }

.incident-modal-content {
  background: white;
  padding: 20px;
  width: 90%;
  max-width: 400px;
  border-radius: 10px;
  position: relative;
  text-align: center;
}

.incident-modal-content .close {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 20px;
  cursor: pointer;
}

.incident-drop-area {
  border: 2px dashed #999;
  padding: 20px;
  margin: 10px 0;
  background-color: #fafafa;
  cursor: pointer;
}

.incident-preview-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
}

.incident-thumb {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 5px;
  border: 1px solid #ccc;
  border-radius: 6px;
  overflow: hidden;
}

.incident-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-remove-button {
  position: absolute;
  top: 2px;
  right: 2px;
  background: red;
  color: white;
  font-size: 8px;
  border: none;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  line-height: 14px; /* Ensures vertical centering */
  text-align: center; /* Ensures horizontal centering */
  padding: 0;
  cursor: pointer;
  z-index: 3;
  opacity: 0.85;
}

.incident-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
margin-bottom: 4px;	
}

.incident-preview-item {
  position: relative;
  width: 75px;
  height: 75px;
}

.incident-thumbnail {
  width: 100%;
  height: 100%; 
  object-fit: cover;
  border-radius: 6px;
}

.incident-flag-overlay {
  position: absolute;
  bottom: -6px;
  left: 0;
  background: orange;
  color: black;
  font-size: 11px;
  padding: 2px 4px;
  border-radius: 4px;
}
.incident-modal-thumb {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 4px;
  display: inline-block;
}
.incident-modal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}
/* ALIAS: Apply .mobile-form styles to .form-view */

body.form-view {
  width: 100%;
  height: calc(var(--vh, 1vh) * 100);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

body.form-view main {
  position: relative;
  flex-grow: 1;
  width: 100%;
  max-width: 100%;
  padding: 62px auto;
  overflow: visible;
  -webkit-overflow-scrolling: touch;
  background-color: #fff;
  box-sizing: border-box;
}

body.form-view .form-wrapper {
  position: relative;
  max-width: 400px;
  margin: 80px auto 0;
  padding: 8px 20px 3rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
}

body.form-view .form-group {
  margin: 16px auto 11px auto;
  padding: 10px 5px;
}

body.form-view button:not(.close-x-button):not(.view-toggle-btn):not(.modal-remove-button) {
  background: #0782DB;
  color: white;
  border: none;
  padding: 9px;
  font-size: 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.3s ease;
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-top: 10px;
  width: auto;
  max-width: 300px;
  align-self: center;
}
/* Hidden state */
.comment-modal-overlay.hidden {
  display: none;
}

/* Fullscreen overlay */
.comment-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* Anchor to bottom */
}

/* Drawer box anchored at the bottom */
.comment-modal-box {
  position: relative;
  background: #fff;
  width: 98%;
  max-width: 500px;
  margin: 0 auto;
  height: 60vh;
  display: flex;
  flex-direction: column;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.25);
  animation: slideUp 0.2s ease-out;
  padding: 0; /* Remove to prevent spacing glitches between sections */
  overflow: hidden;
}
.comment-close-x-button {
  position: absolute; 
  right: 10px;	
  font-size: 18px;
  font-weight: bold;
  color: #333;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1;
}
.comment-close-x-button:hover {
  color: #000; /* or whatever hover color you prefer */
  background: none;
}


.comment-input-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
}
/* Scrollable list */
.comment-thread {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1em;
}

/* Footer stays pinned */
.comment-footer {
  flex: 0 0 auto;
  padding: 1px 6px 2px 6px;
  border-top: 1px solid #ddd;
  background-color: #fff;
}
/* Slide up animation */
@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* Optional drag handle */
.comment-drag-handle {
  width: 50px;
  height: 5px;
  background: #ccc;
  border-radius: 4px;
  margin: 12px auto;
}



/* Header row inside modal */
.comment-header {
  display: flex;
  justify-content: center;   /* Center items horizontally */
  align-items: center;       /* Center items vertically */
  font-weight: bold;
  margin-bottom: 1em;
  padding: 4px 4px;
  text-align: center;
}


/* Scrollable comments list */
#commentList {
  max-height: 40vh;
  overflow-y: auto;
  padding-right: 6px;
  margin-bottom: 1em;
}

/* Textarea and button */
#commentForm textarea {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 12px;
  padding: 6px;
  margin-bottom: 8px;
  min-height: 40px;
}

#commentForm button {
  float: right;
  padding: 5px 7px;
  border: none;
  background-color: #333;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
}
.comment {
  margin-bottom: 16px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.comment-row {
  display: flex;
  align-items: flex-start;
}

.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover; 
  margin-top: 6px;
  flex-shrink: 0;
  margin-right: 6px;	
}

.comment-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.comment-handle {
  font-size: 11px;
  color: #666;
  margin-bottom: 0px;
}

.comment-text {
  font-size: 12px;
  line-height: 1.4;
  margin: 2px 0px 2px 0px;
}

.comment-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 11px;
  color: #666;
  margin-right: 50px;	
}

.comment-time, .comment-reply {
  margin: 0px 8px 0px 0px;
}

.comment-reply a {
  color: #0066cc;
  text-decoration: none;
}

.comment-reply a:hover {
  text-decoration: underline;
}

.comment-likes {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: auto;
}

.like-icon {
  width: 16px;
  height: 16px;
  cursor: pointer;
  opacity: 0.7;
}

.like-icon:hover {
  opacity: 1;
}

.like-count {
  font-size: 11px;
  margin-top: 2px;
}

.view-replies {
  font-size: 11px;
  color: #0066cc;
  margin-top: 6px;
  margin-left: 46px; /* aligns under handle/text, not avatar */
  cursor: pointer;
}

.view-replies:hover {
  text-decoration: underline;
}

.comment-replies.hidden {
  display: none;
}

.comment.reply {
  margin-left: 32px;
}
.hide-replies {
  font-size: 11px;
  color: #0066cc;
  margin-top: 6px;
  margin-left: 46px; /* align under replies */
  cursor: pointer;
}

.hide-replies:hover {
  text-decoration: underline;
}
.share-modal-overlay {
  position: fixed;
  padding: 10px;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.share-modal-box {
  background: white;  
  border-radius: 1rem;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  max-width: 412px;
  text-align: center;
  position: relative;
}
.share-modal-content {
  background: white;
  padding: 20px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  border-radius: 10px;
}

.share-modal-close-button {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 24px;
  cursor: pointer;
}


.pulse {
  animation: pulse-glow 1.5s infinite;
  filter: drop-shadow(0 0 6px rgba(16, 108, 247, 0.8)); /* subtle glow */
  transition: transform 0.3s ease-in-out;
}

@keyframes pulse-glow {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.6));
  }
  50% {
    transform: scale(1.2);
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 1));
  }
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.6));
  }
}

/* Compact container for embedded action boxes */
.action-box {
  padding: 4px;  
  border-radius: 0px;
  background-color: rgba(255, 255, 255, 0.05);
  font-size: 13px;
  color: black;
  display: flex;
  flex-direction: column;  
}

/* Each row represents one action config */
.action-row {
  padding: 10px;
  border:rgba(20, 92, 247, 0.05);  
  border-radius: 8px;
  background-color: rgba(122, 122, 122, 0.2);
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}

/* Label + value inline */
.action-row p {
  margin: 0;
}

/* Primary button used in action row */
 .action-icon-button {
    background: none;
    border: none;
    padding: 0;
    margin: 0 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease-in-out;
  }

  .action-icon-button img {
    width: 32px;    
  }

  .action-icon-button:hover {
    transform: scale(1.2);
  }
/* Checkbox label spacing */
.action-row label {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Act input field (if needed) */
.act-input {
  padding: 2px;
  border: 1px solid #999;
  border-radius: 6px;
  font-size: 13px;
  background-color: white;
  color: black;
}

/* Optional status text */
.act-status {
  font-size: 12px;
  color: #ccc;
  margin-top: 4px;
}
.donation-bar-container {
  display: flex;
  justify-content: center;
  gap: 40px; /* space between bars */
  flex-wrap: wrap;
  text-align: center;
}

  .donation-bar-wrap {
    flex: 1 1 45%;
    max-width: 45%;
  }
  .donation-bar-label {
    font-size: 10px;
    color: #020000;
    margin-bottom: 4px;
  }
  .donation-bar-bg {
    width: 100%;
    height: 6px;
    background: #333;
    border-radius: 10px;
    overflow: hidden;
  }
  .donation-bar-fill {
    height: 100%;
    background: #4caf50;
    width: 0%;
  }
.unread-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background-color: red;
  color: white;
  font-size: 12px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 999px;
  z-index: 10;
}

.dm-navbutton {
  position: relative; /* Needed for badge positioning */
}

.inbox-badge {
  position: absolute;
  top: 4px;
  right: 10px;
  background-color: red;
  color: white;
  border-radius: 50%;
  font-size: 11px;
  font-weight: bold;
  padding: 1px 5px;
  line-height: 1;
  z-index: 10;
}
#tileoverlay {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;  
  height: 100%;
  background: rgba(255, 255, 255, 0.5); /* Optional: adjust transparency */
   backdrop-filter: blur(2px);
  background-color: rgba(0, 0, 0, 0.3); /* slight dark tint */
  z-index: 500;
  transition: opacity 0.2s ease;
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
   overflow-y: scroll;  
}

#tileoverlay.hidden {
  display: none;
}

#tileoverlaycontent {
  visibility: hidden; 
}

.tile-overlay-active #tileoverlaycontent {
  visibility: visible;
}

.form-overlay-active #tileoverlay {
  z-index: 8000; /* higher than bottom tabs and floating menu */
}

.report-form {
  padding: 8px;
}

.report-form .form-group {
  margin-bottom: 1rem;
}

.report-form .form-label {
  font-weight: bold;
  display: block;
  margin-bottom: 0.3rem;
}

.report-form .form-control {
  width: 100%;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 14px;
  box-sizing: border-box;
}

.report-status-card {
  background: #f9f9f9;
  border: 1px solid #ddd;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.report-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.75rem;
}

.report-details {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
}

.report-details li {
  margin-bottom: 0.25rem;
  color: #333;
}

.report-thanks {
  color: #4CAF50;
  font-weight: 500;
}


/* === Universal Legal Modal === */
.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
}

.legal-modal-content {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  max-width: 768px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
  position: relative;
}

.legal-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 1.5rem;
  color: #666;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.legal-modal-close:hover {
  color: #000;
}

.auth-required.guest-mode {
  opacity: 0.4;
  cursor: not-allowed;
}

.auth-required.guest-mode::after {
  content: "Login to use";
  position: absolute;
  background: #222;
  color: #fff;
  font-size: 10px;
  padding: 3px 6px;
  border-radius: 4px;
  white-space: nowrap;
  display: none;
  top: 100%;
  left: 0;
  z-index: 999;
}

.auth-required.guest-mode:hover::after {
  display: block;
}

.floating-alert-icon {
  position: fixed;
  top: 15px;
  right: 15px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  font-size: 2rem;
  cursor: pointer;

  animation: pulse 1.5s infinite;
  border-radius: 50%;
  background: red;
  color: white;
  box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.5); /* initial pulse state */
}


@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,0,0,0.5); }
  70%  { box-shadow: 0 0 0 15px rgba(255,0,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,0,0,0); }
}
.dismiss-alert-btn {
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 1rem;
  cursor: pointer;
  color: white;
  background: transparent;
}
.alert-badge {
  background-color: red;
  color: white;
  font-weight: bold;
  border-radius: 999px;
  padding: 4px 8px;
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.9em;
  z-index: 1000;
}

.alert-badge.hidden {
  display: none;
}
.activity-drawer-wrapper {
  padding: 12px;
  font-family: sans-serif;
}

.activity-header {
  font-size: 1.1em;
  margin-bottom: 8px;
  font-weight: bold;
}

.activity-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85em;
}

.activity-table th {
  text-align: left;
  background-color: #f2f2f2;
  padding: 6px;
}

.activity-table td {
  padding: 6px;
  border-bottom: 1px solid #eee;
}

.no-alerts-message {
  padding: 16px;
  color: #555;
  text-align: center;
  font-style: italic;
}


/* Main container — top-left floating */
.alert-bar-container {
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 10000;
  display: flex;
  gap: 12px;
  pointer-events: none; /* only child elements handle interaction */
}

/* Individual alert item */
.alert-bar-item {
  pointer-events: auto;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  animation: pulseFade 1s ease-in-out infinite alternate;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  user-select: none;
}

/* Color per type (you can swap these out later with PNGs) */
.alert-icon-incident {
  background-color: #ff3b3b;
  color: white;
}

.alert-icon-event {
  background-color: #ff9500;
  color: white;
}

.alert-icon-spark {
  background-color: #007aff;
  color: white;
}

/* Simple pulsing animation */
@keyframes pulseFade {
  from { transform: scale(1); opacity: 0.8; }
  to { transform: scale(1.1); opacity: 1; }
}
.alert-urgency-1 {
  filter: drop-shadow(0 0 6px yellow);
}
.alert-urgency-2 {
  filter: drop-shadow(0 0 6px orange);
}
.alert-urgency-3 {
  filter: drop-shadow(0 0 8px red);
  animation: pulseFade 1s ease-in-out infinite alternate;
}

.animated-alert-dot {
  animation: pulse-alert 1s ease-out infinite;
  display: inline-block;
}

@keyframes pulse-alert {
  0% { transform: scale(1); filter: drop-shadow(0 0 0px red); }
  50% { transform: scale(1.3); filter: drop-shadow(0 0 10px red); }
  100% { transform: scale(1); filter: drop-shadow(0 0 0px red); }
}
.alert-dot-wrapper {
  position: relative;
  width: 47px;
  height: 47px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.alert-dot-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

/* Animations */
.live-alert-dot-low::after,
.live-alert-dot-medium::after,
.live-alert-dot-high::after {
  content: '';
  position: absolute;
  width: 47px;
  height: 47px;
  border-radius: 50%;
  top: 0;
  left: 0;
  z-index: -1;
}

.live-alert-dot-low::after {
  animation: pulse-alert-low 1.8s ease-in-out infinite;
  box-shadow: 0 0 8px 4px orange;
}
.live-alert-dot-medium::after {
  animation: pulse-alert-medium 1.2s ease-in-out infinite;
  box-shadow: 0 0 12px 5px gold;
}
.live-alert-dot-high::after {
  animation: pulse-alert-high 0.8s ease-in-out infinite;
  box-shadow: 0 0 16px 6px red;
}

@keyframes pulse-alert-low {
  0%   { transform: scale(1); opacity: 0.5; }
  50%  { transform: scale(1.5); opacity: 1; }
  100% { transform: scale(1); opacity: 0.5; }
}
@keyframes pulse-alert-medium {
  0%   { transform: scale(1); opacity: 0.5; }
  50%  { transform: scale(1.6); opacity: 1; }
  100% { transform: scale(1); opacity: 0.5; }
}
@keyframes pulse-alert-high {
  0%   { transform: scale(1); opacity: 0.5; }
  50%  { transform: scale(1.7); opacity: 1; }
  100% { transform: scale(1); opacity: 0.5; }
}
  /* lock the tile layer to vertical touch scrolling */
#tileoverlay,
#swipecontent,
#tileoverlaycontent {
  touch-action: pan-y;
  overscroll-behavior-x: contain; /* no sideways page bounce */
}

/* allow horizontal pan for in-tile carousels/strips */
.media-strip,
.media-grid,
.hscroll,
.horizontal-scroll,
.tile-gallery {
  touch-action: pan-x;
  overscroll-behavior-y: contain;
}

/* optional: while tiles are up, prevent horizontal overscroll chaining on body */
body.tile-overlay-active {
  overscroll-behavior-x: none;
}

/* keep marker icons small and proportional (matches iconSize: 42x42) */
#map .leaflet-marker-icon .dot-wrapper {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  line-height: 0;
  position: relative;
}

/* core image clamp — do NOT stretch, keep aspect ratio */
#map .leaflet-marker-icon .dot-img {
  max-width: 42px !important;
  max-height: 42px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
  display: block;
}

/* live alert variant (matches iconSize: 45x45 when alert) */
#map .leaflet-marker-icon .alert .dot-wrapper {
  width: 45px;
  height: 45px;
}
#map .leaflet-marker-icon .alert .dot-img {
  max-width: 45px !important;
  max-height: 45px !important;
}

/* --- LIVE pulse ring (only when wrapper gets .is-live) --- */
#map .leaflet-marker-icon .dot-wrapper.is-live::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 42px; height: 42px;
  transform: translate(-50%,-50%);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(220,0,0,.55);
  animation: livePulse 1.8s ease-out infinite;
  pointer-events: none;
}
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(220,0,0,.55); }
  70%  { box-shadow: 0 0 0 14px rgba(220,0,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(220,0,0,0); }
}

/* --- LIVE badge (override Leaflet’s generic <img> rule) --- */
#map .leaflet-marker-pane .live-badge {
  width: 50px !important;  
  position: absolute;
  left: 3px;  /* tweak as you like */
  bottom: 43px;
  pointer-events: none;
  animation: bob 1.2s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-1px) } }

/* --- Mini viewer inside the popup (landscape 16:9) --- */
.mini-live {
  margin-top: 8px;
  width: 102px;               /* 9:16 */
  height: 145px;              /* 9:16 */
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 4px 10px rgba(0,0,0,.2);
}
.mini-live a { display: block; line-height: 0; }
.mini-live video, .mini-live img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ensure hidden actually hides on older browsers */
#installWrap[hidden]{ display:none !important; }

/* your original panel vibe */
.install-wrapper{
  margin-top: 2px;
  background: rgba(0, 0, 0, .7);
  border: 1px solid rgba(255, 215, 0, 0.8);
  padding: 8px 4px;
  border-radius: 6px;
  font-size: 15px;
  color: white;
  text-align: center;
  z-index: 700;
  top: 50px;
  right: 2px;
  position: absolute; /* stick where you had it */
}

/* clean, clickable button that inherits the panel look */
.install-btn{
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font: 400 15px/1.2 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  cursor: pointer;
  padding: 0;            /* panel handles padding */
}

.install-btn:hover{ opacity: .9; }
.install-btn:focus-visible{ outline: 2px solid #fff; outline-offset: 2px; }

.install-btn img{
  display: block;
  width: 80px;
  height: 80px;
}

/* Inline geocode inside the floating search bar */
.inline-geocode { position: relative; margin: 8px 0 10px; }
.inline-geocode .geo-row { display: flex; gap: 8px; align-items: center; }

.inline-geocode .geo-input {
  flex: 1 1 auto; width: 100%;
  padding: 8px 10px; border: 1px solid #ccc; border-radius: 8px;
  font: 14px/1.2 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
.inline-geocode .geo-btn {
  padding: 8px 12px; border: 1px solid #bbb; border-radius: 8px;
  background: #f7f7f7; cursor: pointer;
}
.inline-geocode .geo-btn:hover { background: #efefef; }

.inline-geocode .geo-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px);
  background: #fff; border: 1px solid #ddd; border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  max-height: 260px; overflow: auto; z-index: 9999;
}
.inline-geocode .geo-item { padding: 8px 10px; cursor: pointer; border-bottom: 1px solid #f2f2f2; }
.inline-geocode .geo-item:last-child { border-bottom: 0; }
.inline-geocode .geo-item:hover { background: #f5f8ff; }
.inline-geocode .geo-title { font-weight: 600; font-size: 13px; color: #111; }
.inline-geocode .geo-sub   { color: #666; font-size: 12px; margin-top: 2px; }

@media (max-width: 640px) {
  .inline-geocode .geo-input { padding: 7px 9px; font-size: 13px; }
  .inline-geocode .geo-btn   { padding: 7px 10px; font-size: 13px; }
}
/* Clear button for persisted search results */
#searchResults { position: relative; }
#clearResultsBtn.search-results-clear {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  border: 0;
  background: #f5f5f5;
  border-radius: 999px;
  padding: 4px 6px;
  line-height: 1;
  cursor: pointer;
  font-size: 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
#clearResultsBtn.search-results-clear:hover { background: #e9e9e9; }

/* Row: icons stretch evenly across */
.add-options-row{
  display:flex;
  align-items:stretch;
  justify-content:space-between; /* even distribution across row */
  gap:12px;                      /* consistent gaps */
  width:100%;
  pointer-events: auto;
  margin-bottom: 4px;
}

/* Equal-width tiles */
.add-avatar-btn{
  flex:1 1 0;        /* each takes equal width */
  min-width:0;       /* prevent overflow */
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  pointer-events: auto;

  background: var(--tile-bg, #0f1115);
  border: 1px solid var(--tile-border, #252a33);
  border-radius: 18px;
  padding: 14px 10px;
  cursor: pointer;

  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
}

/* Avatar image */
.add-avatar-btn img{
  width:72px;
  height:72px;
  border-radius:50%;
  object-fit:cover;
  display:block;
  transition: box-shadow .18s ease, transform .18s ease;
}

/* Label */
.add-avatar-label{
  font-size:14px;
  font-weight:600;
  letter-spacing:.2px;
  color:#e7edf6;
  user-select:none;
}

/* Hover/focus */
.add-avatar-btn:hover,
.add-avatar-btn:focus-visible{
  transform: translateY(-2px) scale(1.03);
  border-color:#5aa0ff;
  box-shadow: 0 8px 24px rgba(0,0,0,.25), 0 0 0 3px rgba(90,160,255,.25);
  outline:none;
}
.add-avatar-btn:hover img,
.add-avatar-btn:focus-visible img{
  box-shadow: 0 0 0 4px rgba(90,160,255,.35);
}

/* Mobile tweaks: keep one row, just scale down */
@media (max-width: 480px){
  .add-options-row{ gap:10px; }
  .add-avatar-btn{ padding: 12px 8px; border-radius:16px; }
  .add-avatar-btn img{ width:56px; height:56px; }
  .add-avatar-label{ font-size:13px; }
}

/* Ultra-narrow fallback: allow wrap into 2x2 if needed */
@media (max-width: 360px){
  .add-options-row{ flex-wrap:wrap; }
  .add-avatar-btn{ flex:1 1 calc(50% - 10px); }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .add-avatar-btn, .add-avatar-btn img{ transition:none; }
}
.addpanel-modal.hidden { display:none; }
.addpanel-modal { position:fixed; inset:0; background:rgba(0,0,0,.5); display:flex; align-items:center; justify-content:center; z-index:9999; }
.addpanel-card { background:#fff; border-radius:10px; padding:16px; width:92%; max-width:420px; box-shadow:0 10px 30px rgba(0,0,0,.2); position:relative; }
.addpanel-card .close-btn{ position:absolute; right:8px; top:6px; font-size:22px; background:transparent; border:0; cursor:pointer;}
.addpanel-card .row{ margin-top:10px;}
.row-inline{ display:flex; gap:8px; align-items:center;}
.lbl{ display:block; font-weight:600; margin:6px 0 4px;}
.num{ width:110px; }
.sel{ min-width:120px; }
.primary{ margin-top:12px; }
.msg{ margin-top:8px; font-size:.95em; color:#444; }

/* Overlay */
.welcome-modal{
  position:fixed; inset:0; z-index:9999;
  background:rgba(0,0,0,.55);
  display:none;                 /* toggled by JS */
  overflow:auto;                /* allow scroll if tall */
}

/* Card */
.welcome-card{
  width:min(92vw, 920px);
  max-height:88dvh;             /* tall but not full height */
  margin:5vh auto;              /* visible backdrop = “floating” */
  background:#fff; color:#111;
  border-radius:16px;
  border:1px solid #e9e9e9;
  box-shadow:0 20px 60px rgba(0,0,0,.22);
  display:grid;                 /* header / content / footer */
  grid-template-rows:auto 1fr auto;
}

/* Header */
.welcome-head{ padding:12px 16px 8px }
.welcome-row{ display:flex; align-items:center; justify-content:space-between; gap:10px }
.welcome-head h2{ margin:0 0 4px; font:600 22px/1.2 system-ui,-apple-system,Segoe UI,Roboto,Arial }
.welcome-sub{ margin:0; color:#555 }

/* Content list scrolls inside the card */
.welcome-items{
  display:grid; grid-template-columns:1fr 1fr; gap:14px 18px;
  padding:10px 12px 12px;
  overflow:auto;                /* key: scroll here, not the whole screen */
  -webkit-overflow-scrolling:touch;
}

/* Item */
.welcome-item{
  display:grid; grid-template-columns:42px 1fr; gap:10px; align-items:start;
  border:1px solid #eee; border-left:4px solid #062dbd;
  border-radius:12px; padding:10px;
}
.welcome-item .icon{ width:36px; height:36px; border-radius:8px }
.welcome-item h3{ margin:0 0 2px; font-size:16px }
.welcome-item h3 a{
  color:inherit; text-decoration:none; border-bottom:1px dashed rgba(0,0,0,.3);
}
.welcome-item h3 a:hover{ border-bottom-style:solid }
.welcome-item p{ margin:0; color:#333; font-size:14px }

/* Footer stays reachable */
.welcome-foot{
  position:sticky; bottom:0;
  display:flex; gap:8px; justify-content:flex-end;
  padding:10px 12px;
  border-top:1px solid #eee;
  background:linear-gradient(to bottom, transparent, #fff 35%), #fff;
}

/* Buttons */
.btn{
  appearance:none; border:1px solid #ddd; background:#f7f7f7;
  padding:5px 5px; border-radius:10px;
  font-weight:500; cursor:pointer; text-decoration:none; color:#111;
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
}
.btn:hover{ background:#f0f0f0 }
.btn-primary{ background:#111; color:#fff; border-color:#111 }
.btn-primary:hover{ filter:brightness(.95) }
.btn-ghost{ background:transparent }
.btn-small{ padding:8px 10px; font-size:13px; line-height:1 }

/* Mobile: keep it floating and narrow */
@media (max-width: 820px){
  .welcome-card{
    width:min(92vw, 560px);   /* << narrower on phones */
    max-height:88dvh;
    margin:6vh auto;
    border-radius:14px;
  }
  .welcome-items{
    grid-template-columns:1fr;
    gap:10px 12px;
    padding:8px 12px 12px;
  }
  .welcome-item{
    grid-template-columns:36px 1fr;
    padding:8px 9px; border-left-width:3px;
  }
  .welcome-item .icon{ width:32px; height:32px }
  .welcome-item h3{ font-size:14px }
  .welcome-item p{ font-size:13px; line-height:1.35 }
  .welcome-foot .btn{ width:100% } /* comfy thumb targets */
}

/* Very small phones: stack footer buttons */
@media (max-width: 420px){
  .welcome-card{ width:min(86vw, 460px); margin:6vh auto }
  .welcome-foot{ flex-direction:column }
}

/* ---------- BASE (Web/PWA) ---------- */
:root { --safe-top: 0px; }
#floatingTopControls,
#floatingSearchBar,
.view-toggle-wrapper {
  /* your normal web positions here */
}

/* ---------- NATIVE SHARED HOOK ---------- */
/* Optional if you also add .native and .native-ios later */
body.native { /* shared native tweaks if needed */ }

/* ---------- ANDROID-ONLY OVERRIDES ---------- */
body.native-android { --safe-top: 28px; padding-top: var(--safe-top); }

/* Fixed UI nudged below the status bar */
body.native-android #floatingTopControls {
  position: fixed;
  top: calc(var(--safe-top) + 2px) !important;
}

body.native-android #floatingSearchBar {
  position: fixed;
  top: calc(var(--safe-top) + 34px) !important;
}

body.native-android #bottomNav {
   bottom: 40 !important;
}

body.native-android #addOptions {
   bottom: 97px !important;
}

body.native-android #map {
   height: 90vh !important;
}
body.native-android .view-toggle-wrapper {
  position: fixed;
  top: calc(var(--safe-top) + 220px) !important;
}

body.native-android .tileoverlay {
height: 90%;

}

body.native-android .fullscreen-modal {
    top: 26px !important; 
}
/* Add any other Android-only adjustments here */

/* bump way above any modal stacks */
.locpick-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 2147483000; /* was 999989 */
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}
