/* ========== CSS VARIABLES - Stylesheet Guide Standards ========== */
:root {
  /* Typography */
  --font-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Type Scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;

  /* Colors - Greys */
  --white: #FFFFFF;
  --grey-100: #F5F5F5;
  --grey-200: #DCDCDC;
  --grey-300: #D3D3D3;
  --grey-400: #C0C0C0;
  --grey-500: #A9A9A9;
  --grey-600: #808080;
  --grey-700: #696969;
  --grey-800: #778899;
  --grey-900: #708090;

  /* Colors - Blues */
  --blue-700: #1E90FF;
  --blue-800: #4169E1;
  --blue-950: #0000CD;

  /* Semantic Colors */
  --primary: var(--blue-700);
  --primary-hover: var(--blue-800);
  --primary-active: var(--blue-950);
  --text-primary: var(--grey-900);
  --text-secondary: var(--grey-700);
  --text-disabled: var(--grey-500);
  --border-color: var(--grey-300);
  --disabled-bg: var(--grey-100);

  /* Button Colors */
  --btn-standard: #5F9EA0;

  /* Feature Colors */
  --feature-zones: #8B72BE;
  --feature-zones-light: rgba(139, 114, 190, 0.08);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition: 200ms ease-in-out;
  --transition-slow: 300ms ease-in-out;
}

/* Header frame + divider + spacing */
header {
  position: relative;
  padding: 6px 8px 0;
  border-bottom: 1px solid #eee;
  margin-bottom: 15px;
}

.wb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.wb-logo {
  flex: 0 0 auto;
}

.wb-logo img {
  display: block;
  margin: 0;
  max-width: 130px;
}

.wb-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Icon buttons: Back + Share + Hamburger */
#backBtn,
#shareBtn,
.menu-button {
  width: 32px;
  height: 32px;
  box-sizing: border-box;
  background: #fff;
  border: 2px solid #000;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  cursor: pointer;
  transition: transform .06s ease, background .2s ease;
  color: #000;
}

#backBtn:hover,
#shareBtn:hover,
.menu-button:hover {
  background: #f5f5f5;
}

#backBtn:active,
#shareBtn:active,
.menu-button:active {
  transform: scale(0.98);
}

#backBtn svg,
#shareBtn svg {
  width: 16px;
  height: 16px;
  display: block;
  stroke: currentColor;
  fill: none;
}

.menu-button {
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}

.menu-button span {
  width: 100%;
  height: 2px;
  background: #000;
  border-radius: 2px;
}

/* Hide share button from header - moved to footer */
#shareBtn {
  display: none !important;
}

/* === Drawer (clean, airy) === */
#wb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 10000;
}

#wb-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

#wb-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(65vw, 640px);
  max-width: 90vw;
  background: #fff;
  box-shadow: -16px 0 32px rgba(0, 0, 0, .15);
  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.2, .8, .2, 1);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

#wb-drawer.open {
  transform: translateX(0);
}

/* ========================================
   GROUPS: NOTICEBOARD DRAWER - ACT 1 FULL-PAGE PATTERN
   ======================================== */

/* Drawer Overlay - Full-page takeover */
#wb-group-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10002;
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

#wb-group-drawer.open {
  display: block;
  opacity: 1;
}

/* Drawer Panel - White background, scrollable */
.wb-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 640px;
  height: 100%;
  background: var(--white);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#wb-group-drawer.open .wb-drawer-panel {
  transform: translateX(0);
}

/* Drawer Header - Fixed at top */
.wb-drawer-header {
  position: sticky;
  top: 0;
  background: var(--white);
  border-bottom: 1px solid #E8E8E8;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 10;
  flex-shrink: 0;
}

.wb-drawer-back-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #F5F5F5;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.wb-drawer-back-btn:hover {
  background: #E8E8E8;
}

.wb-drawer-back-btn i {
  font-size: 18px;
  color: #111;
}

.wb-drawer-header-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.wb-group-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wb-group-icon i {
  font-size: 24px;
  color: white;
}

.wb-drawer-header-text {
  flex: 1;
  min-width: 0;
}

.wb-drawer-title {
  font-size: 18px;
  font-weight: 700;
  color: #111;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wb-drawer-subtitle {
  font-size: 13px;
  color: #717171;
  margin-top: 2px;
}

/* Drawer Content - Scrollable area */
.wb-drawer-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--white);
}

@media (max-width: 640px) {
  .wb-drawer-panel {
    max-width: 100%;
  }
}

.wb-d-head {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}

.wb-d-title {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: .2px;
}

/* Fixed drawer sections */
.wb-d-main,
.wb-d-footer {
  padding: 16px 3px;
  overflow: hidden;
}

.wb-d-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
}

.wb-d-footer {
  border-top: 1px solid #eee;
  padding-bottom: 16px;
  padding-top: 8px;
  flex-shrink: 0;
}

/* Menu lists */
.wb-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

#wb-menu-main {
  flex: 1;
}

#wb-menu-footer {
  flex-shrink: 0;
}

.wb-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: transparent;
  border: 0;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  text-decoration: none;
  color: #111;
  font-weight: 500;
  font-size: 18px;
  line-height: 1.25;
}

.wb-menu-item:hover {
  opacity: .85;
}

.wb-menu-item:focus-visible {
  outline: 2px solid #c7d2fe;
  outline-offset: 3px;
}

.wb-menu-item,
.wb-menu-item:visited,
.wb-menu-item:active {
  text-decoration: none;
  color: #111;
}

.wb-menu-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111;
  flex: 0 0 22px;
}

.wb-menu-icon svg {
  width: 22px;
  height: 22px;
  display: block;
  stroke: currentColor;
  fill: none;
}

.wb-menu-icon i {
  font-size: 22px;
  color: inherit;
}

/* Menu separator */
.wb-menu-separator {
  height: 1px;
  background: #ddd;
  margin: 8px 16px;
}

/* Add separator line above Privacy Policy */
#m-privacy::before {
  content: '';
  display: block;
  height: 2px;
  background-color: #333;
  margin: 20px 0 20px 0;
  width: 65%;
  clear: both;
}

/* Smaller text and extra spacing for legal/admin items */
#m-privacy,
#m-terms {
  display: block !important;
  font-size: 14px !important;
  /* smaller than main menu items */
  margin-top: 4px;
  /* push down slightly */
  padding: 8px 12px !important;
  line-height: 1.1 !important;
  /* adjust line-height for smaller text */
  align-items: center !important;
  /* force vertical centering */
  color: #111;
  /* full black, same as other menu items */
}

/* Log Out - heavier font weight for more prominence */
#m-logout {
  display: block !important;
  font-size: 14px !important;
  margin-top: 4px;
  padding: 8px 12px !important;
  line-height: 1.1 !important;
  align-items: center !important;
  color: #111;
  font-weight: 600;
  /* heavier font weight */
}

/* Scale down icons for legal/admin items */
#m-privacy .wb-menu-icon,
#m-terms .wb-menu-icon,
#m-logout .wb-menu-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  margin-right: 8px;
  transform: translateY(3px);
}

#m-privacy .wb-menu-icon svg,
#m-terms .wb-menu-icon svg,
#m-logout .wb-menu-icon svg {
  width: 14px;
  height: 14px;
}

#m-privacy .wb-menu-icon i,
#m-terms .wb-menu-icon i,
#m-logout .wb-menu-icon i {
  font-size: 14px;
}

/* === FIXED FOOTER NAVIGATION === */
.wb-footer-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  padding: 2px 0 6px 0;
  z-index: 1000;
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  height: 80px;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

.wb-footer-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.wb-footer-nav-item:hover {
  background: #f8f9fa;
  transform: translateY(-1px);
}

.wb-footer-nav-icon {
  width: 28px;
  height: 28px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  transition: color 0.2s ease;
}


.wb-footer-nav-icon svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2px;
}

.wb-footer-nav-icon img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.wb-footer-nav-icon i {
  font-size: 26px;
  color: inherit;
}

.wb-footer-nav-text {
  font-size: 12px;
  font-weight: 500;
  color: #515050ff;
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
}

/* Default Visibility (Mobile) */
.wb-footer-nav-text.mobile-text {
  display: block;
}

.wb-footer-nav-text.desktop-text {
  display: none;
}

.wb-footer-nav-item:hover .wb-footer-nav-icon {
  color: #0366d6;
}

.wb-footer-nav-item:hover .wb-footer-nav-text {
  color: #0366d6;
  white-space: nowrap;
}



/* Add bottom padding to body to prevent content overlap */
body {
  padding-bottom: 80px !important;
}


/* === ALERTS PANEL - Modern Clean Design === */
#wb-alerts-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100vw;
  height: 100vh;
  background: #fff;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1);
  z-index: 10002;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

#wb-alerts-panel.open {
  transform: translateX(0);
}

/* Desktop: Side panel positioning */
@media (min-width: 768px) {
  #wb-alerts-panel {
    width: 450px;
    left: calc(50% + 250px);
    right: auto;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.3);
    border-left: 2px solid #5F9EA0;
    /* Cadet blue left border */
    border-top-left-radius: 20px;
    /* Rounded top-left corner */
  }

  #wb-alerts-panel.open {
    transform: translateX(-50%);
  }

  /* Match incident drawer mascot sizing (scaled) - increased 56.25% total */
  #wb-alerts-panel .drawer-header-image {
    max-width: 355.46875px !important;
    /* 227.5px × 1.5625 (1.25 × 1.25) */
    height: 106.640625px !important;
    /* 68.25px × 1.5625 (1.25 × 1.25) */
  }

  /* Reduce top padding of content area */
  #wb-alerts-panel .wb-alerts-content {
    padding-top: 8px;
    /* 50% reduction: 16px → 8px */
  }

  /* Reduce top margin of content container */
  #wb-alerts-panel .wb-notif-section {
    margin-top: 18px;
    /* 50% reduction: 36px → 18px */
  }

  /* Match incident drawer title sizing */
  #wb-alerts-panel .drawer-intro-question {
    font-size: 22px !important;
    margin-bottom: 15px !important;
    /* 50% reduction: 30px → 15px */
  }

  /* Container title - "Set up an Alert Zone" */
  #wb-alerts-panel .wb-notif-heading {
    font-size: 20px !important;
    margin-bottom: 28px !important;
    /* Original 8px + 20px extra */
  }

  /* Placeholder text size for desktop - matching incident drawer pattern */
  #wb-alerts-panel .wb-form-input::placeholder {
    font-size: 18px;
  }

  /* Celebration Screen - match alerts panel positioning on desktop */
  #wb-alerts-panel~.celebration-screen.active {
    width: 450px;
    /* Match drawer width */
    left: calc(50% + 250px);
    /* Match alerts panel position */
    right: auto;
    transform: translateX(-50%);
    padding: 20px 10px;
    /* 50% smaller: 40,20 → 20,10 */
  }

  .celebration-screen.active .celebration-mascot {
    max-width: 225px;
    /* Increased by 50% from 150px */
    margin-bottom: 22.5px;
    /* Increased by 50% from 15px */
  }

  .celebration-screen.active .celebration-message {
    max-width: 285px;
    /* Increased by 50% from 190px */
    padding: 0 15px;
    /* Increased by 50% from 10px */
  }

  .celebration-screen.active .celebration-title {
    font-size: 21px;
    /* Increased by 50% from 14px */
    margin-bottom: 12px;
    /* Increased by 50% from 8px */
  }

  .celebration-screen.active .celebration-subtitle {
    font-size: 15px;
    /* Increased by 50% from 10px */
  }
}

/* Modern Alerts Header - Updated to Stylesheet Guide Standards */
.wb-alerts-header {
  background: var(--white, #FFFFFF);
  padding: 16px 16px 8px;
  border-bottom: none;
  display: flex;
  flex-direction: column;
  position: relative;
  color: var(--text-primary, #708090);
}

/* Drawer Header Image - Brand mascot for integrated page feel (75% bigger) */
.drawer-header-image {
  width: 100%;
  max-width: 350px;
  height: 105px;
  margin: 25px auto 12px;
  /* Added 25px top padding */
  object-fit: contain;
  display: block;
  border: none;
  /* Remove border */
  outline: none;
  /* Remove outline */
  box-shadow: none;
  /* Remove shadow */
  position: relative;
  /* Above wallpaper */
  z-index: 1;
  -webkit-tap-highlight-color: transparent;
  /* Remove mobile tap highlight */
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
  /* Disable any interaction with mascot */
}

/* People panel mobile: Larger mascot, moved up */
#wb-people-panel .drawer-header-image {
  max-width: 630px;
  /* 80% larger: 350px × 1.8 */
  height: 189px;
  /* 80% larger: 105px × 1.8 */
  margin: -10px auto 6px;
  /* Bottom margin reduced 50%: 12px → 6px */
}

/* People panel mobile: Larger title text */
#wb-people-panel .drawer-intro-question {
  font-size: 24px;
  /* 2px larger: 22px → 24px */
  margin-top: -10px;
  /* Negative to pull up closer to mascot */
  margin-bottom: 15px;
  /* Keep existing bottom margin */
}

/* Drawer Intro Question - Friendly context for user */
.drawer-intro-question {
  font-size: 22px;
  font-weight: 800;
  color: darkslategrey;
  margin: 0 0 30px;
  text-align: center;
  letter-spacing: -0.5px;
  padding: 0 16px;
  position: relative;
  /* Above wallpaper */
  z-index: 1;
}

.wb-alerts-icon {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.wb-alerts-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary, #708090);
  margin: 0;
  text-align: center;
  letter-spacing: -0.3px;
}

