/* Global Styles */
:root {
  --primary-color: #1f2937; /* Navbar background */
  --secondary-color: #d1d5db; /* Light text color */
  --accent-color: #ffd588; /* Accent color */
  --hover-color: rgba(30, 65, 107, 0.5); /* Hover background */
  --font-family: 'Inter', sans-serif;
  --font-family-alt: 'Over the Rainbow', cursive;
  --font-family-headings: 'Poppins', sans-serif;
  --font-family-body: 'Inter', sans-serif;

  /* Note Color Palette Variables */
  /* Yellow (Default) */
  --note-color-yellow-bg: #fff3cd;
  --note-color-yellow-border: #ffd588;
  --note-color-yellow-bg-selected: #ffe599;
  --note-color-yellow-border-selected: #ffbe45;

  /* Pink */
  --note-color-pink-bg: #ffe2e2;
  --note-color-pink-border: #ffabab;
  --note-color-pink-bg-selected: #ffcccc;
  --note-color-pink-border-selected: #ff7777;

  /* Green */
  --note-color-green-bg: #bdffc4;
  --note-color-green-border: #00ea17;
  --note-color-green-bg-selected: #a8ff88;
  --note-color-green-border-selected: #00cc00;

  /* Blue */
  --note-color-blue-bg: #b5d7ff;
  --note-color-blue-border: #4198ff;
  --note-color-blue-bg-selected: #9ac7ff;
  --note-color-blue-border-selected: #2680ff;
}

body,
html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: var(--font-family);
  overflow: hidden; /* Hide overflow */
}

/* Navbar styles */
#navbar,
#logo,
#menu {
  display: flex;
  align-items: center;
}

#navbar {
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background-color: var(--primary-color);
}

#logo {
  color: var(--secondary-color);
  font-size: 1.25rem;
  font-weight: bold;
}

#logo-icon {
  width: 32px;
  height: 32px;
  margin-right: 0.5rem;
}

#menu {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

/* Map title styles */
#map-title {
  color: var(--secondary-color);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#map-title:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.title-edit-input {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  border: 2px solid var(--accent-color);
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  max-width: 300px;
  outline: none;
}

/* Navbar right section */
.navbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Collaborators container */
#collaborators {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.collaborator-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--accent-color);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  cursor: default;
}

/* Menu and button styles */
.menu-item {
  position: relative;
  margin-left: 1rem;
}

.menu-button,
.menu-link {
  background-color: transparent;
  border: none;
  color: var(--secondary-color);
  cursor: pointer;
  font-family: var(--font-family);
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.65rem;
  text-decoration: none;
  white-space: nowrap; /* Ensure button text doesn't wrap */
  overflow: hidden; /* Hide overflow for the pseudo-element */
}

.menu-button:hover,
.menu-button:active {
  background-color: var(--hover-color);
}

.menu-button:active::after,
.dropdown button:active::after,
.dropdown a:active::after {
  opacity: 1;
}

.dropdown {
  display: none;
  position: absolute;
  min-width: 150px;
  top: 100%;
  right: 0; /* Align to the right of the menu item */
  background-color: #ffffff;
  border-radius: 0.375rem;
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  z-index: 1100;
  padding: 0;
}

.menu-item:hover .dropdown {
  display: block;
}

.dropdown li {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.dropdown button,
.dropdown a {
  display: block;
  width: 100%;
  padding: 0.5rem 0.5rem;
  border: none;
  border-radius: 0.375rem;
  background-color: transparent;
  color: #374151;
  font-family: var(--font-family);
  font-size: 0.65rem;
  font-weight: bold;
  text-transform: uppercase;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}

.dropdown button:hover,
.dropdown a:hover {
  background-color: #edf0ff;
}

/* Canvas Styles */
#canvas-container {
  width: 100%;
  height: calc(100vh - 40px);
  overflow: hidden;
  background-color: #ccc;
  position: relative;
}

#canvas {
  width: 7680px;
  height: 4320px;
  background: #fffcf8 radial-gradient(#eee 2px, transparent 2px);
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
  background-size: 20px 20px; /* Adjust the grid size */
  touch-action: none; /* Prevent browser default touch gestures for custom pointer handling */
  /* Initial transform will be set by JavaScript to center canvas */
}

#watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 100px;
  font-weight: 700;
  color: rgba(211, 211, 211, 0.15);
  pointer-events: none;
  user-select: none;
}

/* Help Text Styles */
#help-text {
  position: fixed;
  bottom: 70px; /* Position above help button */
  left: 20px;
  color: rgba(94, 94, 94, 0.8);
  font-family: var(--font-family);
  font-size: 10pt;
  line-height: 1.5;
  pointer-events: none;
  user-select: none;
  background: rgba(255, 255, 255, 0.95);
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-width: 300px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease,
    transform 0.2s ease;
  z-index: 1001;
}

#help-text.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Help Button Styles */
.help-button {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 31px;
  height: 31px;
  user-select: none; /* Prevent text selection on double-click */
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  color: #9ca3af;
  font-family: var(--font-family-headings);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.1s ease;
  z-index: 1002;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
}

.help-button:hover {
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  color: #6b7280;
}

.help-button:active {
  transform: scale(0.95);
}

.help-button:focus {
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.1),
    0 0 0 2px #4198ff;
}

/* Touch-specific help button adjustments */
@media (pointer: coarse) {
  .help-button {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }
}

/* Zoom Display Styles */
#zoom-display {
  position: fixed;
  bottom: 10px;
  right: 10px;
  font-family: var(--font-family-headings);
  font-size: 36px;
  font-weight: 900;
  color: #ddd;
  pointer-events: none;
  user-select: none;
}

/* Note Styles */
.note {
  position: absolute;
  width: 150px;
  min-height: 40px; /* Ensure notes have minimum clickable area even when empty */
  padding: 8px;
  background-color: var(--note-color-yellow-bg);
  border: 1px solid var(--note-color-yellow-border);
  border-radius: 8px;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
  cursor: move;
  color: #333;
  box-sizing: border-box;
  z-index: 1; /* Ensure notes are above the SVG container */
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

#svg-container {
  z-index: 0; /* Ensure SVG container is below the notes */
  pointer-events: none;
}

.note.selected {
  border-color: var(--note-color-yellow-border-selected);
  background-color: var(--note-color-yellow-bg-selected);
}

.note:hover {
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2); /* Subtle shadow on hover */
}
.note:focus,
.note[contenteditable='true'] {
  outline: none; /* Remove default outline */
}

/* ===============================================
   NOTE CONTENT STYLING - SIMPLIFIED ARCHITECTURE
   
   Base: Inter 0.9em, normal weight (400)
   - Consistent across view and edit modes
   - All elements inherit unless specified
   
   View Mode Deviations:
   - H1: Poppins, 1.3em, bold (700)
   - H2: Inter, 1.1em, semibold (600)
   - Strong: Inter, bold (700)
   - Em: Inter, italic
   
   Edit Mode: Inherits all base styles via textarea
   =============================================== */

.note-content {
  font-family: 'Inter', var(--font-family-body);
  font-size: 0.9em; /* Standard size for all note content */
  font-weight: 400; /* Normal weight - bold is a markdown feature */
  line-height: 1.4;
  color: #333;
  text-align: center;
  outline: none;
  min-width: 50px;
  min-height: 24px;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
  cursor: text;
  width: 100%; /* Always use full note width */
}

.note-content.view-mode * {
  cursor: text; /* Show text cursor on all child elements to indicate editability */
}

/* Edit mode textarea styling */
.note-content.edit-mode .edit-textarea {
  /* pointer-events no longer needs override since parent CSS hack was removed */
  position: relative; /* Ensure proper stacking context */
  z-index: 10; /* Place above other elements */
}

/* Reset margins and padding for all markdown elements to prevent extra spacing */
.note-content p,
.note-content h1,
.note-content h2,
.note-content ul,
.note-content ol,
.note-content li,
.note-content strong,
.note-content em {
  margin: 0;
  padding: 0;
}

/* All standard text inherits from .note-content base (Inter 0.9em) */
/* No need to redefine - they inherit automatically */

/* VIEW MODE ONLY: Markdown-specific styling deviations */

/* H1: Poppins for visual hierarchy */
.note-content.view-mode h1 {
  font-family: 'Poppins', var(--font-family-headings);
  font-size: 1.3em; /* Relative to base 0.9em */
  font-weight: 700;
}

/* H2: Larger Inter with medium weight */
.note-content.view-mode h2 {
  font-size: 1.1em; /* Relative to base 0.9em */
  font-weight: 600;
  color: #2c3e50;
}

/* Bold and italic in view mode only */
.note-content.view-mode strong {
  font-weight: 900;
}

.note-content.view-mode em {
  font-style: italic;
}

/* List styling with custom bullets, minimal spacing, and left alignment */
.note-content ul,
.note-content ol {
  list-style: none;
  margin-top: 4px;
  padding-left: 0;
  text-align: left !important; /* Force left alignment regardless of parent */
  display: block; /* Ensure block layout for proper text alignment */
  width: 100%; /* Take full width of note content area */
}

.note-content ul li,
.note-content ol li {
  position: relative;
  padding-left: 0.9ch;
  text-align: left !important; /* Force left alignment for list items */
  display: block; /* Ensure block layout */
}