/* Close Button - Chevron Left Pattern (Stylesheet Guide Standard) */
.wb-alerts-close,
.close-button {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full, 9999px);
  background: var(--grey-200, #DCDCDC);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast, 150ms ease-in-out);
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 10003;
  font-size: 24px;
  color: var(--grey-700, #696969);
  font-weight: 700;
  line-height: 1;
  padding: 0;
}

.wb-alerts-close:hover,
.close-button:hover {
  background: var(--grey-300, #D3D3D3);
}

/* Help Button - Mirror of close button on right side */
.help-button {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full, 9999px);
  background: var(--grey-200, #DCDCDC);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast, 150ms ease-in-out);
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10003;
  font-size: 20px;
  color: var(--grey-700, #696969);
  font-weight: 700;
  line-height: 1;
  padding: 0;
}

.help-button:hover {
  background: var(--grey-300, #D3D3D3);
}

/* Help Modal - Explainer overlay */
.help-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000102 !important;
  /* Above People drawer (1000100) and delete toasts (1000101) */
  padding: 20px;
}

.help-modal.open {
  display: flex;
}

.help-modal-content {
  background: var(--white, #FFFFFF);
  border-radius: var(--radius, 12px);
  max-width: 320px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  border: 1px solid var(--grey-300, #D3D3D3);
  box-shadow: -4px 4px 0px 0px #5F9EA0, 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  padding: 32px;
}

.help-modal-title {
  font-size: 20px;
  font-weight: 800;
  color: darkslategrey;
  margin: 0 0 20px 0;
  text-align: center;
}

.help-modal-body p {
  font-size: 15px;
  line-height: 1.6;
  color: #374151;
  margin: 0 0 16px 0;
}

.help-modal-body p:last-child {
  margin-bottom: 0;
}

/* ========================================
   MY PEOPLE PANEL - ACT 1 PATTERN
   Walk Safe / Safety Circle Feature
   Color: #6A5ACD (SlateBlue)
   ======================================== */

/* Main Panel - Full-page drawer */
#wb-people-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100vw;
  height: 100vh;
  background: var(--white, #FFFFFF);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 1000100;
  /* Above menu panel - matches incident drawer z-index */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

#wb-people-panel.open {
  transform: translateX(0);
}

/* Scrollable Content Area */
.wb-people-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 32px;
  /* No top padding - mascot moves up */
  background: transparent;
  /* Allow wallpaper to show through */
  position: relative;
  /* For wallpaper positioning */
}

/* Wallpaper Pattern Background - Behind content */
.wb-people-content::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('/assets/patterns/hero-wallpaper.svg');
  background-repeat: repeat;
  background-size: 600px 600px;
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

/* People Sections - ACT 1: Grey containers on white */
.wb-people-section {
  margin: 24px 20px;
  /* ACT 1 STANDARD: 20px horizontal margins */
  background: var(--grey-100, #F5F5F5);
  border-radius: var(--radius, 12px);
  padding: 14px 16px;
  border: 1px solid var(--grey-300, #D3D3D3);
  box-shadow: -4px 4px 0px 0px #7F00FF;
  /* Purple left and bottom border */
  position: relative;
  /* Above wallpaper */
  z-index: 1;
}

.wb-people-section:first-of-type {
  margin-top: 12px;
}

.wb-people-section:last-of-type {
  margin-bottom: 32px;
}

/* Section Headings */
.wb-people-heading {
  font-size: 20px;
  font-weight: 800;
  color: #1f2937;
  margin: 0 0 8px;
  text-align: center;
  letter-spacing: -0.5px;
}

/* Mobile: Circle creation form heading bottom padding */
#circle-creation-form .wb-people-heading {
  margin-bottom: 20px;
}

.wb-people-explainer {
  font-size: 14px;
  color: #374151;
  font-weight: 400;
  margin: 12px 0 20px;
  text-align: center;
  line-height: 1.5;
}

/* Safety Circle List */
.safety-circle-list {
  margin: 20px 0;
  min-height: 60px;
}

/* Loading State */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #717171;
  font-size: 14px;
  gap: 12px;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #E8E8E8;
  border-top-color: #6A5ACD;
  /* SlateBlue spinner */
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Contact Cards - ACT 1: Nested white containers on grey */
.wb-contact-card {
  background: var(--white, #FFFFFF);
  border-radius: var(--radius, 12px);
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--grey-300, #D3D3D3);
  box-shadow: -2px 2px 0px 0px #8A7ACD;
  /* Lighter purple for nested elements */
  transition: all 0.2s ease;
}

.wb-contact-card:hover {
  background: #FAFAFA;
}

.wb-contact-card:last-child {
  margin-bottom: 0;
}

.wb-contact-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6A5ACD 0%, #8A7ACD 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  flex-shrink: 0;
}

.wb-contact-info {
  flex: 1;
  min-width: 0;
}

.wb-contact-name {
  font-weight: 600;
  font-size: 15px;
  color: #111;
  margin-bottom: 4px;
  display: block;
}

.wb-contact-email {
  font-size: 13px;
  color: #717171;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wb-contact-remove {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #FEE2E2;
  color: #DC2626;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  font-size: 14px;
}

.wb-contact-remove:hover {
  background: #FECACA;
  transform: scale(1.05);
}

/* Action Buttons - ACT 1 Standards */
.wb-people-action-btn {
  width: 100%;
  padding: 14px 20px;
  border-radius: var(--radius, 12px);
  border: 1px solid var(--grey-300, #D3D3D3);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.wb-people-action-btn.primary {
  background: linear-gradient(135deg, #6A5ACD 0%, #8A7ACD 100%);
  color: white;
  box-shadow: none;
}

.wb-people-action-btn.primary:hover {
  background: linear-gradient(135deg, #5A4ABD 0%, #7A6ABD 100%);
  transform: translateY(-2px);
  box-shadow: none;
}

.wb-people-action-btn.secondary {
  background: var(--white, #FFFFFF);
  color: #6A5ACD;
  box-shadow: -2px 2px 0px 0px #6A5ACD;
}

.wb-people-action-btn.secondary:hover {
  background: #F8F7FC;
  transform: translateY(-2px);
  box-shadow: -3px 3px 0px 0px #6A5ACD;
}

/* Invited state - white text on purple background for readability */
.wb-people-action-btn.secondary.invited {
  background: #6A5ACD;
  color: white !important;
  box-shadow: none;
}

.wb-people-action-btn.secondary.invited:hover {
  background: #5B4ABD;
  color: white !important;
  box-shadow: none;
}

.wb-people-action-btn:last-child {
  margin-bottom: 0;
}

/* Small variant for member row buttons */
.wb-people-action-btn.small {
  padding: 7.5px 11px;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: none;
  background: steelblue;
  border-radius: 10px;
}

.wb-people-action-btn.small:hover {
  box-shadow: none;
  background: steelblue;
  transform: translateY(-1px);
}

/* Floating button variant */
.wb-people-action-btn.floating-btn {
  position: relative;
  margin-top: 24px;
  box-shadow: none;
}

.wb-people-action-btn.floating-btn:hover {
  box-shadow: none;
}

/* Form groups */
/* My People drawer - scoped form groups */
#wb-people-panel .form-group {
  margin-bottom: 10.5px;
}

/* Add member button specific styling */
#add-member-btn {
  justify-content: flex-start;
  padding: 8px 16px;
  font-size: 12px;
  margin-top: 0;
  color: #333;
  width: auto;
  display: inline-flex;
  border-radius: 10px;
}

/* Create My Circle button specific styling */
#create-circle-btn {
  padding: 10.5px 20px;
  background: linear-gradient(135deg, #4682B4 0%, #5A9BD4 100%);
  box-shadow: none;
}

#create-circle-btn:hover {
  background: linear-gradient(135deg, #3872A4 0%, #4A8BC4 100%);
  box-shadow: none;
}

/* Join Circle button - matches Create Circle button styling */
#join-circle-btn {
  padding: 10.5px 20px;
  background: linear-gradient(135deg, #4682B4 0%, #5A9BD4 100%);
  box-shadow: none;
}

#join-circle-btn:hover {
  background: linear-gradient(135deg, #3872A4 0%, #4A8BC4 100%);
  box-shadow: none;
}

/* Send Invite Code button - matches Create Circle button styling */
.send-invite-code-btn {
  padding: 10.5px 20px;
  background: linear-gradient(135deg, #4682B4 0%, #5A9BD4 100%) !important;
  box-shadow: none !important;
}

.send-invite-code-btn:hover {
  background: linear-gradient(135deg, #3872A4 0%, #4A8BC4 100%) !important;
  box-shadow: none !important;
}

/* My People drawer - scoped form labels */
#wb-people-panel .form-label {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
}

.wb-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius, 12px);
  border: 2px solid #E5E7EB;
  background: var(--white, #FFFFFF);
  font-size: 14px;
  color: #333;
  transition: all 0.2s ease;
  font-family: 'Nunito', sans-serif;
}

.wb-input:focus {
  outline: none;
  border-color: #6A5ACD;
  box-shadow: 0 0 0 3px rgba(106, 90, 205, 0.1);
}

.wb-input::placeholder {
  color: #999;
  font-weight: 400;
}

/* Member input group (dynamically added) */
.member-input-group {
  margin-bottom: 9px;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Circle dropdown (collapsible sections) */
.circle-dropdown {
  margin-bottom: 16px;
  border-radius: var(--radius, 12px);
  overflow: hidden;
  background: var(--white, #FFFFFF);
  box-shadow: -2px 2px 0px 0px #7F00FF;
  border: 2px solid #7F00FF;
}

.circle-header {
  width: 100%;
  padding: 12px 20px;
  background: var(--grey-100, #F5F5F5);
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
}

.circle-header:hover {
  background: var(--grey-100, #F5F5F5);
}

.circle-name {
  font-size: 16px;
  font-weight: 800;
  color: #333;
  text-align: center;
  flex: 1;
}

.circle-chevron {
  font-size: 16px;
  color: #6A5ACD;
  transition: transform 0.3s ease;
}

.circle-chevron.rotated {
  transform: rotate(180deg);
}

/* Circle members list */
.circle-members {
  padding: 0 16px 16px 16px;
  background: var(--white, #FFFFFF);
}

.member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border: 1.5px solid darkslategrey;
  border-radius: 10px;
  margin-bottom: 12px;
}

.member-row:last-child {
  margin-bottom: 0;
}

/* Fix for button width inside member row */
.member-row .wb-people-action-btn {
  width: auto;
  margin-bottom: 0;
}

.member-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.member-icon {
  font-size: 24px;
  color: #6A5ACD;
}

.member-icon.creator {
  color: #4682B4;
}

/* Member Avatar - Photo or Placeholder */
.member-avatar-container,
.member-avatar-placeholder {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.member-avatar-container.clickable,
.member-avatar-placeholder.clickable {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.member-avatar-container.clickable:hover,
.member-avatar-placeholder.clickable:hover {
  transform: scale(1.05);
}

.member-avatar-container.clickable:active,
.member-avatar-placeholder.clickable:active {
  transform: scale(0.95);
}

.member-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #6A5ACD;
}

.member-avatar-placeholder .member-icon {
  font-size: 40px;
}

.avatar-upload-icon,
.avatar-edit-icon {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: steelblue;
  color: white;
  border: 2px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  pointer-events: none;
  transition: all 0.2s ease;
}

.member-avatar-container.clickable:hover .avatar-edit-icon,
.member-avatar-placeholder.clickable:hover .avatar-upload-icon {
  background: #4682B4;
  transform: scale(1.1);
}

.member-name {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Inline name editing */
.member-name-display {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  transition: color 0.2s ease;
}

.member-name-display:hover {
  color: #667eea;
}

.member-name-edit {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  border: 2px solid #667eea;
  border-radius: 8px;
  padding: 4px 8px;
  background: #fff;
  outline: none;
  max-width: 200px;
}

.member-name-edit:focus {
  border-color: #4682B4;
  box-shadow: 0 0 0 3px rgba(70, 130, 180, 0.1);
}

.creator-badge {
  display: inline-block;
  padding: 7.5px 11px;
  background: steelblue;
  color: white;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 10px;
  text-transform: none;
  letter-spacing: 0.5px;
}

/* Start Journey Button - Featured CTA */
.wb-start-journey-btn {
  width: 100%;
  padding: 18px 20px;
  border-radius: var(--radius, 12px);
  border: 2px solid #6A5ACD;
  background: linear-gradient(135deg, #6A5ACD 0%, #8A7ACD 100%);
  color: white;
  font-weight: 800;
  font-size: 17px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: -4px 4px 0px 0px #4A3A9D;
}

.wb-start-journey-btn:hover {
  background: linear-gradient(135deg, #5A4ABD 0%, #7A6ABD 100%);
  transform: translateY(-2px);
  box-shadow: -5px 5px 0px 0px #4A3A9D;
}

.wb-start-journey-btn i {
  font-size: 20px;
}

/* Desktop: People Panel Side positioning */
@media (min-width: 768px) {
  #wb-people-panel {
    width: 450px;
    left: calc(50% + 250px);
    right: auto;
    transform: translateX(100%);
    /* Off-screen: fully to the right */
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.3);
    border-left: 2px solid #7F00FF;
    border-top-left-radius: 20px;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    /* Smooth ease-out curve */
  }

  #wb-people-panel.open {
    transform: translateX(-50%);
    /* Visible: anchor point - 50% of drawer width */
  }

  #wb-people-panel .drawer-header-image {
    max-width: 533.203125px !important;
    height: 159.9609375px !important;
  }

  #wb-people-panel .drawer-intro-question {
    font-size: 24px !important;
    margin-bottom: 15px !important;
  }

  #wb-people-panel .wb-people-content {
    padding-top: 8px;
  }

  #wb-people-panel .wb-people-section {
    margin-top: 4px;
  }

  #wb-people-panel .wb-people-heading {
    font-size: 20px !important;
    margin-bottom: 28px !important;
  }

  /* Desktop: Specific heading sizes */
  #wb-people-panel #circle-creation-form .wb-people-heading {
    font-size: 20px !important;
  }

  /* Desktop: Form labels */
  #wb-people-panel .form-label {
    font-size: 14px !important;
    padding-top: 12px;
  }

  /* Desktop: Input placeholder text */
  #wb-people-panel .wb-input::placeholder {
    font-size: 14px !important;
  }
}

/* ========================================
   CELEBRATION SCREEN - Gamification Success
   ======================================== */

.celebration-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--white, #FFFFFF);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10005;
  padding: 40px 20px;
}

.celebration-screen.active {
  display: flex;
  animation: celebrationFadeIn 300ms ease-out;
}

.celebration-screen.exiting {
  animation: celebrationFadeOut 300ms ease-in;
}

.celebration-mascot {
  width: 90%;
  max-width: 675px;
  height: auto;
  margin-bottom: 30px;
}

.celebration-message {
  text-align: center;
  max-width: 320px;
  padding: 0 20px;
}

.celebration-title {
  font-size: 29px;
  /* 60% larger than 18px = ~29px */
  font-weight: 800;
  color: #000000;
  line-height: 1.2;
  margin-bottom: 16px;
  /* Line break space */
}

.celebration-subtitle {
  font-size: 20px;
  /* 10% larger than 18px = ~20px */
  font-weight: 800;
  color: #000000;
  line-height: 1.4;
}

@keyframes celebrationFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes celebrationFadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

/* Alerts Content - Scrollable area with header content inside */
.wb-alerts-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  background: transparent;
  /* Allow wallpaper to show through */
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 16px 10px 0 10px;
  position: relative;
  /* For wallpaper positioning */
}

/* Wallpaper Pattern Background - Behind content */
.wb-alerts-content::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('/assets/patterns/hero-wallpaper.svg');
  background-repeat: repeat;
  background-size: 600px 600px;
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

/* Modern Section Cards - Cadet Blue Feature Branding Shadow Highlight */
.wb-notif-section {
  background: var(--grey-100, #F5F5F5);
  margin: 24px 32px;
  border-radius: var(--radius, 12px);
  padding: 32px 28px;
  border: 1px solid var(--grey-300, #D3D3D3);
  box-shadow: -4px 4px 0px 0px #5F9EA0;
  /* Cadet blue left and bottom border */
  position: relative;
  /* Above wallpaper */
  z-index: 1;
}

.wb-notif-section:first-child {
  margin-top: 12px;
}

.wb-notif-section:last-child {
  margin-bottom: 32px;
}

.wb-notif-heading {
  font-size: 20px;
  font-weight: 800;
  color: #1f2937;
  margin: 0 0 28px;
  /* Original 8px + 20px extra */
  text-align: center;
  letter-spacing: -0.5px;
}

.wb-notif-subheading {
  font-size: 16px;
  color: #6b7280;
  font-weight: 400;
  margin: 0 0 32px;
  text-align: center;
  line-height: 1.5;
}

.wb-notif-explainer {
  font-size: 14px;
  color: #374151;
  font-weight: 400;
  margin: 20px 0;
  text-align: center;
  line-height: 1.5;
  background: var(--grey-100, #F5F5F5);
  padding: 16px 20px;
  border-radius: var(--radius, 12px);
  border: 1px solid var(--grey-300, #D3D3D3);
  box-shadow: -2px 2px 0px 0px #7F00FF;
  /* Purple - thinner nested container */
}

/* Modern Form Elements */
.wb-form-group {
  margin-bottom: 24px;
}

.wb-form-label {
  display: block;
  font-weight: 700;
  font-size: var(--text-sm, 0.875rem);
  color: #1f2937;
  margin-bottom: 8px;
  text-align: left;
}

/* Form Inputs - Stylesheet Guide Standards */
.wb-form-input,
.wb-form-select,
input[type="text"]:not(#email-input),
input[type="email"]:not(#email-input),
input[type="number"],
select {
  width: 100%;
  min-height: 40px;
  padding: var(--space-2, 0.5rem) var(--space-3, 0.75rem);
  background: var(--white, #FFFFFF);
  border: 1.5px solid var(--grey-300, #D3D3D3);
  border-radius: var(--radius-md, 8px);
  font-size: 14px;
  font-family: var(--font-system, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
  color: #1f2937;
  /* Dark grey - matches iOS/WhatsApp input text */
  transition: border-color var(--transition-fast, 150ms ease-in-out);
  box-sizing: border-box;
}

.wb-form-input::placeholder {
  color: var(--grey-500, #A9A9A9);
  font-style: normal;
}

/* CRITICAL: iOS + Android Autofill Fix - Make autocomplete visible */
.wb-form-input:-webkit-autofill,
.wb-form-input:-webkit-autofill:hover,
.wb-form-input:-webkit-autofill:focus,
.wb-form-input:-webkit-autofill:active,
input[type="text"]:-webkit-autofill,
input[type="text"]:-webkit-autofill:hover,
input[type="text"]:-webkit-autofill:focus,
input[type="text"]:-webkit-autofill:active,
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-text-fill-color: #1f2937 !important;
  -webkit-box-shadow: 0 0 0 1000px #FFFFFF inset !important;
  box-shadow: 0 0 0 1000px #FFFFFF inset !important;
  background-color: #FFFFFF !important;
  color: #1f2937 !important;
  font-size: inherit !important;
  transition: background-color 5000s ease-in-out 0s !important;
}

/* Focus State - Blue primary with soft glow */
.wb-form-input:focus,
.wb-form-select:focus,
input:focus,
select:focus {
  outline: none;
  border-color: var(--primary, #1E90FF);
  box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.1);
}

/* Modern Toggle Switch */
.wb-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 20px;
  background: #f8fafc;
  border-radius: 16px;
  border: 2px solid #e2e8f0;
}

.wb-toggle-content {
  flex: 1;
  margin-right: 16px;
}

.wb-toggle-label {
  font-weight: 600;
  font-size: 16px;
  color: #1f2937;
  margin: 0 0 4px;
}

.wb-toggle-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
}

.wb-toggle-switch {
  position: relative;
  width: 56px;
  height: 32px;
  background: #e5e7eb;
  border-radius: 16px;
  cursor: pointer;
  transition: background 0.3s ease;
  flex-shrink: 0;
}

.wb-toggle-switch.active {
  background: #10b981;
}

.wb-toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 28px;
  height: 28px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.wb-toggle-switch.active::after {
  transform: translateX(24px);
}

/* Modern Create Zone Button */
/* Button Styles - Stylesheet Guide Standards */
.wb-create-zone-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2, 0.5rem);
  padding: var(--space-2, 0.5rem) var(--space-4, 1rem);
  min-height: 40px;
  border: 2px solid #4682B4;
  border-radius: var(--radius, 12px);
  background: var(--white, #FFFFFF);
  color: #4682B4;
  font-size: var(--text-base, 1rem);
  font-weight: 700;
  font-family: var(--font-system, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
  cursor: pointer;
  transition: all var(--transition-fast, 150ms ease-in-out);
  width: 100%;
  box-sizing: border-box;
  margin-top: 10px;
}

.wb-create-zone-btn:hover {
  opacity: 0.9;
}

.wb-create-zone-btn:active,
.wb-create-zone-btn.selected {
  background: #4682B4;
  color: var(--white, #FFFFFF);
}

.wb-create-zone-btn:disabled {
  background: var(--disabled-bg, #F5F5F5);
  border-color: var(--grey-300, #D3D3D3);
  color: var(--text-disabled, #A9A9A9);
  cursor: not-allowed;
  opacity: 0.6;
}

/* Zone Cards - Purple Feature Branding Shadow Highlight */
.wb-zone-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-3, 0.75rem);
  margin-top: 32px;
}

.wb-zone-card {
  background: var(--white, #FFFFFF);
  border: 1px solid var(--grey-300, #D3D3D3);
  border-radius: var(--radius, 12px);
  padding: var(--space-4, 1rem);
  box-shadow: -4px 4px 0px 0px var(--feature-zones, #8B72BE);
  transition: all var(--transition, 200ms ease-in-out);
}

.wb-zone-card:hover {
  box-shadow: -4px 4px 0px 0px var(--feature-zones, #8B72BE), 0 10px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.wb-zone-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.wb-zone-info {
  flex: 1;
  min-width: 0;
}

.wb-zone-name {
  font-weight: 700;
  font-size: 18px;
  color: #1f2937;
  margin: 0 0 6px;
}

.wb-zone-meta {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.4;
}

.wb-zone-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.wb-zone-btn {
  padding: 8px 16px;
  border: 2px solid;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wb-zone-btn.edit {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #3b82f6;
}

.wb-zone-btn.edit:hover {
  background: #1d4ed8;
  color: #fff;
  transform: translateY(-1px);
}

.wb-zone-btn.delete {
  background: #fef2f2;
  color: #dc2626;
  border-color: #ef4444;
}

.wb-zone-btn.delete:hover {
  background: #dc2626;
  color: #fff;
  transform: translateY(-1px);
}

.wb-zone-btn.mute {
  background: #fef3c7;
  color: #d97706;
  border-color: #f59e0b;
}

.wb-zone-btn.mute:hover {
  background: #d97706;
  color: #fff;
  transform: translateY(-1px);
}

.wb-zone-btn.muted {
  background: #f3f4f6;
  color: #6b7280;
  border-color: #9ca3af;
}

/* Modern Error Messages */
.wb-error-msg {
  color: #dc2626;
  font-size: 14px;
  margin-top: 8px;
  display: none;
  padding: 12px 16px;
  background: #fef2f2;
  border-radius: 12px;
  border-left: 4px solid #dc2626;
}

.wb-error-msg.show {
  display: block;
}

/* Modern Modals */
.wb-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  z-index: 20001;
  backdrop-filter: blur(8px);
}

.wb-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.wb-modal-content {
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  text-align: center;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.wb-modal.open .wb-modal-content {
  transform: translateY(0);
}

.wb-modal-icon {
  font-size: 48px;
  color: #f97316;
  margin-bottom: 16px;
}

.wb-modal-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 16px;
  color: #1f2937;
}

.wb-modal-title.delete {
  color: #dc2626;
}

.wb-modal-message {
  color: #6b7280;
  margin: 0 0 20px;
  line-height: 1.6;
}

.wb-modal-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  text-align: left;
}

.wb-modal-benefits li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(16, 185, 129, 0.05);
  border-radius: 8px;
  margin-bottom: 8px;
  color: #1f2937;
  font-weight: 500;
}

.wb-modal-benefits li i {
  color: #10b981;
  font-size: 16px;
  flex-shrink: 0;
}

.wb-modal-buttons {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.wb-modal-btn {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wb-modal-btn.primary {
  background: #10b981;
  color: #fff;
  border-color: #10b981;
}

.wb-modal-btn.primary:hover {
  background: #059669;
  transform: translateY(-1px);
}

.wb-modal-btn.secondary {
  background: #fff;
  color: #6b7280;
  border-color: #d1d5db;
}

.wb-modal-btn.secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.wb-modal-btn.delete.primary {
  background: #dc2626;
  border-color: #dc2626;
}

.wb-modal-btn.delete.primary:hover {
  background: #b91c1c;
}

/* Logout Modal */
#wb-logout-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  z-index: 20000;
  backdrop-filter: blur(8px);
}

#wb-logout-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.wb-logout-content {
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  max-width: 360px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.wb-drawer-link i {
  color: inherit;
}

.wb-logout-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 20px;
  color: #1f2937;
}

.wb-logout-buttons {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.wb-logout-btn {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid #000;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wb-logout-btn.primary {
  background: #000;
  color: #fff;
}

.wb-logout-btn.primary:hover {
  background: #333;
  transform: translateY(-1px);
}

.wb-logout-btn.secondary {
  background: #fff;
  color: #000;
}

.wb-logout-btn.secondary:hover {
  background: #f5f5f5;
  border-color: #333;
}

/* Notification Settings Modal */
#wb-notification-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  z-index: 20000;
  backdrop-filter: blur(8px);
}

#wb-notification-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.wb-notification-content {
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  max-width: 500px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.wb-notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #e5e7eb;
}

.wb-notification-title {
  font-size: 22px;
  font-weight: 700;
  color: #1f2937;
}

.wb-notification-close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 24px;
  color: #6b7280;
  line-height: 1;
  transition: color .2s ease;
  padding: 0;
}

.wb-notification-close:hover {
  color: #1f2937;
}

.wb-notification-master {
  background: rgba(16, 185, 129, 0.08);
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 24px;
  border: 2px solid #10b981;
}

.wb-notification-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid #e5e7eb;
}

.wb-notification-item:last-child {
  border-bottom: none;
}

.wb-notification-info {
  flex: 1;
  padding-right: 16px;
}

.wb-notification-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 4px;
}

.wb-notification-desc {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}

/* Toggle Switch */
.wb-toggle {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

.wb-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.wb-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  transition: .3s;
  border-radius: 28px;
}

.wb-toggle-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  transition: .3s;
  border-radius: 50%;
}

.wb-toggle input:checked+.wb-toggle-slider {
  background-color: #10b981;
}

.wb-toggle input:checked+.wb-toggle-slider:before {
  transform: translateX(24px);
}

.wb-toggle input:disabled+.wb-toggle-slider {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Visual separators - DEPRECATED: Do not use wb-line-break */
/* ACT 1 STANDARD: Section titles do not need decorative line breaks */

.wb-bold-line-break {
  width: 60%;
  height: 2px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  margin: 40px auto;
  border-radius: 1px;
}

/* === SERVICE WORKER UPDATE TOAST === */
.wb-update-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: white;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  z-index: 10000;
  display: none;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  max-width: 90vw;
}

.wb-update-toast.show {
  display: flex;
}

.wb-update-toast button {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.wb-update-toast button:hover {
  background: #2563eb;
}

/* === SPLASH SCREEN === */


.wb-splash-logo {
  width: 200px;
  height: auto;
  opacity: 0;
  transform: scale(0.95);
  animation: splashFadeIn 1s ease forwards;
}

@keyframes splashFadeIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .wb-footer-nav {
    padding: 4px 0 12px 0;
    height: 80px;

  }

  .wb-footer-nav-icon {
    width: 22px;
    height: 22px;
  }

  .wb-footer-nav-icon svg {
    width: 18px;
    height: 18px;
  }

  .wb-footer-nav-text {
    font-size: 13px;
    white-space: nowrap;
  }

  body {
    padding-bottom: 66px !important;
  }

  .wb-notif-section {
    margin: 20px 16px;
    padding: 24px 20px;
  }

  .wb-alerts-header {
    padding: 16px 20px;
  }

  .wb-alerts-title {
    font-size: 24px;
  }

  .wb-zone-actions {
    flex-direction: column;
    width: 100%;
    margin-top: 12px;
  }

  .wb-zone-btn {
    width: 100%;
    justify-content: center;
  }

  .wb-student-content {
    padding: 16px;
  }

  .wb-student-section {
    padding: 20px 16px;
  }

  .wb-quick-links {
    grid-template-columns: 1fr;
  }

  /* My People container - increase all text by 2px on mobile */
  #wb-people-panel .wb-drawer-title {
    font-size: 26px;
    /* 24px + 2px */
  }

  #wb-people-panel .form-label {
    font-size: 17px;
    /* 15px + 2px */
    padding-top: 12px;
  }

  #wb-people-panel .wb-input {
    font-size: 16px;
    /* 14px + 2px */
  }

  #wb-people-panel .wb-input::placeholder {
    font-size: 16px !important;
    /* 14px + 2px */
  }

  #wb-people-panel .wb-people-action-btn {
    font-size: 17px;
    /* 15px + 2px */
  }

  #wb-people-panel #add-member-btn {
    font-size: 14px;
    /* 12px + 2px */
  }

  #wb-people-panel .circle-name {
    font-size: 18px;
    /* 16px + 2px */
  }

  #wb-people-panel .wb-contact-name {
    font-size: 16px;
    /* 14px + 2px */
  }

  #wb-people-panel .wb-contact-email {
    font-size: 14px;
    /* 12px + 2px */
  }
}