.note-content ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  font-weight: 700;
}

.note-content-handdrawn {
  font-family: var(--font-family-alt);
  font-size: 1.1em;
}

/* Edit mode container - minimal overrides needed */
.note-content.edit-mode {
  /* Container is just a wrapper for textarea */
  padding: 0;
}

/* Edit mode textarea - inherit base styles for consistency */
.note-content.edit-mode .edit-textarea {
  /* Explicit font properties to match .note-content exactly */
  font-family: 'Inter', var(--font-family-body);
  font-size: 0.9em;
  font-weight: 400;
  line-height: 1.4;
  color: inherit;
  text-align: inherit;

  /* Textarea-specific resets - aggressive to match view mode exactly */
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  padding: 0 !important;
  margin: 0 !important;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  vertical-align: top; /* Prevent baseline alignment issues */
  min-height: 0; /* Override any browser defaults */
}

/* Edit mode contains only textarea - no need for child element rules */

/* Prevent text selection in notes when not in edit mode */
.note,
.note-content:not(.edit-mode) {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

body.dragging,
body.dragging * {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
}

/* Allow modal/notification dialogs to remain interactive during dragging */
body.dragging .notification,
body.dragging .modal,
body.dragging .confirmation-dialog,
body.dragging .notification-container,
body.dragging .notification *,
body.dragging .modal *,
body.dragging .confirmation-dialog * {
  pointer-events: auto !important;
  -webkit-user-select: auto !important;
  -moz-user-select: auto !important;
  -ms-user-select: auto !important;
  user-select: auto !important;
}

/* Allow text selection in notes only when editing */
.note[contenteditable='true'] {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}

/* Color-specific note classes */
.note.color-yellow {
  background-color: var(--note-color-yellow-bg);
  border-color: var(--note-color-yellow-border);
}

.note.color-yellow.selected {
  background-color: var(--note-color-yellow-bg-selected);
  border-color: var(--note-color-yellow-border-selected);
}

.note.color-pink {
  background-color: var(--note-color-pink-bg);
  border-color: var(--note-color-pink-border);
}

.note.color-pink.selected {
  background-color: var(--note-color-pink-bg-selected);
  border-color: var(--note-color-pink-border-selected);
}

.note.color-green {
  background-color: var(--note-color-green-bg);
  border-color: var(--note-color-green-border);
}

.note.color-green.selected {
  background-color: var(--note-color-green-bg-selected);
  border-color: var(--note-color-green-border-selected);
}

.note.color-blue {
  background-color: var(--note-color-blue-bg);
  border-color: var(--note-color-blue-border);
}

.note.color-blue.selected {
  background-color: var(--note-color-blue-bg-selected);
  border-color: var(--note-color-blue-border-selected);
}

/* Color Picker Styles - Based on Penpot Design */
#color-picker-container {
  position: fixed;
  top: 80px; /* Below navbar */
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  pointer-events: auto;
}

/* Color Picker Container - Expanded for context actions */
.color-picker-palette {
  position: relative;
  width: 242px; /* Expanded from 174px to accommodate new buttons + separators */
  height: 37px;
  background: rgba(255, 255, 255, 0.582);
  border: 1px solid rgba(103, 103, 103, 0.25);
  border-radius: 20px;
  box-shadow: 2px 2px 4px 0px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
  display: flex;
  align-items: center;
}

/* First separator line between colors and context actions */
.color-picker-palette::before {
  content: '';
  position: absolute;
  left: 135px;
  top: 10px;
  width: 1px;
  height: 16px;
  background: rgba(177, 177, 177, 0.4);
}

/* Second separator line between context actions and kebab menu */
.color-picker-palette::after {
  content: '';
  position: absolute;
  left: 203px; /* Moved right to account for new buttons */
  top: 10px;
  width: 1px;
  height: 16px;
  background: rgba(177, 177, 177, 0.4);
}

/* Color Swatches - Normalized dimensions with proper spacing for glow effects */
.color-swatch {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  transition: box-shadow 0.2s ease;
  top: 5px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Individual Color Positions - More spacing to prevent glow overlap */
.color-swatch[data-color='yellow'] {
  left: 7px;
  background: var(--note-color-yellow-bg);
  border-color: var(--note-color-yellow-border);
}

.color-swatch[data-color='pink'] {
  left: 39px;
  background: var(--note-color-pink-bg);
  border-color: var(--note-color-pink-border);
}

.color-swatch[data-color='green'] {
  left: 71px;
  background: var(--note-color-green-bg);
  border-color: var(--note-color-green-border);
}

.color-swatch[data-color='blue'] {
  left: 103px;
  background: var(--note-color-blue-bg);
  border-color: var(--note-color-blue-border);
}

/* Interactive States */
.color-swatch:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Selected state - inner glow + selected note colors */
.color-swatch[data-color='yellow'].active {
  background: var(--note-color-yellow-bg-selected);
  border-color: var(--note-color-yellow-border-selected);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.8),
    0 0 8px rgba(255, 190, 69, 0.6);
}

.color-swatch[data-color='pink'].active {
  background: var(--note-color-pink-bg-selected);
  border-color: var(--note-color-pink-border-selected);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.8),
    0 0 8px rgba(255, 119, 119, 0.6);
}

.color-swatch[data-color='green'].active {
  background: var(--note-color-green-bg-selected);
  border-color: var(--note-color-green-border-selected);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.8),
    0 0 8px rgba(0, 204, 0, 0.6);
}

.color-swatch[data-color='blue'].active {
  background: var(--note-color-blue-bg-selected);
  border-color: var(--note-color-blue-border-selected);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.8),
    0 0 8px rgba(38, 128, 255, 0.6);
}

.color-swatch:focus {
  outline: 2px solid #4a90e2;
  outline-offset: 2px;
}

/* Ensure keyboard navigation works */
.color-swatch:focus:not(:focus-visible) {
  outline: none;
}

/* Context Action Buttons - Match color swatch styling */
.toolbar-action {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  top: 5px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
}

/* Delete Action Button Position */
.toolbar-action.delete-action {
  left: 147px; /* Between first separator and switch button */
  background: #ffffff; /* White background to match switch button */
}

/* Switch Action Button Position */
.toolbar-action.switch-action {
  left: 175px; /* Between delete button and second separator */
}

/* Disabled state - ghosted appearance */
.toolbar-action:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

/* Enabled state hover effects */
.toolbar-action:not(:disabled):hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  opacity: 1;
}

/* Focus styles consistent with color swatches */
.toolbar-action:focus {
  outline: 2px solid #4a90e2;
  outline-offset: 2px;
}

/* SVG styling for toolbar actions */
.toolbar-action svg {
  width: 12px;
  height: 12px;
  pointer-events: none;
}

/* Delete button - using the working multi-property approach */
button.toolbar-action.delete-action svg {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
}

/* Switch button - using the working multi-property approach */
button.toolbar-action.switch-action svg {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
}