/* Loading states */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  color: #6b7280;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e5e7eb;
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

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

  100% {
    transform: rotate(360deg);
  }
}

/* ========================================
   INCIDENT DRAWER (ACT 1 - Right-to-Left Slide)
   ======================================== */

/* Drawer Panel Structure - Mobile-First */
.wb-incident-modal {
  position: fixed;
  top: 0;
  right: 0;
  width: 100vw;
  height: 100vh;
  background: var(--white, #FFFFFF);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000100;
  /* Above Google Maps (z-index: 1000003) */
  transform: translateX(100%);
  /* Hidden off-screen to the right */
  transition: transform 300ms ease-in-out;
  -webkit-tap-highlight-color: transparent;
}

/* Wallpaper Pattern Background - REMOVED from modal root */

.wb-incident-modal.open {
  transform: translateX(0);
  /* Slide in from right */
}

/* Desktop Optimization - Centered Drawer */
@media (min-width: 768px) {
  .wb-incident-modal {
    max-width: 600px;
    right: 50%;
    transform: translateX(calc(100% + 50vw));
    /* Off-screen right accounting for centering */
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.3);
  }

  .wb-incident-modal.open {
    transform: translateX(50%);
    /* Centered */
  }
}

@media (min-width: 1024px) {
  .wb-incident-modal {
    max-width: 700px;
  }
}

/* Fixed Close Button - Does NOT scroll (ACT 1 Standard) */
.wb-incident-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full, 9999px);
  background: var(--grey-200, #DCDCDC);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast, 150ms ease-in-out);
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 1000101;
  /* Above drawer (z-index: 1000100) */
  font-size: 24px;
  color: var(--grey-700, #696969);
  font-weight: 700;
  line-height: 1;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.wb-incident-close::before {
  content: "‹";
  /* Chevron left, never X (ACT 1 Standard) */
}

/* Help Button - Fixed top-right (mirrors close button) */
.wb-incident-help {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full, 9999px);
  background: var(--grey-200, #DCDCDC);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast, 150ms ease-in-out);
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1000101;
  /* Above drawer (z-index: 1000100) */
  font-size: 20px;
  color: var(--grey-700, #696969);
  font-weight: 700;
  line-height: 1;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.wb-incident-help::before {
  content: "?";
  /* Question mark */
}

/* Hover state - Desktop only */
@media (hover: hover) and (pointer: fine) {

  .wb-incident-close:hover,
  .wb-incident-help:hover {
    background: var(--grey-300, #D3D3D3);
  }
}

/* Help Modal - Feature context explainer (ACT 1.14) */
.wb-incident-help-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: calc(var(--z-drawer, 400) + 2);
  padding: 20px;
}

.wb-incident-help-modal.open {
  display: flex;
}

.wb-incident-help-modal-content {
  background: var(--white, #FFFFFF);
  border-radius: var(--radius, 12px);
  max-width: 320px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  border: 1px solid var(--grey-300, #D3D3D3);
  box-shadow: -4px 4px 0px 0px #5F9EA0, 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  padding: 32px;
}

.wb-incident-help-modal-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary, #708090);
  /* Slate grey */
  margin: 0 0 20px 0;
  text-align: center;
}

.wb-incident-help-modal-body p {
  font-size: 15px;
  line-height: 1.6;
  color: #374151;
  margin: 0 0 16px 0;
}

.wb-incident-help-modal-body p:last-child {
  margin-bottom: 0;
}

/* Desktop text selection allowed */
@media (min-width: 768px) {

  .wb-incident-help-modal-title,
  .wb-incident-help-modal-body p {
    user-select: text;
    -webkit-user-select: text;
  }
}

/* Scrollable Content Area - Contains ALL drawer content */
.wb-incident-modal-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  background: transparent;
  /* Allow wallpaper to show through */
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 16px 10px 0 10px;
  /* 10px breathing room */
  position: relative;
  /* For wallpaper positioning */
}

/* Wallpaper Pattern Background - Behind content */
.wb-incident-modal-content::before {
  content: '';
  position: fixed;
  /* Fixed to viewport - doesn't scroll away */
  inset: 0;
  background-image: url('/assets/patterns/hero-wallpaper.svg');
  background-repeat: repeat;
  background-size: 600px 600px;
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

/* Skeleton Loading States (ACT 1.8) */
.wb-incident-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: var(--radius-md, 8px);
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ========================================
   ADVANCED MAP MARKERS (Life360 Style)
   ======================================== */
.wb-map-marker {
  position: relative;
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  /* Bouncy transition */
  will-change: transform;
  z-index: 1;
  /* Default z-index */
}

.wb-map-marker:hover {
  z-index: 50;
  /* Bring to front on hover */
}

/* Pin Shape */
.wb-map-marker-pin {
  width: 100%;
  height: 100%;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  /* Soft drop shadow */
  border: 2px solid white;
  position: relative;
  z-index: 2;
}

/* Icon Container (Corrects rotation) */
.wb-map-marker-icon {
  width: 24px;
  height: 24px;
  transform: rotate(45deg) scale(0.5);
  /* Start scaled down */
  opacity: 0;
  /* Start hidden */
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  /* Bouncy reveal */
  /* Counter-rotate to keep icon upright */
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.wb-map-marker.selected .wb-map-marker-icon {
  transform: rotate(45deg) scale(1) !important;
  opacity: 1 !important;
}

/* Always show icons for Incidents and Civic markers (User Request) */
.wb-map-marker.incident .wb-map-marker-icon,
.wb-map-marker.civic .wb-map-marker-icon {
  opacity: 1;
  transform: rotate(45deg) scale(1);
}

.wb-map-marker-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* Pulse Animation (for selected state) */
@keyframes markerPulse {
  0% {
    transform: rotate(-45deg) scale(1);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
  }

  /* Blue pulse */
  70% {
    transform: rotate(-45deg) scale(1.1);
    box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
  }

  100% {
    transform: rotate(-45deg) scale(1);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

.wb-map-marker.selected {
  z-index: 100;
  /* transform: scale(1.2); -- REMOVED per user request (no shrinking/growing) */
  /* Removed translateY to prevent "tilt/lift" effect */
}

.wb-map-marker.selected .wb-map-marker-pin {
  animation: markerPulse 1.5s infinite;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Marker Variants (Gradients) */
.wb-map-marker.incident .wb-map-marker-pin {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  /* Red */
}

.wb-map-marker.civic .wb-map-marker-pin {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  /* Amber */
}

.wb-map-marker.group .wb-map-marker-pin {
  background: linear-gradient(135deg, #4682B4, #36648b);
  /* Steel Blue */
}

.wb-map-marker.group-member .wb-map-marker-pin {
  background: linear-gradient(135deg, #10b981, #047857);
  /* Green */
}

.wb-map-marker.group-private .wb-map-marker-pin {
  background: linear-gradient(135deg, #6b7280, #374151);
  /* Grey */
}

.wb-map-marker.zone .wb-map-marker-pin {
  background: linear-gradient(135deg, #22c55e, #15803d);
  /* Green */
}

/* My People Marker (User Request: 50% larger again -> 90px, Avatar center, Purple border) */
.wb-map-marker.my-people {
  width: 90px;
  height: 90px;
}

.wb-map-marker.my-people .wb-map-marker-pin {
  background: #FFFFFF;
  border: 3px solid #7F00FF;
  /* Permanent Purple Border */
}

.wb-map-marker.my-people .wb-map-marker-icon {
  width: 76px;
  /* Maximize inside 90px pin */
  height: 76px;
  opacity: 1 !important;
  transform: rotate(45deg) !important;
}

.wb-map-marker.my-people .wb-map-marker-icon img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* Grey Ghost UI - Location Freshness Indicators (PWA Lifecycle Management) */
/* Live: < 15 mins - Full opacity, normal display */
.wb-map-marker.wb-marker-live {
  opacity: 1;
}

/* Stale: 15 mins - 12 hours - Reduced opacity */
.wb-map-marker.wb-marker-stale {
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

/* Ancient/Ghost: > 12 hours - Grayscale + low opacity */
.wb-map-marker.wb-marker-ghost {
  filter: grayscale(100%);
  opacity: 0.6;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.wb-map-marker.petition .wb-map-marker-pin {
  background: linear-gradient(135deg, #14b8a6, #0f766e);
  /* Teal */
}

.wb-map-marker.petition-success .wb-map-marker-pin {
  background: linear-gradient(135deg, #f59e0b, #b45309);
  /* Gold */
}

/* Person Marker (Avatar Style) */
.wb-map-marker.person {
  width: 44px;
  height: 44px;
}

.wb-map-marker.person .wb-map-marker-pin {
  border-radius: 50%;
  /* Circle */
  transform: none;
  background: linear-gradient(135deg, #a855f7, #7e22ce);
  /* Purple */
  border: 2px solid white;
}

.wb-map-marker.person .wb-map-marker-icon {
  transform: none;
  font-weight: 700;
  font-size: 14px;
}

.wb-incident-skeleton-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: var(--radius-md, 8px);
}

.wb-incident-skeleton-title {
  height: 28px;
  width: 60%;
  margin: 0 auto 30px;
}

/* === Custom Cluster Markers (User Request) === */
.wb-cluster-marker {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.wb-cluster-count {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  /* Pin Shape: Teardrop */
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: white;
  border: 2px solid white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* Counter-rotate text to keep it upright */
.wb-cluster-count span {
  transform: rotate(45deg);
  display: block;
}

/* Stacked Layers Effect */
.wb-cluster-stack-1,
.wb-cluster-stack-2 {
  position: absolute;
  width: 100%;
  height: 100%;
  /* Pin Shape */
  border-radius: 50% 50% 50% 0;
  border: 2px solid white;
  opacity: 0.7;
}

.wb-cluster-stack-1 {
  z-index: 2;
  /* Rotate and offset */
  transform: translate(3px, 3px) rotate(-45deg);
}

.wb-cluster-stack-2 {
  z-index: 1;
  /* Rotate and offset */
  transform: translate(6px, 6px) rotate(-45deg);
  opacity: 0.4;
}

/* Incident Cluster (Red) */
.wb-cluster-marker.incident .wb-cluster-count,
.wb-cluster-marker.incident .wb-cluster-stack-1,
.wb-cluster-marker.incident .wb-cluster-stack-2 {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
}

/* Civic Cluster (Orange) */
.wb-cluster-marker.civic .wb-cluster-count,
.wb-cluster-marker.civic .wb-cluster-stack-1,
.wb-cluster-marker.civic .wb-cluster-stack-2 {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Petition Cluster (Dark Slate Gray - User Request) */
.wb-cluster-marker.petition .wb-cluster-count,
.wb-cluster-marker.petition .wb-cluster-stack-1,
.wb-cluster-marker.petition .wb-cluster-stack-2 {
  background: linear-gradient(135deg, #2F4F4F, #1a2e2e);
}

/* Petition Marker Pin Background */
.wb-map-marker.petition .wb-map-marker-pin {
  background: #2F4F4F !important;
  /* Removed border-color override to show white border */
}

/* Zone Cluster (Cadet Blue - User Request) */
.wb-cluster-marker.zone .wb-cluster-count,
.wb-cluster-marker.zone .wb-cluster-stack-1,
.wb-cluster-marker.zone .wb-cluster-stack-2 {
  background: linear-gradient(135deg, #5F9EA0, #4a7a7d);
}

/* Zone Marker Pin Background */
.wb-map-marker.zone .wb-map-marker-pin {
  background: #5F9EA0 !important;
}

/* Always show icons for Incidents, Civic, Petitions, and Zones (User Request) */
.wb-map-marker.incident .wb-map-marker-icon,
.wb-map-marker.civic .wb-map-marker-icon,
.wb-map-marker.petition .wb-map-marker-icon,
.wb-map-marker.zone .wb-map-marker-icon,
.wb-map-marker.group .wb-map-marker-icon {
  opacity: 1 !important;
  transform: rotate(45deg) scale(1) !important;
}

/* Hover Effect */
.wb-cluster-marker:hover .wb-cluster-count {
  transform: scale(1.1);
  transition: transform 0.2s ease;
}

/* ========== PRODUCTION-GRADE LOCATION FRESHNESS STATES ========== */

/* Fresh Location Pulse Animation (< 1 minute old) */
.pulse-active {
  animation: locationPulse 2s infinite;
}

@keyframes locationPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(127, 0, 255, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(127, 0, 255, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(127, 0, 255, 0);
  }
}

/* Stale Location State (15min - 2hr old) */
.location-stale {
  transition: filter 0.3s ease, opacity 0.3s ease;
}

/* Offline/Very Stale State (> 2hr old) */
.location-offline {
  transition: filter 0.3s ease, opacity 0.3s ease;
}

/* Active Card Highlight (for clicked member cards) */
.active-card {
  background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%) !important;
  border-left: 4px solid #7F00FF !important;
  transform: translateX(2px);
  transition: all 0.2s ease;
}

.wb-incident-skeleton-section {
  background: var(--grey-100, #F5F5F5);
  margin: 24px 20px;
  border-radius: var(--radius, 12px);
  padding: 32px 28px;
  border: 1px solid var(--grey-300, #D3D3D3);
  box-shadow: -4px 4px 0px 0px var(--feature-incidents, #B22222);
  /* Firebrick red for incidents */
}

.wb-incident-skeleton-line {
  height: 16px;
  margin-bottom: 12px;
}

.wb-incident-skeleton-line.short {
  width: 40%;
}

.wb-incident-skeleton-line.medium {
  width: 70%;
}

.wb-incident-skeleton-line.long {
  width: 100%;
}

/* Incident Icon Header - Inside scrollable content */
.wb-incident-header-icon {
  width: 100%;
  max-width: 144px;
  /* 20% larger than 120px */
  height: 144px;
  margin: 0 auto -4px;
  /* Negative margin to pull title container closer */
  display: block;
  position: relative;
  /* Above wallpaper */
  z-index: 1;
}

/* Drawer Title - Signature pointed design */
.wb-incident-title {
  font-size: 22px;
  font-weight: 800;
  color: #FFFFFF;
  /* White text */
  background: #B22222;
  /* Firebrick red background (default/high severity) */
  margin: 0 auto 24px;
  text-align: center;
  letter-spacing: -0.5px;
  padding: 6px 18px;
  width: 75%;
  /* 25% shorter than full width */
  max-width: 75%;
  position: relative;
  border-radius: 8px;
  border-left: 1.5px solid #000000;
  /* Black highlight on left edge */
  border-bottom: 1.5px solid #000000;
  /* Black highlight on bottom edge */
  z-index: 1;
  /* Above wallpaper */
}

/* Arrow pointing down - base style */
.wb-incident-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 12px solid #B22222;
  /* Firebrick red arrow (default) */
}

/* Severity color variations - Must come after base ::after to override */
.wb-incident-title-high {
  background: #B22222;
  /* Firebrick red for high severity */
}

.wb-incident-title-high::after {
  border-top-color: #B22222 !important;
}

.wb-incident-title-medium {
  background: #FFA500;
  /* Orange for medium severity */
}

.wb-incident-title-medium::after {
  border-top-color: #FFA500 !important;
}

.wb-incident-title-low {
  background: #5F9EA0;
  /* Cadet blue for low severity */
}

.wb-incident-title-low::after {
  border-top-color: #5F9EA0 !important;
}

/* Desktop text selection allowed */
@media (min-width: 768px) {
  .wb-incident-title {
    user-select: text;
    -webkit-user-select: text;
  }
}

/* NO HEADER ELEMENT - Title goes directly in scrollable content */
.wb-incident-modal-header {
  display: none;
  /* Remove old header structure */
}

/* Modal Body becomes main content container */
.wb-incident-modal-body {
  padding: 0;
  /* No padding - sections handle their own spacing */
  position: relative;
  /* Above wallpaper */
  z-index: 1;
}

/* Section Containers - Grey on white with shadow highlight (ACT 1) */
.wb-incident-section {
  background: rgba(245, 245, 245, 0.85);
  /* Semi-transparent grey - wallpaper shows through */
  margin: 24px 20px;
  /* 20px left/right for white space visibility */
  border-radius: var(--radius, 12px);
  padding: 32px 28px;
  border: 1px solid var(--grey-300, #D3D3D3);
  box-shadow: -4px 4px 0px 0px var(--feature-incidents, #B22222);
  /* Firebrick red shadow on left and bottom */
  position: relative;
  /* Above wallpaper */
  z-index: 1;
}

/* Info Badge (Inside top-left corner) - Icon only */
.wb-incident-info-badge {
  position: absolute;
  top: 8px;
  /* 35% less than 12px (12 - 4.2 = ~8px) */
  left: 8px;
  /* 35% less than 12px */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.wb-incident-info-badge svg {
  width: 25px;
  /* 20% bigger than 21px */
  height: 25px;
  fill: #B22222;
  /* Firebrick red icon only */
}

.wb-incident-section h4 {
  margin: 0 0 var(--space-3, 12px);
  font-size: var(--text-sm, 0.875rem);
  font-weight: 700;
  color: #1f2937;
  /* Dark for readability */
  text-align: left;
}

/* Desktop text selection */
@media (min-width: 768px) {
  .wb-incident-section h4 {
    user-select: text;
    -webkit-user-select: text;
  }
}

/* Author Attribution Row - NO border lines (ACT 1) */
.wb-incident-author-row {
  display: flex;
  align-items: center;
  gap: var(--space-3, 12px);
  padding-bottom: var(--space-4, 16px);
  margin-bottom: var(--space-4, 16px);
}

.wb-incident-author-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full, 9999px);
  object-fit: cover;
  flex-shrink: 0;
}

.wb-incident-author-info {
  flex: 1;
}

.wb-incident-author-name {
  font-size: var(--text-sm, 0.875rem);
  font-weight: 600;
  color: var(--grey-900, #708090);
  margin-bottom: 2px;
}

.wb-incident-author-time {
  font-size: var(--text-xs, 0.75rem);
  color: var(--grey-500, #A9A9A9);
}

/* Location Row */
.wb-incident-location-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3, 12px);
  margin-bottom: var(--space-3, 12px);
}

.wb-incident-location {
  font-size: var(--text-sm, 0.875rem);
  color: var(--grey-700, #696969);
  font-weight: 600;
  flex: 1;
}

.wb-modal-share-btn {
  background: var(--white, #FFFFFF);
  color: var(--primary, #1E90FF);
  border: 2px solid var(--primary, #1E90FF);
  border-radius: var(--radius-md, 8px);
  padding: var(--space-1, 4px) var(--space-2, 8px);
  cursor: pointer;
  font-size: var(--text-xs, 0.75rem);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1, 4px);
  transition: all var(--transition-fast, 150ms ease-in-out);
  min-height: 32px;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.wb-modal-share-btn:active {
  background: var(--primary, #1E90FF);
  color: var(--white, #FFFFFF);
}

/* Desktop hover only */
@media (hover: hover) and (pointer: fine) {
  .wb-modal-share-btn:hover {
    background: var(--primary-light, #B0E0E6);
    border-color: var(--primary-hover, #4169E1);
    color: var(--primary-hover, #4169E1);
  }
}

/* Description - Priority #1 Content */
.wb-incident-description {
  font-size: 15px;
  /* Equal to meta lines */
  line-height: 1.5;
  color: #1f2937;
  /* Darker for emphasis */
  font-weight: 500;
  /* Reduced by 100 (was 600) for subtler boldness */
  margin-top: 3px;
  /* Move down 3px from icon */
  margin-bottom: 10px;
  /* Reduced by half (was 20px) */
  padding: 12px 18px;
  /* Equal padding left and right (18px) */
  background: #FFFFFF;
  /* White container */
  border-radius: 8px;
  border: none;
}

/* Context Metadata Container */
.wb-incident-metadata {
  display: flex;
  flex-direction: column;
  gap: 6px;
  /* Reduced by half (was 12px) */
  padding-top: 6px;
  /* Reduced by half (was 12px) */
  /* Removed border-top separator line */
}

/* Individual Metadata Rows (Who, When, Where) */
.wb-incident-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  /* Equal to description (was 16px) */
  color: #4a4a4a;
  /* Darker grey (was #696969) */
  min-height: 44px;
  /* Touch target height */
}

.wb-incident-meta-row i {
  width: 16px;
  text-align: center;
  color: #B22222;
  /* Firebrick red icons */
  flex-shrink: 0;
}

/* Author row - clickable link */
.wb-incident-author-link {
  cursor: pointer;
  transition: background-color 150ms ease-in-out;
  border-radius: 6px;
  padding: 0 8px;
  margin: 0 -8px;
  /* Negative margin to maintain alignment */
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  width: fit-content;
  /* Compact around content instead of full width */
}

.wb-incident-author-link:active {
  background-color: rgba(178, 34, 34, 0.08);
  /* Light red tint on tap */
}

/* Desktop hover */
@media (hover: hover) and (pointer: fine) {
  .wb-incident-author-link:hover {
    background-color: rgba(178, 34, 34, 0.05);
  }
}

/* User chevron icon - simple chevron only */
.wb-user-chevron {
  color: #B22222 !important;
  /* Firebrick red */
  font-size: 16px;
  /* Same height as user icon area */
  margin-left: 10px;
  /* Same gap as between icon and name */
  opacity: 1;
  /* Full opacity */
  width: auto !important;
  /* Override fixed width */
}

/* Location icon adjustment */
.wb-incident-meta-row .fa-location-dot {
  font-size: 20px;
  /* Larger icon */
  margin-top: -5px;
  /* Move up 5px total (was -2px, now -2-3 = -5px) */
}

.wb-incident-meta-row span {
  flex: 1;
}

/* Image Badge (Inside top-left corner) - Icon only */
.wb-incident-image-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.wb-incident-image-badge svg {
  width: 25px;
  height: 25px;
  fill: #B22222;
  /* Firebrick red icon */
}

/* Image Section */
.wb-incident-image-section {
  border: none;
  border-radius: 0;
  /* No container styling */
  padding: 0;
  /* No padding - just thumbnail */
  background: transparent;
  /* No white container */
  text-align: center;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.wb-incident-image {
  max-width: 25%;
  /* 75% smaller (was 100%) */
  height: auto;
  border-radius: var(--radius-md, 8px);
}

.wb-incident-image.blurred {
  filter: blur(8px);
}

.wb-no-image {
  color: var(--grey-500, #A9A9A9);
  font-style: italic;
  font-size: var(--text-sm, 0.875rem);
}

/* Toast Action Button (for upgrade toasts) */
.toast-action-btn {
  background: #B22222;
  /* Firebrick red */
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-left: 10px;
  transition: background-color 150ms ease-in-out;
  -webkit-tap-highlight-color: transparent;
}

.toast-action-btn:active {
  background: #8B0000;
  /* Darker on tap */
}

/* Toast Notifications */
#toastContainer {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  width: 90%;
  max-width: 400px;
}

.toast {
  background: rgba(30, 30, 30, 0.95);
  color: white;
  padding: 12px 16px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 14px;
  font-weight: 500;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: auto;
}

.toast-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2.5;
}

/* Toast Variants */
.toast.success .toast-icon {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

.toast.error .toast-icon {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.toast.info .toast-icon {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.wb-modal-image-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md, 8px);
  font-size: var(--text-sm, 0.875rem);
  font-weight: 600;
  color: var(--grey-700, #696969);
}

/* Comments */
.wb-comments-feed {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 8px;
  /* ACT 1: 8px radius */
  background: #fafafa;
  margin-bottom: 16px;
}

.wb-comment-item {
  padding: 10px;
  border-bottom: 1px solid #e9ecef;
  font-size: 13px;
}

.wb-comment-item:last-child {
  border-bottom: none;
}

.wb-comment-author {
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wb-comment-time {
  font-size: 11px;
  color: #999;
  font-weight: 400;
}

.wb-comment-text {
  color: #555;
  font-style: italic;
  line-height: 1.4;
}

.wb-comments-empty {
  padding: 16px;
  text-align: center;
  color: #999;
  font-size: 13px;
}

.wb-loading {
  text-align: center;
  padding: 20px;
  color: #666;
}

/* Comment Options - LEGACY (see TECHDEBT.md) */
.wb-comment-options {
  display: grid;
  gap: 8px;
}

.wb-comment-option {
  background: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 13px;
  text-align: left;
  font-style: italic;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

/* Desktop hover only */
@media (hover: hover) and (pointer: fine) {
  .wb-comment-option:hover {
    background: #e9ecef;
  }
}

.wb-comment-option.selected {
  background: var(--blue, #007bff);
  color: white;
  border-color: var(--blue, #007bff);
}

/* Voting */
.wb-voting-header {
  margin-bottom: 16px;
}

.wb-voting-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.wb-voting-title {
  font-size: 14px;
  font-weight: bold;
  color: #333;
  margin: 0;
}

.wb-voting-section {
  display: flex;
  gap: 16px;
  align-items: center;
}

.wb-thumb-btn {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  min-width: 60px;
  min-height: 40px;
  /* ACT 1: Touch target minimum */
  justify-content: center;
  background: #f8f9fa;
  color: #333;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

/* Desktop hover only - LEGACY (see TECHDEBT.md) */
@media (hover: hover) and (pointer: fine) {
  .wb-thumb-btn:hover {
    background: #e9ecef;
  }
}

.wb-thumb-btn.active.up {
  background: #d4edda;
  border-color: #28a745;
  color: #28a745;
}

.wb-thumb-btn.active.down {
  background: #f8d7da;
  border-color: #dc3545;
  color: #dc3545;
}

.wb-thumb-btn i {
  font-size: 12px;
}

/* Ecosystem Actions Panel - Same as Containers 1 & 2 */
.wb-ecosystem-panel {
  background: var(--grey-100, #F5F5F5);
  border: 1px solid var(--grey-300, #D3D3D3);
  border-radius: var(--radius, 12px);
  padding: var(--space-4, 16px);
}

/* Action Badge (Inside top-left corner) - Icon only */
.wb-incident-action-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.wb-incident-action-badge svg {
  width: 25px;
  height: 25px;
  fill: #B22222;
  /* Firebrick red icon */
  stroke: #B22222;
  /* Firebrick red stroke */
  stroke-width: 0.25px;
  /* Thicker line appearance */
}

.wb-ecosystem-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2, 8px);
  margin-top: 22px;
  /* 12px + 10px to clear top-left icon */
}

.wb-ecosystem-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 12px 16px;
  border: 2px solid;
  border-radius: var(--radius, 12px);
  background: var(--white, #FFFFFF);
  cursor: pointer;
  transition: all var(--transition-fast, 150ms ease-in-out);
  font-size: 0.825rem;
  /* 0.75rem + 10% = 0.825rem */
  font-weight: 700;
  text-align: left;
  min-height: 44px;
  max-height: 44px;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.wb-ecosystem-btn i {
  font-size: 16px;
  /* 20px - 20% = 16px */
}

.wb-ecosystem-btn:active {
  transform: scale(0.98);
}

/* Desktop hover only */
@media (hover: hover) and (pointer: fine) {
  .wb-ecosystem-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow, 0 4px 6px rgba(0, 0, 0, 0.1));
  }
}

/* Ecosystem button variants */
/* Ownership Action Buttons (first in Take Action panel) */
.wb-btn-delete {
  border-color: var(--danger, #B22222);
  color: var(--danger, #B22222);
  font-weight: 700;
}

.wb-btn-resolve {
  border-color: var(--success, #3CB371);
  color: var(--success, #3CB371);
  font-weight: 700;
}

.wb-btn-resolve:disabled {
  border-color: var(--grey-500, #A9A9A9);
  color: var(--grey-500, #A9A9A9);
  cursor: not-allowed;
  opacity: 0.6;
}

/* Ecosystem Flow Buttons */
.wb-btn-share {
  border-color: #4682B4;
  color: #4682B4;
}

.wb-btn-council {
  border-color: #4682B4;
  color: #4682B4;
}

.wb-btn-group {
  border-color: #4682B4;
  color: #4682B4;
}

.wb-btn-forum {
  border-color: #4682B4;
  color: #4682B4;
}

.wb-btn-close {
  border-color: #808080;
  color: #808080;
}

.wb-btn-zone {
  border-color: #4682B4;
  color: #4682B4;
}

/* Desktop hover states only - NO hover on touch devices */
@media (hover: hover) and (pointer: fine) {
  .wb-btn-delete:hover {
    background: var(--danger-light, #FFA07A);
    border-color: var(--danger-hover, #B22222);
    color: var(--danger-hover, #B22222);
  }

  .wb-btn-resolve:hover {
    background: var(--success-light, #98FB98);
    border-color: var(--success-hover, #2E8B57);
    color: var(--success-hover, #2E8B57);
  }

  .wb-btn-share:hover {
    background: rgba(70, 130, 180, 0.08);
    border-color: #4682B4;
    color: #4682B4;
  }

  .wb-btn-council:hover {
    background: rgba(70, 130, 180, 0.08);
    border-color: #4682B4;
    color: #4682B4;
  }

  .wb-btn-group:hover {
    background: rgba(70, 130, 180, 0.08);
    border-color: #4682B4;
    color: #4682B4;
  }

  .wb-btn-forum:hover {
    background: rgba(70, 130, 180, 0.08);
    border-color: #4682B4;
    color: #4682B4;
  }

  .wb-btn-close:hover {
    background: rgba(128, 128, 128, 0.08);
    border-color: #808080;
    color: #808080;
  }

  .wb-btn-zone:hover {
    background: rgba(70, 130, 180, 0.08);
    border-color: #4682B4;
    color: #4682B4;
  }
}

/* Smart Context Prompt */
.wb-context-prompt {
  background: linear-gradient(135deg, #fffbf0 0%, #fff5e6 100%);
  border: 2px solid #ffa500;
  border-radius: 8px;
  padding: 16px;
}

.wb-context-prompt-content {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.wb-context-prompt-content i {
  font-size: 24px;
  color: #ffa500;
  flex-shrink: 0;
}

.wb-context-prompt-text strong {
  display: block;
  font-size: 14px;
  color: #ff8c00;
  margin-bottom: 4px;
}

.wb-context-prompt-text p {
  font-size: 13px;
  color: #666;
  margin: 0;
  line-height: 1.4;
}

.wb-context-prompt-actions {
  display: flex;
  gap: 8px;
}

.wb-context-action-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 12px;
  /* ACT 1: 12px radius for primary buttons */
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #ffa500;
  color: white;
  min-height: 40px;
  /* ACT 1: Touch target minimum */
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.wb-context-action-btn.wb-secondary {
  background: white;
  color: #ffa500;
  border: 2px solid #ffa500;
}

/* Desktop hover only - LEGACY (see TECHDEBT.md) */
@media (hover: hover) and (pointer: fine) {
  .wb-context-action-btn:hover {
    background: #ff8c00;
    transform: translateY(-1px);
  }

  .wb-context-action-btn.wb-secondary:hover {
    background: #fffbf0;
  }
}

/* Mark Resolved Button */
.wb-mark-resolved-btn {
  background: #dc3545;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 12px;
  /* ACT 1: 12px radius for primary buttons */
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.wb-mark-resolved-btn:hover:not(:disabled) {
  background: #c82333;
}

.wb-mark-resolved-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

.wb-mark-resolved-hint {
  font-size: 12px;
  color: #666;
  margin-top: 8px;
  line-height: 1.4;
  font-style: italic;
  text-align: center;
}

/* Delete My Incident Button (Owner Only) */
.wb-delete-incident-btn {
  background: #ef4444;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 12px;
  /* ACT 1: 12px radius for primary buttons */
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.wb-delete-incident-btn:hover {
  background: #dc2626;
  transform: scale(1.02);
}

.wb-delete-incident-btn:active {
  transform: scale(0.98);
}

.wb-delete-incident-hint {
  font-size: 12px;
  color: #666;
  margin-top: 8px;
  line-height: 1.4;
  font-style: italic;
  text-align: center;
}

/* Incident Modal Footer (Auto-delete Info) */
/* Footer Info Box - Nested style like drawer pattern */
.wb-incident-footer {
  background: var(--grey-100, #F5F5F5);
  margin: 20px 20px 40px;
  /* Extra bottom margin for drawer spacing */
  padding: var(--space-4, 16px) var(--space-5, 20px);
  border-radius: var(--radius, 12px);
  border: 1px solid var(--grey-300, #D3D3D3);
  box-shadow: -2px 2px 0px 0px #5F9EA0;
  /* Thinner green shadow - nested hierarchy */
  display: flex;
  align-items: center;
  gap: var(--space-2, 8px);
  font-size: var(--text-sm, 0.875rem);
  color: #374151;
  line-height: var(--leading-normal, 1.5);
  text-align: center;
}

.wb-incident-footer i {
  color: var(--info, #4682B4);
  font-size: var(--text-base, 1rem);
  flex-shrink: 0;
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .wb-ecosystem-actions {
    grid-template-columns: 1fr 1fr;
    /* Keep 2 columns on mobile */
  }

  .wb-ecosystem-btn {
    flex-direction: row;
    /* Keep horizontal layout */
    justify-content: flex-start;
    text-align: left;
    min-height: 44px;
    max-height: 44px;
  }

  .wb-ecosystem-btn i {
    font-size: 14.4px;
    /* 18px - 20% = 14.4px */
  }

  .wb-context-prompt-actions {
    flex-direction: column;
  }
}

/* ========================================
   CIVIC REPORT MODAL STYLES (Phase 4.1)
   ======================================== */

.wb-civic-meta-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.wb-civic-category,
.wb-civic-authority {
  flex: 1;
  min-width: 200px;
}

.wb-civic-label {
  font-weight: 600;
  color: #666;
  margin-right: 8px;
}

.wb-civic-category span:last-child,
.wb-civic-authority span:last-child {
  color: #333;
}

/* Petition button styling */
.wb-btn-petition {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.wb-btn-petition:hover {
  background: linear-gradient(135deg, #5568d3 0%, #66428e 100%);
  transform: translateY(-2px);
}

/* Map button styling */
.wb-btn-map {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.wb-btn-map:hover {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  transform: translateY(-2px);
}

/* ========================================
   GROUPS: PENDING JOIN REQUESTS (Phase 6)
   ======================================== */

/* Noticeboard Actions Section - ACT 1: Grey container on white */
.wb-noticeboard-actions-section {
  margin: 20px;
  /* ACT 1 STANDARD: 20px margins */
  padding: 16px;
  background: #F5F5F5;
  /* ACT 1: Grey container */
  border-radius: 12px;
  /* ACT 1: 12px radius for containers */
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Add Post Button - Primary action */
.wb-add-post-btn {
  flex: 1;
  min-width: 180px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  /* ACT 1: 8px for buttons */
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  font-size: 15px;
}

.wb-add-post-btn:hover {
  background: linear-gradient(135deg, #5568d3 0%, #653a8b 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.wb-add-post-btn i {
  font-size: 16px;
}

.wb-pending-requests-btn {
  flex: 1;
  min-width: 180px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.wb-pending-requests-btn:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.wb-pending-requests-btn i {
  font-size: 18px;
}

.wb-pending-requests-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wb-pending-request-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.wb-pending-request-item:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.wb-pending-request-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.wb-pending-request-info i {
  font-size: 32px;
  color: #6b7280;
}

.wb-pending-request-name {
  font-weight: 600;
  color: #111827;
  font-size: 15px;
}

.wb-pending-request-date {
  font-size: 13px;
  color: #6b7280;
  margin-top: 4px;
}

.wb-pending-request-actions {
  display: flex;
  gap: 8px;
}

.wb-group-btn-success,
.wb-group-btn-danger {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  /* ACT 1: 8px radius for small buttons */
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  font-size: 14px;
}

.wb-group-btn-success {
  background: #22c55e;
  color: white;
}

.wb-group-btn-success:hover {
  background: #16a34a;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.wb-group-btn-danger {
  background: #ef4444;
  color: white;
}

.wb-group-btn-danger:hover {
  background: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

@media (max-width: 600px) {
  .wb-pending-request-item {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .wb-pending-request-actions {
    width: 100%;
  }

  .wb-group-btn-success,
  .wb-group-btn-danger {
    flex: 1;
    justify-content: center;
  }
}

/* ========================================
   NOTICEBOARD POSTS - REDDIT-LITE STYLE
   ======================================== */

/* Posts Container */
#wb-posts-container {
  margin: 0 20px 20px 20px;
  /* ACT 1: 20px margins */
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Loading State */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #717171;
  font-size: 14px;
  gap: 12px;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #E8E8E8;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #717171;
}

.empty-state i {
  font-size: 48px;
  color: #D3D3D3;
  margin-bottom: 16px;
  display: block;
}

.empty-state p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}

/* Post Card - Reddit-lite style */
.wb-post-card {
  background: #F5F5F5;
  /* ACT 1: Grey container */
  border-radius: 12px;
  /* ACT 1: 12px radius */
  padding: 16px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.wb-post-card:hover {
  background: #EFEFEF;
}

/* Post Header - Author info */
.wb-post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.wb-post-author-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
  color: white;
}

.wb-post-author-info {
  flex: 1;
  min-width: 0;
}

.wb-post-author-name {
  font-weight: 600;
  font-size: 14px;
  color: #111;
  margin: 0;
}

.wb-post-timestamp {
  font-size: 12px;
  color: #717171;
  margin-top: 2px;
}

/* Post Content */
.wb-post-content {
  margin-bottom: 12px;
  font-size: 15px;
  line-height: 1.5;
  color: #222;
  word-wrap: break-word;
  white-space: pre-wrap;
}

/* Post Image */
.wb-post-image {
  width: 100%;
  max-width: 100%;
  border-radius: 8px;
  margin-bottom: 12px;
  display: block;
}

/* Post Footer - Interactions */
.wb-post-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 8px;
  border-top: 1px solid #E8E8E8;
}

.wb-post-vote-section,
.wb-post-comment-section {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #717171;
  cursor: pointer;
  transition: color 0.2s ease;
}

.wb-post-vote-section:hover,
.wb-post-comment-section:hover {
  color: #111;
}

.wb-post-vote-section i,
.wb-post-comment-section i {
  font-size: 16px;
}

/* Vote buttons */
.wb-vote-btn {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #717171;
  transition: all 0.2s ease;
  font-size: 18px;
  line-height: 1;
}

.wb-vote-btn:hover {
  color: #111;
}

.wb-vote-btn.voted-up {
  color: #667eea;
}

.wb-vote-btn.voted-down {
  color: #ef4444;
}

.wb-vote-score {
  font-weight: 600;
  min-width: 28px;
  text-align: center;
  font-size: 14px;
  color: #111;
}

/* Comment count badge */
.wb-comment-count {
  font-weight: 600;
  color: #111;
}

/* Pin badge */
.wb-post-pinned-badge {
  background: #fef3c7;
  color: #92400e;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.wb-post-pinned-badge i {
  font-size: 12px;
}

/* ========================================
   CIVIC REPORT MODAL OVERRIDES
   Override incident styles with civic orange
   ======================================== */

/* Civic Report - Orange skeleton shadows */
#wbCivicReportModal .wb-incident-skeleton-section {
  box-shadow: -4px 4px 0px 0px #F28C28;
  /* Orange for civic */
}

/* Civic Report - Orange title background */
#wbCivicReportModal .wb-incident-title {
  background: #F28C28;
  /* Orange background */
}

/* Civic Report - Orange title arrow */
#wbCivicReportModal .wb-incident-title::after {
  border-top-color: #F28C28;
  /* Orange arrow */
}

/* Civic Report - Orange container shadows */
#wbCivicReportModal .wb-incident-section {
  box-shadow: -4px 4px 0px 0px #F28C28;
  /* Orange shadow */
}

/* Civic Report - Orange info badge SVG */
#wbCivicReportModal .wb-incident-info-badge svg {
  fill: #F28C28;
  /* Orange icon */
}

/* Civic Report - Orange metadata icons */
#wbCivicReportModal .wb-incident-meta-row i {
  color: #F28C28;
  /* Orange icons */
}

/* Civic Report - Orange user chevron */
#wbCivicReportModal .wb-user-chevron {
  color: #F28C28 !important;
  /* Orange chevron */
}

/* Civic Report - Orange image badge SVG */
#wbCivicReportModal .wb-incident-image-badge svg {
  fill: #F28C28;
  /* Orange icon */
}

/* Civic Report - Orange action badge SVG */
#wbCivicReportModal .wb-incident-action-badge svg {
  fill: #F28C28;
  /* Orange icon */
  stroke: #F28C28;
  /* Orange stroke */
}

/* Civic Report - Steel blue ecosystem buttons (all buttons unified) */
#wbCivicReportModal .wb-ecosystem-btn {
  background: #4682B4 !important;
  /* Steel blue background */
  border: 2px solid #4682B4 !important;
  /* Steel blue border */
  color: #FFFFFF !important;
  /* White text */
}

#wbCivicReportModal .wb-ecosystem-btn:hover {
  background: #3A7A8F !important;
  /* Darker steel blue on hover */
  border-color: #3A7A8F !important;
  color: #FFFFFF !important;
}

/* Civic Report - Red delete button (same style, red color) */
#wbCivicReportModal .wb-btn-delete {
  background: #ef4444 !important;
  /* Red background */
  border: 2px solid #ef4444 !important;
  /* Red border */
  color: #FFFFFF !important;
  /* White text */
}

#wbCivicReportModal .wb-btn-delete:hover {
  background: #dc2626 !important;
  /* Darker red on hover */
  border-color: #dc2626 !important;
  color: #FFFFFF !important;
}

/* ========================================
   PETITION MODAL OVERRIDES
   Override incident styles with petition gold
   ======================================== */

/* Petition - Grey skeleton shadows */
#wbPetitionModal .wb-incident-skeleton-section {
  box-shadow: -4px 4px 0px 0px #808080;
  /* Grey for petition */
}

/* Petition - Grey title background */
#wbPetitionModal .wb-incident-title {
  background: #808080;
  /* Grey background */
  color: #FFFFFF;
  /* White text for contrast on grey */
}

/* Petition - Hide title arrow */
#wbPetitionModal .wb-incident-title::after {
  display: none;
  /* Remove down-facing triangle */
}

/* Petition - Grey container shadows with bespoke radius */
#wbPetitionModal .wb-incident-section {
  box-shadow: -4px 4px 0px 0px #808080;
  /* Grey shadow */
  border-radius: 6px 12px 6px 12px;
  /* Bespoke border radius (Act 1) */
  padding-top: 24px;
  /* Reduced by 25% from 32px */
}

/* Petition - Grey info badge SVG */
#wbPetitionModal .wb-incident-info-badge svg {
  fill: #808080;
  /* Grey icon */
}

/* Petition - Grey metadata icons */
#wbPetitionModal .wb-incident-meta-row i {
  color: #808080;
  /* Grey icons */
}

/* Petition - Grey user chevron */
#wbPetitionModal .wb-user-chevron {
  color: #808080 !important;
  /* Grey chevron */
}

/* Petition - Grey image badge SVG */
#wbPetitionModal .wb-incident-image-badge svg {
  fill: #808080;
  /* Grey icon */
}

/* Petition - Grey action badge SVG */
#wbPetitionModal .wb-incident-action-badge svg {
  fill: #808080;
  /* Grey icon */
  stroke: #808080;
  /* Grey stroke */
}

/* Petition - Steel blue ecosystem buttons (all buttons unified) */
#wbPetitionModal .wb-ecosystem-btn {
  background: #4682B4 !important;
  /* Steel blue background */
  border: 2px solid #4682B4 !important;
  /* Steel blue border */
  color: #FFFFFF !important;
  /* White text */
}

#wbPetitionModal .wb-ecosystem-btn:hover {
  background: #3A7A8F !important;
  /* Darker steel blue on hover */
  border-color: #3A7A8F !important;
  color: #FFFFFF !important;
}

/* Petition - Red delete button (same style, red color) */
#wbPetitionModal .wb-btn-delete {
  background: #ef4444 !important;
  /* Red background */
  border: 2px solid #ef4444 !important;
  /* Red border */
  color: #FFFFFF !important;
  /* White text */
}

#wbPetitionModal .wb-btn-delete:hover {
  background: #dc2626 !important;
  /* Darker red on hover */
  border-color: #dc2626 !important;
  color: #FFFFFF !important;
}

/* === DESKTOP SCALING - 50% LARGER === */
/* All UI elements scale 1.5x on desktop (≥768px) - Map excluded */
@media (min-width: 768px) {

  /* Header */
  header {
    padding: 9px 12px 0;
    margin-bottom: 22px;
  }

  .wb-logo img {
    max-width: 195px;
  }

  #backBtn,
  #shareBtn,
  .menu-button {
    width: 48px;
    height: 48px;
    padding: 7px;
    border-radius: 9px;
    border: 3px solid #000;
  }

  #backBtn svg,
  #shareBtn svg {
    width: 24px;
    height: 24px;
  }

  .menu-button {
    gap: 6px;
  }

  .menu-button span {
    height: 3px;
    border-radius: 3px;
  }

  /* Drawer */
  #wb-drawer {
    width: min(65vw, 960px);
    box-shadow: -24px 0 48px rgba(0, 0, 0, .15);
  }

  .wb-d-head {
    padding: 24px 30px;
  }

  .wb-d-title {
    font-weight: 800;
    font-size: 24px;
    letter-spacing: .3px;
  }

  .wb-d-main,
  .wb-d-footer {
    padding: 24px 4px;
  }

  .wb-d-footer {
    padding-bottom: 24px;
    padding-top: 12px;
  }

  /* Menu items */
  .wb-menu-item {
    gap: 18px;
    padding: 15px 18px;
    font-size: 24px;
  }

  .wb-menu-icon {
    width: 29px;
    height: 29px;
    flex: 0 0 29px;
  }

  .wb-menu-icon svg {
    width: 29px;
    height: 29px;
  }

  .wb-menu-icon i {
    font-size: 29px;
  }

  .wb-menu-separator {
    height: 1.5px;
    margin: 12px 24px;
  }

  #m-privacy::before {
    height: 3px;
    margin: 30px 0 30px 0;
  }

  #m-privacy,
  #m-terms,
  #m-logout {
    font-size: 21px !important;
    margin-top: 6px;
    padding: 12px 18px !important;
    line-height: 1.65 !important;
  }

  #m-privacy .wb-menu-icon,
  #m-terms .wb-menu-icon,
  #m-logout .wb-menu-icon {
    width: 21px;
    height: 21px;
    flex: 0 0 21px;
    margin-right: 12px;
    transform: translateY(4px);
  }

  #m-privacy .wb-menu-icon svg,
  #m-terms .wb-menu-icon svg,
  #m-logout .wb-menu-icon svg {
    width: 21px;
    height: 21px;
  }

  #m-privacy .wb-menu-icon i,
  #m-terms .wb-menu-icon i,
  #m-logout .wb-menu-icon i {
    font-size: 21px;
  }

  /* Footer Navigation */
  /* Footer Navigation (Left Sidebar on Desktop) */
  .wb-footer-nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 8vw;
    height: 100vh;
    flex-direction: column;
    justify-content: flex-start;
    padding: 20px 0;
    border-top: none;
    border-right: none;
    /* Removed stark border */

    /* Glassmorphism Styles */
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    /* Combined Shadow: Drop shadow + Mirrored Inset Gradient (Right side, 4px offset, 7px blur) */
    box-shadow:
      3px 0 12px rgba(0, 0, 0, 0.1),
      inset -4px 0 7px -1px rgba(0, 0, 0, 0.12);

    /* Rounded Corners (Top-Right, Bottom-Right) */
    border-radius: 0 16px 16px 0;
    padding-top: 36px;
    /* Extra padding for top corner */
  }

  .wb-footer-nav-item {
    padding: 12px 6px;
    border-radius: 9px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 12px;
  }

  .wb-footer-nav-icon {
    width: 23px;
    height: 23px;
    margin-bottom: 6px;
  }

  .wb-footer-nav-icon svg {
    width: 23px;
    height: 23px;
    stroke-width: 2px;
  }

  .wb-footer-nav-icon img {
    width: 23px;
    height: 23px;
  }

  .wb-footer-nav-icon i {
    font-size: 23px;
  }

  .wb-footer-nav-text {
    font-size: 13px;
    /* Reduced from 14px to 13px */
    line-height: 1.4;
    text-align: center;
    color: #111;
    /* Black text */
  }

  /* Text Visibility Control */
  .wb-footer-nav-text.mobile-text {
    display: none !important;
  }

  .wb-footer-nav-text.desktop-text {
    display: block !important;
  }

  /* Hover Effects - Glassmorphism + Specific Colors */
  .wb-footer-nav-item {
    transition: all 0.2s ease;
    width: calc(100% - 12px) !important;
    /* Explicitly 12px narrower */
    margin: 0 auto !important;
    /* Center the item in the container */
  }

  /* Zones: Cadet Blue */
  #footer-alert-zones:hover {
    background: rgba(95, 158, 160, 0.15);
    /* Cadet Blue low opacity */
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(95, 158, 160, 0.1);
  }

  /* People: Purple */
  #footer-people:hover {
    background: rgba(128, 0, 128, 0.1);
    /* Purple low opacity */
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(128, 0, 128, 0.1);
  }

  /* Petitions: Dim Gray */
  #footer-petitions:hover {
    background: rgba(105, 105, 105, 0.1);
    /* Dim Gray low opacity */
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(105, 105, 105, 0.1);
  }

  /* Groups: Steel Blue */
  #footer-groups:hover {
    background: rgba(70, 130, 180, 0.15);
    /* Steel Blue low opacity */
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(70, 130, 180, 0.1);
  }

  /* Posts: Firebrick */
  #footer-forum:hover {
    background: rgba(178, 34, 34, 0.1);
    /* Firebrick low opacity */
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(178, 34, 34, 0.1);
  }

  body {
    padding-bottom: 0 !important;
    padding-left: 8vw !important;
  }

  /* Alerts Panel */
  .wb-alerts-header {
    padding: 30px 36px;
  }

  .wb-alerts-icon {
    width: 48px;
    height: 48px;
    border-radius: 18px;
  }

  .wb-alerts-title {
    font-size: 42px;
  }

  .wb-alerts-close {
    width: 54px;
    height: 54px;
  }

  .wb-notif-section {
    margin: 36px 30px;
    border-radius: 30px;
    padding: 48px 42px;
    border: 1.5px solid #e5e7eb;
    box-shadow: -6px 6px 0px 0px #5F9EA0;
    /* Cadet blue left and bottom border - 1.5x: -4,4 → -6,6 */
  }

  .wb-notif-section:first-child {
    margin-top: 48px;
  }

  .wb-notif-section:last-child {
    margin-bottom: 48px;
  }

  .wb-notif-heading {
    font-size: 36px;
    margin: 0 0 12px;
  }

  .wb-notif-subheading {
    font-size: 24px;
    margin: 0 0 48px;
  }

  .wb-notif-explainer {
    font-size: 13.65px;
    /* Reduced by 35%: 21px × 0.65 */
    margin: 30px 0;
    padding: 24px 30px;
    border-radius: 18px;
    box-shadow: -3px 3px 0px 0px #5F9EA0;
    /* Cadet blue left and bottom border - scaled 1.5x: -2,2 → -3,3 */
  }

  /* Form Elements */
  .wb-form-group {
    margin-bottom: 36px;
  }

  .wb-form-label {
    font-size: 21px;
    margin-bottom: 12px;
  }

  .wb-form-input,
  .wb-form-select {
    padding: 24px 27px;
    border: 3px solid #d1d5db;
    border-radius: 18px;
    font-size: 24px;
  }

  /* Alerts panel input and placeholder override */
  #wb-alerts-panel .wb-form-input,
  #wb-alerts-panel input[type="number"] {
    font-size: 90%;
    /* 10% reduction from default 24px */
  }

  #wb-alerts-panel .wb-form-input::placeholder {
    font-size: 90%;
    /* 10% reduction from parent font-size */
  }

  .wb-form-input:focus,
  .wb-form-select:focus {
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
  }

  /* Toggle Switch */
  .wb-toggle-row {
    margin-bottom: 36px;
    padding: 30px;
    border-radius: 24px;
    border: 3px solid #e2e8f0;
  }

  .wb-toggle-content {
    margin-right: 24px;
  }

  .wb-toggle-label {
    font-size: 24px;
    margin: 0 0 6px;
  }

  .wb-toggle-subtitle {
    font-size: 21px;
    line-height: 2.1;
  }

  .wb-toggle-switch {
    width: 84px;
    height: 48px;
    border-radius: 24px;
  }

  .wb-toggle-switch::after {
    top: 3px;
    left: 3px;
    width: 42px;
    height: 42px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
  }

  .wb-toggle-switch.active::after {
    transform: translateX(36px);
  }

  /* Buttons - reduced by 50% */
  .wb-create-zone-btn {
    padding: 13.5px 24px;
    /* 50%: 27,48 → 13.5,24 */
    border-radius: 12px;
    /* 50%: 24 → 12 */
    font-size: 14px;
    box-shadow: 0 3px 9px rgba(16, 185, 129, 0.25);
    /* 50%: 6,18 → 3,9 */
  }

  .wb-create-zone-btn:hover {
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
    /* 50%: 12,36 → 6,18 */
  }

  /* Zone Cards */
  .wb-zone-cards {
    gap: 24px;
    margin-top: 48px;
  }

  .wb-zone-card {
    border: 3px solid #e5e7eb;
    border-radius: 30px;
    padding: 36px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
  }

  .wb-zone-card:hover {
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
  }

  .wb-zone-card-header {
    margin-bottom: 18px;
  }

  .wb-zone-name {
    font-size: 27px;
    margin: 0 0 9px;
  }

  .wb-zone-meta {
    font-size: 21px;
    line-height: 2.1;
  }

  .wb-zone-actions {
    gap: 12px;
  }

  .wb-zone-btn {
    padding: 12px 24px;
    border: 3px solid;
    border-radius: 18px;
    font-size: 18px;
    letter-spacing: 0.75px;
  }

  /* Error Messages */
  .wb-error-msg {
    font-size: 21px;
    margin-top: 12px;
    padding: 18px 24px;
    border-radius: 18px;
    border-left: 6px solid #dc2626;
  }

  /* Modals */
  .wb-modal-content {
    border-radius: 30px;
    padding: 48px;
    max-width: 600px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.3);
    transform: translateY(-30px);
  }

  .wb-modal-icon {
    font-size: 72px;
    margin-bottom: 24px;
  }

  .wb-modal-title {
    font-size: 30px;
    margin: 0 0 24px;
  }

  .wb-modal-message {
    margin: 0 0 30px;
    line-height: 2.4;
  }

  .wb-modal-benefits {
    margin: 0 0 36px;
  }

  .wb-modal-benefits li {
    gap: 18px;
    padding: 15px 24px;
    border-radius: 12px;
    margin-bottom: 12px;
  }

  .wb-modal-benefits li i {
    font-size: 24px;
  }

  .wb-modal-buttons {
    gap: 18px;
    margin-top: 36px;
  }

  .wb-modal-btn {
    padding: 21px 30px;
    border: 3px solid;
    border-radius: 18px;
    font-size: 21px;
    letter-spacing: 0.75px;
  }

  /* Logout Modal */
  .wb-logout-content {
    border-radius: 30px;
    padding: 48px;
    max-width: 540px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.3);
  }

  .wb-logout-title {
    font-size: 30px;
    margin: 0 0 30px;
  }

  .wb-logout-buttons {
    gap: 18px;
    margin-top: 36px;
  }

  .wb-logout-btn {
    padding: 21px 30px;
    border: 3px solid #000;
    border-radius: 18px;
    font-size: 21px;
    letter-spacing: 0.75px;
  }

  /* Notification Modal */
  .wb-notification-content {
    border-radius: 30px;
    padding: 48px;
    max-width: 750px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.3);
  }

  .wb-notification-header {
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 3px solid #e5e7eb;
  }

  .wb-notification-title {
    font-size: 33px;
  }

  .wb-notification-close {
    width: 48px;
    height: 48px;
    font-size: 36px;
  }

  .wb-notification-master {
    padding: 24px;
    border-radius: 18px;
    margin-bottom: 36px;
    border: 3px solid #10b981;
  }

  .wb-notification-item {
    padding: 24px 0;
    border-bottom: 1.5px solid #e5e7eb;
  }

  .wb-notification-info {
    padding-right: 24px;
  }

  .wb-notification-label {
    gap: 12px;
    font-size: 24px;
    margin-bottom: 6px;
  }

  .wb-notification-desc {
    font-size: 19px;
    line-height: 2.25;
  }

  .wb-toggle {
    width: 78px;
    height: 42px;
  }

  .wb-toggle-slider {
    border-radius: 42px;
  }

  .wb-toggle-slider:before {
    height: 33px;
    width: 33px;
    left: 4px;
    bottom: 4px;
  }

  .wb-toggle input:checked+.wb-toggle-slider:before {
    transform: translateX(36px);
  }

  /* Visual separators */
  .wb-bold-line-break {
    height: 3px;
    margin: 60px auto;
    border-radius: 1.5px;
  }

  /* Update Toast */
  .wb-update-toast {
    bottom: 30px;
    padding: 24px 36px;
    border-radius: 18px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
    gap: 18px;
    font-size: 21px;
  }

  .wb-update-toast button {
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 18px;
  }

  /* Splash Screen */
  .wb-splash-logo {
    width: 300px;
  }

  /* Loading states */
  .loading-state {
    padding: 72px 36px;
  }

  .loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #3b82f6;
    margin-bottom: 24px;
  }
}

/* Teaser Card Selection Glow */
.card-selected-glow {
  border: 2px solid #1E90FF !important;
  border-color: #1E90FF !important;
  box-shadow: 0 0 12px rgba(30, 144, 255, 0.6) !important;
  transition: all 0.3s ease !important;
}

/* Circle action buttons (edit/delete) */
.circle-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.circle-action-btn {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: #666;
  font-size: 14px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.circle-action-btn:hover {
  background: rgba(70, 130, 180, 0.1);
  color: #4682B4;
}

.circle-action-btn.delete:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #EF4444;
}

/* Circle footer actions */
.circle-footer-actions {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid #F3F4F6;
  margin-top: 16px;
}

.circle-footer-actions button {
  flex: 1;
  color: white !important;
  height: 42px !important;
  /* Fixed height to match both buttons */
  min-height: 42px !important;
  padding: 10px 16px !important;
  border-radius: 10px;
  border: none;
  border-left: 1px solid darkslategrey;
  border-bottom: 1px solid darkslategrey;
}

.circle-footer-actions button:not(.delete) {
  background: cadetblue;
  color: white !important;
}

.circle-footer-actions button:not(.delete):hover {
  background: cadetblue;
  color: white !important;
}

.circle-footer-actions button.delete {
  background: firebrick;
  color: white !important;
}

.circle-footer-actions button.delete:hover {
  background: firebrick;
  color: white !important;
}

/* Mobile: Smaller font for footer action buttons */
@media (max-width: 768px) {
  .circle-footer-actions button {
    font-size: 12.5px !important;
  }

  .member-row .wb-people-action-btn.small {
    font-size: 11.5px !important;
  }
}

/* Creation form collapsed header - compact */
#creation-form-header.circle-header {
  padding: 0 20px;
  height: 40px;
}

/* Match creation form header to section background */
#creation-form-header.circle-header {
  background: var(--grey-100, #F5F5F5);
}

#creation-form-header.circle-header:hover {
  background: var(--grey-100, #F5F5F5);
}


/* ========================================
   SHARE MODAL (My People Invites)
   ======================================== */

.share-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000200;
  /* Above People drawer (1000100) and delete confirmation (1000102) */
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.share-modal {
  background: white;
  border: 2.5px solid steelblue;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: calc(100% - 32px);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.share-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
}

.share-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
}

.share-modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #666;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.share-modal-close:hover {
  background: #f3f4f6;
  color: #1a1a1a;
}

.share-modal-body {
  padding: 20px;
}

.share-modal-description {
  margin: 0 0 20px 0;
  font-size: 14px;
  font-weight: 600;
  color: #666;
  line-height: 1.5;
}

.invite-code-display {
  text-align: center;
  margin-bottom: 24px;
  padding: 20px;
  background: linear-gradient(135deg, #f0f8ff 0%, #f8f0ff 100%);
  border-radius: 12px;
}

.invite-code-badge {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #667eea;
  font-family: 'Courier New', monospace;
  padding: 12px 20px;
  background: white;
  border-radius: 8px;
  display: inline-block;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.share-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.share-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
}

.share-btn:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.share-btn:active {
  transform: translateY(0);
}

.share-btn i {
  font-size: 32px;
}

.share-btn.whatsapp i {
  color: #25D366;
}

.share-btn.sms i {
  color: #3b82f6;
}

.share-btn.copy i {
  color: #6b7280;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .share-modal {
    max-width: none;
    width: calc(100% - 24px);
  }

  .share-buttons {
    gap: 10px;
  }

  .share-btn {
    padding: 14px 10px;
    font-size: 12px;
  }

  .share-btn i {
    font-size: 28px;
  }
}

/* ============================================
   INVITE CODE SECTION
   ============================================ */

.invite-code-container {
  display: none;
}

/* ============================================
   WALK SAFE TOASTS (High z-index for People drawer)
   ============================================ */

.walk-safe-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 30, 30, 0.95);
  color: white;
  padding: 14px 20px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1000300;
  /* Above People drawer (1000100) and modals (1000200) */
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.walk-safe-toast.show {
  opacity: 1;
}

.walk-safe-toast.success {
  background: linear-gradient(135deg, #34C759 0%, #2FB84E 100%);
}

.walk-safe-toast.error {
  background: linear-gradient(135deg, #FF3B30 0%, #E62E24 100%);
}

.walk-safe-toast.info {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Premium Map InfoWindow (Profile Style) */
.wb-map-profile-card {
  padding: 0;
  margin: 0;
  min-width: 200px;
  max-width: 240px;
  font-family: 'Inter', sans-serif;
}

.wb-map-profile-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}

.wb-map-profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #7F00FF;
}

.wb-map-profile-avatar-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #f3f4f6;
  color: #7F00FF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  border: 2px solid #7F00FF;
}

.wb-map-profile-info h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
}

.wb-map-profile-info p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #6b7280;
}

.wb-map-profile-details {
  font-size: 13px;
  color: #374151;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wb-map-profile-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Hide Google Maps InfoWindow Close Button */
.gm-ui-hover-effect {
  display: none !important;
}

/* ========== WEEBRO INFO DROP ZONE ========== */
/* Branded notification area that drops down from logo */

.wb-info-drop-zone {
  position: fixed;
  top: 60px; /* Logo top (6px) + estimated logo height + gap */
  left: 8px; /* Match logo left position */
  width: 130px; /* Match desktop logo width */
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.6s ease-out, opacity 0.6s ease-out;
  z-index: 1000;
}

.wb-info-drop-zone.active {
  transform: translateY(0);
  opacity: 1;
}

.wb-info-banner {
  background: #ffffff;
  border: 2px solid #000000;
  border-top: 0.5px solid #000000; /* Softer top border to link with logo */
  border-radius: 0 0 var(--radius-md) var(--radius-md); /* Square top corners, rounded bottom */
  padding: 12px;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.15),
    4px 4px 12px rgba(30, 144, 255, 0.7); /* Dodger Blue glow - tighter, sharper, stronger */
  animation: dropIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes dropIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wb-banner-header {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 8px;
}

.wb-banner-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: -1px;
}

.wb-banner-title {
  font-size: 14px; /* Increased from var(--text-xs) which is 12px (0.75rem) */
  font-weight: var(--font-bold);
  color: #111827;
  line-height: 1.3;
  flex: 1;
}

.wb-banner-close {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 22px; /* Increased from 20px */
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 22px; /* Increased from 20px to match font size */
  height: 22px; /* Increased from 20px to match font size */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  flex-shrink: 0;
  margin-top: -6px; /* Move close button up by 6px (increased from -4px) */
  margin-left: 2px; /* Compensate for gap reduction (6px -> 4px = 2px difference) */
}

.wb-banner-close:hover {
  color: #111827;
}

.wb-banner-body {
  font-size: 13px; /* Increased from var(--text-xs) which is 12px */
  font-weight: 500; /* Medium weight for stronger appearance */
  line-height: 1.4;
  color: #374151;
}

.wb-banner-body strong {
  color: #7F00FF;
  font-weight: var(--font-semibold);
}

/* Desktop - Adjust for side panel */
@media (min-width: 769px) {
  .wb-info-drop-zone {
    left: 121px; /* 8px base + 113px side panel offset */
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .wb-info-drop-zone {
    top: 55px;
    left: 12px;
    width: 130px;
  }

  .wb-info-banner {
    padding: 14px;
  }

  .wb-banner-icon {
    font-size: 24px;
  }

  .wb-banner-title {
    font-size: var(--text-sm);
  }

  .wb-banner-body {
    font-size: var(--text-sm);
  }
}

/* ========================================
   STATUS PING MODAL
   ======================================== */

/* Status Ping Grid Buttons */
.status-ping-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 8px;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
}

.status-ping-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.status-ping-btn:active {
  transform: scale(0.97);
}

.status-ping-btn.selected {
  background: rgba(127, 0, 255, 0.1);
  border-color: #7F00FF;
  color: #7F00FF;
}

/* Reminder Time Buttons */
.reminder-time-btn {
  padding: 6px 12px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.15s ease;
}

.reminder-time-btn:hover {
  background: #e5e7eb;
}

.reminder-time-btn.selected {
  background: #7F00FF;
  border-color: #7F00FF;
  color: white;
}