/* Kebab Menu Button - Updated position */
.kebab-menu-button {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  transition: box-shadow 0.2s ease;
  top: 5px;
  left: 208px; /* Moved right to account for new buttons */
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kebab-menu-button svg {
  width: 20px !important;
  height: 20px !important;
  fill: rgba(124, 124, 124, 0.6);
}

.kebab-menu-button:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Focus styles consistent with color swatches - only show when menu is open */
.kebab-menu-button:focus,
.kebab-menu-button:focus-visible {
  outline: none;
}

.kebab-menu-button[aria-expanded='true'] {
  outline: 2px solid #4a90e2;
  outline-offset: 2px;
}

/* Kebab Context Menu */
.kebab-context-menu {
  position: absolute;
  width: 280px;
  background: #fbfbfb;
  border-radius: 14px;
  box-shadow:
    0 10px 30px rgba(18, 20, 22, 0.14),
    0 2px 8px rgba(18, 20, 22, 0.08);
  padding: 6px;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
  transition:
    opacity 0.16s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.16s cubic-bezier(0.22, 0.61, 0.36, 1);
  max-height: calc(100vh - 48px);
  overflow: auto;
  z-index: 1001;
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
}

.kebab-context-menu.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.kebab-menu-handle {
  display: none;
  width: 40px;
  height: 4px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
  margin: 8px auto 12px;
  touch-action: none;
}

.kebab-menu-group {
  margin: 6px 0;
}

.kebab-menu-subtitle {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: rgba(21, 23, 26, 0.55);
  padding: 6px 10px;
  font-weight: 600;
}

.kebab-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: 0.2px;
  color: var(--ink, #15171a);
  transition: background-color 0.15s ease;
}

.kebab-menu-item:hover {
  background: rgba(18, 20, 22, 0.05);
}

.kebab-menu-item:active {
  background: rgba(18, 20, 22, 0.1);
  transform: scale(0.98);
}

.kebab-menu-kbd {
  font-size: 11px;
  color: rgba(21, 23, 26, 0.55);
  font-weight: 400;
}

.kebab-menu-divider {
  height: 1px;
  background: rgba(18, 20, 22, 0.08);
  margin: 4px 6px;
  border-radius: 1px;
}

/* Mobile: turn into a bottom sheet with drag handle */
@media (max-width: 720px) {
  .kebab-context-menu {
    position: fixed;
    inset: auto 0 0 0;
    width: 100%;
    right: auto;
    top: auto;
    border-radius: 16px 16px 0 0;
    transform: translateY(12px);
    max-height: 85vh;
  }

  .kebab-context-menu.open {
    transform: translateY(0);
  }

  .kebab-menu-handle {
    display: block;
  }
}

/* Connector Styles */
line.connection-line {
  stroke: #888;
  stroke-width: 2;
}

/* Connector Hotspot Styles */
.connector-hotspot {
  fill: #fff;
  stroke: #5a6f86;
  stroke-width: 2;
  cursor: pointer;
  transition:
    fill 0.2s ease,
    stroke 0.2s ease,
    filter 0.2s ease;
}

/* Hover effect for connector hotspots */
.connector-hotspot:hover {
  fill: #ffeb3b;
  filter: drop-shadow(0 0 8px rgba(255, 235, 59, 0.6));
  stroke: #f57f17;
}

/* Selected state for connector hotspots */
.connector-hotspot.selected {
  fill: #ffeb3b;
  filter: drop-shadow(0 0 8px rgba(255, 235, 59, 0.8));
  stroke: #f57f17;
}

/* Selected state for connection paths - subtle drop shadow, keep dotted line */
path.selected {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

#svg-container line,
#svg-container circle,
#svg-container path {
  pointer-events: all;
}

/* Hidden utility class (still used by other components) */
.hidden {
  display: none !important;
}

/* About Style */
.override-overflow {
  overflow: auto;
}

.about-container {
  margin-left: auto;
  margin-right: auto;
  margin-top: 2rem;
  margin-bottom: 2rem;
  max-width: 800px;
  padding: 2rem;
  background-color: #1a202c; /* bg-gray-900 */
  color: #ffffff; /* text-white */
  font-family: var(--font-family);
  border-radius: 0.5rem; /* rounded-lg */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* shadow */
}

/* Heading Styles */
.about-container h1 {
  font-size: 2.25rem; /* text-4xl */
  font-weight: 700; /* font-bold */
  margin-bottom: 1rem; /* mb-4 */
}

.about-container h2 {
  font-size: 1.5rem; /* text-2xl */
  font-weight: 600; /* font-semibold */
  margin-bottom: 0.5rem; /* mb-2 */
}

/* Paragraph Styles */
.about-container p {
  margin-bottom: 1rem; /* mb-4 */
  line-height: 1.75; /* leading-relaxed */
}

/* List Styles */
.about-container ul {
  list-style-type: disc; /* list-disc */
  padding-left: 1.5rem; /* list-inside */
  margin-bottom: 1rem; /* mb-4 */
}

/* Link Styles */
.about-container a {
  color: #63b3ed; /* text-blue-400 */
  text-decoration: none;
}

.about-container a:hover {
  text-decoration: underline; /* hover:underline */
}

/* Section Margin */
.about-container section {
  margin-bottom: 2rem; /* mb-8 */
  border-bottom: 1px solid #2d3748; /* border-b */
  padding-bottom: 1rem;
}

/* Tagline styling */
.about-container .tagline {
  font-size: 1.125rem;
  color: #68d391; /* text-green-400 */
  text-align: center;
  margin-bottom: 2rem;
  font-style: italic;
}

/* Quick start section */
.about-container .quick-start {
  background-color: #2d3748; /* bg-gray-800 */
  padding: 1.5rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.about-container .quick-start ol {
  margin-bottom: 0;
}

.about-container .quick-start li {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

/* CTA link */
.about-container .cta-link {
  display: inline-block;
  background-color: #4299e1; /* bg-blue-500 */
  color: white !important;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.2s;
}

.about-container .cta-link:hover {
  background-color: #3182ce; /* bg-blue-600 */
  text-decoration: none;
}

/* Ghost Connecting Points */
.note .ghost-connector {
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: rgba(112, 181, 255, 0.5); /* Semi-transparent blue */
  border-radius: 50%;
  display: none; /* Hidden by default */
  cursor: crosshair;
}

.note:hover .ghost-connector,
.note.selected .ghost-connector,
.connection-mode .note .ghost-connector {
  display: block; /* Show on hover, when selected, or during connection mode (for touch devices) */
}

/* Selected ghost connector state for touch connection creation */
@media (pointer: coarse) {
  .ghost-connector {
    transition: all 0.2s ease; /* Only add transitions on touch devices */
  }

  .ghost-connector.connector-selected {
    background-color: rgba(255, 215, 0, 0.9); /* Yellow tinge when selected */
    transform: scale(
      1.8
    ); /* Reduced from 2.25 to avoid delete button overlap */
    box-shadow:
      0 0 0 3px rgba(255, 255, 255, 0.9),
      /* Thicker white ring */ 0 0 16px rgba(255, 215, 0, 0.8); /* Stronger yellow glow */
  }
}

.ghost-connector.top {
  top: -5px; /* Adjust for circle size */
  left: 50%;
  transform: translateX(-50%);
}

.ghost-connector.bottom {
  bottom: -5px; /* Adjust for circle size */
  left: 50%;
  transform: translateX(-50%);
}

.ghost-connector.left {
  left: -5px; /* Adjust for circle size */
  top: 50%;
  transform: translateY(-50%);
}

.ghost-connector.right {
  right: -5px; /* Adjust for circle size */
  top: 50%;
  transform: translateY(-50%);
}

/* ==========================================================================
   NOTIFICATION MODAL SYSTEM
   ========================================================================== */

/* Modal Overlay */
.notification-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 2001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  opacity: 1;
  transition: opacity 0.2s ease;
}

.notification-modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Modal */
.notification-modal {
  background: #ffffff;
  border-radius: 16px;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.2),
    0 8px 16px rgba(0, 0, 0, 0.1);
  max-width: 400px;
  width: 100%;
  transform: scale(1);
  transition: transform 0.2s ease;
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
}

.notification-modal-overlay.hidden .notification-modal {
  transform: scale(0.95);
}

.notification-modal-content {
  padding: 24px;
}

.notification-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.notification-modal-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  flex-shrink: 0;
}

.notification-modal-icon-warning,
.notification-modal-icon-danger {
  background: #f59e0b;
}

.notification-modal-icon-info {
  background: #3b82f6;
}

.notification-modal-icon-question {
  background: #6b7280;
}

.notification-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin: 0;
  line-height: 1.2;
}

.notification-modal-message {
  font-size: 14px;
  line-height: 1.5;
  color: #6b7280;
  margin-bottom: 24px;
}

.notification-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.notification-modal-button {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  min-width: 80px;
}

.notification-modal-button:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.notification-modal-button-cancel {
  background: #f9fafb;
  color: #374151;
  border-color: #d1d5db;
}

.notification-modal-button-cancel:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.notification-modal-button-confirm {
  background: #3b82f6;
  color: #ffffff;
}

.notification-modal-button-confirm:hover {
  background: #2563eb;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
  .notification-modal {
    margin: 0;
    border-radius: 12px;
  }

  .notification-modal-content {
    padding: 20px;
  }

  .notification-modal-actions {
    flex-direction: column-reverse;
  }

  .notification-modal-button {
    width: 100%;
  }
}

/* Accessibility - Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .notification-modal-overlay,
  .notification-modal {
    transition: none !important;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .notification-modal {
    background: #1f2937;
  }

  .notification-modal-title {
    color: #f9fafb;
  }

  .notification-modal-message {
    color: #d1d5db;
  }

  .notification-modal-button-cancel {
    background: #374151;
    color: #d1d5db;
    border-color: #4b5563;
  }

  .notification-modal-button-cancel:hover {
    background: #4b5563;
  }
}

/* ==========================================================================
   MOBILE JIGGLE ANIMATION FOR SELECTED NOTES
   ========================================================================== */

/* Jiggle animation for selected notes on touch devices - indicates ready to drag */
@media (pointer: coarse) {
  .note.selected.jiggle {
    animation: noteJiggle 0.15s ease-out 2;
    animation-fill-mode: forwards;
  }
}

@keyframes noteJiggle {
  0%,
  100% {
    transform: rotate(0deg) scale(1);
  }
  25% {
    transform: rotate(-1.5deg) scale(1.01);
  }
  75% {
    transform: rotate(1.5deg) scale(1.01);
  }
}

/* Ensure jiggle doesn't interfere with other interactions */
.note.jiggle {
  transform-origin: center center;
}

/* ==========================================================================
   SERVER CONNECTION MODAL
   ========================================================================== */

/* Connection Status Message Styles */
.server-connection-status {
  margin-top: 16px;
}

.status-message {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.4;
}

.status-message.status-info {
  background: #e3f2fd;
  color: #1976d2;
  border-left: 4px solid #1976d2;
}

.status-message.status-success {
  background: #e8f5e8;
  color: #2e7d32;
  border-left: 4px solid #4caf50;
}

.status-message.status-error {
  background: #ffebee;
  color: #c62828;
  border-left: 4px solid #f44336;
}

.status-message .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Server Modal Overlay - Similar to notification modal pattern */
.server-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 2001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  opacity: 1;
  transition: opacity 0.2s ease;
}

.server-modal[style*='display: none'] {
  opacity: 0;
  pointer-events: none;
}

/* Server Modal Content */
.server-modal-content {
  background: #ffffff;
  border-radius: 16px;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.2),
    0 8px 16px rgba(0, 0, 0, 0.1);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(1);
  transition: transform 0.2s ease;
}

/* Server Modal Header */
.server-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 16px;
  border-bottom: 1px solid #e5e7eb;
}

.server-modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  font-family: var(--font-family-headings);
}

.server-modal-close {
  background: transparent;
  border: none;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.server-modal-close:hover {
  background: #f3f4f6;
  color: #374151;
}

.server-modal-close:focus {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
}

/* Server Connection Form */
.server-connection-form {
  padding: 16px 24px 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
  font-family: var(--font-family);
}

.form-help {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: #6b7280;
  margin-top: 2px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.875rem;
  font-family: var(--font-family);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-input::placeholder {
  color: #9ca3af;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* Button Styles */
.btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font-family);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background: #ffffff;
  color: #374151;
  border-color: #d1d5db;
}

.btn-secondary:hover:not(:disabled) {
  background: #f9fafb;
  border-color: #9ca3af;
}

.btn-primary {
  background: #4f46e5;
  color: #ffffff;
  border-color: #4f46e5;
}

.btn-primary:hover:not(:disabled) {
  background: #4338ca;
  border-color: #4338ca;
}

.btn-primary.connected {
  background: #10b981;
  border-color: #10b981;
}

.btn-primary.connected:hover:not(:disabled) {
  background: #059669;
  border-color: #059669;
}

.btn-primary.error {
  background: #ef4444;
  border-color: #ef4444;
}

.btn-primary.error:hover:not(:disabled) {
  background: #dc2626;
  border-color: #dc2626;
}

/* Connection Status Area */
.server-connection-status {
  margin-top: 16px;
  padding: 12px;
  border-radius: 6px;
  font-size: 0.875rem;
  display: none; /* Hidden by default, shown by JavaScript when needed */
}

.server-connection-status.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.server-connection-status.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.server-connection-status.info {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

/* Server Menu Items */
.server-disconnect-item {
  color: #dc2626 !important;
}

.server-disconnect-item:hover {
  background: rgba(220, 38, 38, 0.05) !important;
}

/* Readonly input styles for connection status view */
.form-input.readonly {
  background: #f8f9fa;
  color: #6c757d;
  cursor: default;
  border-color: #e9ecef;
}

/* Disconnect button styles */
.btn.disconnect {
  background: #dc3545;
  border-color: #dc3545;
  color: #ffffff;
}

.btn.disconnect:hover:not(:disabled) {
  background: #c82333;
  border-color: #bd2130;
}

/* Connection status info styles */
.connection-status-info {
  margin-top: 16px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #10b981;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.status-text {
  font-weight: 500;
  color: #065f46;
}

.status-help {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.4;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .server-modal-content {
    background: #1f2937;
    border: 1px solid #374151;
  }

  .server-modal-header {
    border-bottom-color: #374151;
  }

  .server-modal-header h2 {
    color: #f9fafb;
  }

  .server-modal-close {
    color: #9ca3af;
  }

  .server-modal-close:hover {
    background: #374151;
    color: #e5e7eb;
  }

  .form-label {
    color: #e5e7eb;
  }

  .form-help {
    color: #9ca3af;
  }

  .form-input {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
  }

  .form-input:focus {
    border-color: #6366f1;
    background: #374151;
  }

  .form-input::placeholder {
    color: #6b7280;
  }

  .btn-secondary {
    background: #374151;
    color: #e5e7eb;
    border-color: #4b5563;
  }

  .btn-secondary:hover:not(:disabled) {
    background: #4b5563;
    border-color: #6b7280;
  }

  /* Dark mode readonly input styles */
  .form-input.readonly {
    background: #2d3748;
    color: #a0aec0;
    border-color: #4a5568;
  }

  /* Dark mode disconnect button styles */
  .btn.disconnect {
    background: #e74c3c;
    border-color: #e74c3c;
  }

  .btn.disconnect:hover:not(:disabled) {
    background: #c0392b;
    border-color: #c0392b;
  }

  /* Dark mode connection status info styles */
  .connection-status-info {
    background: #2d3748;
    border-left-color: #10b981;
  }

  .status-text {
    color: #a7f3d0;
  }

  .status-help {
    color: #9ca3af;
  }

  /* Dark mode status message styles */
  .status-message.status-info {
    background: #0d47a1;
    color: #90caf9;
    border-left-color: #1976d2;
  }

  .status-message.status-success {
    background: #1b5e20;
    color: #a5d6a7;
    border-left-color: #4caf50;
  }

  .status-message.status-error {
    background: #b71c1c;
    color: #ef9a9a;
    border-left-color: #f44336;
  }
}

/* Mobile responsiveness */
@media (max-width: 640px) {
  .server-modal {
    padding: 16px;
  }

  .server-modal-content {
    max-width: 100%;
  }

  .form-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}

/* Server Connection Status Indicators */
.server-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
}

.server-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.server-status-dot.connected {
  background-color: #10b981; /* Green */
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.server-status-dot.connecting {
  background-color: #f59e0b; /* Orange */
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
  animation: pulse-orange 1.5s ease-in-out infinite;
}

.server-status-dot.disconnected {
  background-color: #ef4444; /* Red */
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.server-status-dot.error {
  background-color: #ef4444; /* Red */
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
  animation: pulse-red 1.5s ease-in-out infinite;
}

@keyframes pulse-orange {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes pulse-red {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Loading Spinner */
.server-loading-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-left-color: #6366f1;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Server Menu Item States */
.kebab-menu-item.server-connected span {
  color: #10b981;
}

.kebab-menu-item.server-connecting {
  opacity: 0.7;
}

.kebab-menu-item.server-loading {
  pointer-events: none;
  opacity: 0.6;
}

/* Dark mode support for server indicators */
@media (prefers-color-scheme: dark) {
  .server-loading-spinner {
    border-color: rgba(255, 255, 255, 0.1);
    border-left-color: #818cf8;
  }
}

/* Map Selection Modal Styles */
.map-selection-content {
  padding: 0;
}

/* Fix form-actions padding for MapSelectionModal */
#map-selection-modal .form-actions {
  padding: 20px;
}

.map-selection-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
  padding: 20px 20px 0;
}

.map-selection-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.maps-list-container {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin: 0 20px;
  background: #fafafa;
}

.maps-list {
  padding: 0;
}

.map-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.15s ease;
}

.map-item:last-child {
  border-bottom: none;
}

.map-item:hover {
  background: #f3f4f6;
}

.map-item.selected {
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
}

.map-item-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.map-item-name {
  font-weight: 500;
  font-size: 0.95rem;
  color: #1f2937;
  margin: 0 0 4px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-item-meta {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: #6b7280;
}

.map-item-date {
  white-space: nowrap;
}

.map-item-actions {
  display: flex;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.map-item:hover .map-item-actions {
  opacity: 1;
}

.map-action-btn {
  background: transparent;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #374151;
}

.map-action-btn:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.map-action-btn.primary {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.map-action-btn.primary:hover {
  background: #2563eb;
  border-color: #2563eb;
}

.map-action-btn.danger {
  background: #dc2626;
  color: white;
  border-color: #dc2626;
}

.map-action-btn.danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

/* Loading, Empty, and Error States */
.maps-loading,
.maps-empty,
.maps-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.maps-loading .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: 12px;
}

.empty-state,
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.empty-state svg,
.error-state svg {
  color: #9ca3af;
  margin-bottom: 4px;
}

.empty-state h3,
.error-state h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #374151;
}

.empty-state p,
.error-state p {
  margin: 0;
  color: #6b7280;
  font-size: 0.9rem;
}

/* Pagination */
.maps-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 20px;
  border-top: 1px solid #e5e7eb;
  margin-top: 20px;
}

.page-info {
  font-size: 0.9rem;
  color: #6b7280;
}

/* Responsive Design */
@media (max-width: 640px) {
  .map-selection-controls {
    gap: 12px;
  }

  .map-selection-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .maps-list-container {
    margin: 0 16px;
  }

  .map-item {
    padding: 12px 16px;
  }

  .map-item-info {
    margin-right: 12px;
  }

  .map-item-meta {
    flex-direction: column;
    gap: 4px;
  }

  .map-item-actions {
    flex-direction: column;
    gap: 4px;
  }

  .maps-pagination {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* Dark Mode Support for Map Selection Modal */
@media (prefers-color-scheme: dark) {
  .maps-list-container {
    background: #1f2937;
    border-color: #374151;
  }

  .map-item {
    border-bottom-color: #374151;
  }

  .map-item:hover {
    background: #374151;
  }

  .map-item.selected {
    background: #1e3a8a;
    border-left-color: #60a5fa;
  }

  .map-item-name {
    color: #f9fafb;
  }

  .map-item-meta {
    color: #9ca3af;
  }

  .map-action-btn {
    background: transparent;
    border-color: #4b5563;
    color: #e5e7eb;
  }

  .map-action-btn:hover {
    background: #374151;
    border-color: #6b7280;
  }

  .empty-state h3,
  .error-state h3 {
    color: #f9fafb;
  }

  .empty-state p,
  .error-state p {
    color: #9ca3af;
  }

  .maps-pagination {
    border-top-color: #374151;
  }

  .page-info {
    color: #9ca3af;
  }
}
