.full-viewport-container {
  min-height: 100vh; /* Full viewport height */
  width: 100vw;
  position: relative;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden;
}

.graph-container-full {
  width: 100%;
  height: 100vh; /* Full viewport height */
  position: relative;
  overflow: hidden; /* Prevent scrollbars while allowing zoom/pan */
}

/* Side Menu Container with Toggle Button */
.side-menu {
  position: fixed !important;
  top: 68px !important;
  left: 12px !important;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s ease;
  /* Start with only toggle button visible on the right */
  transform: translateX(-330px);
  opacity: 1;
  pointer-events: all;
}

.side-menu.expanded {
  transform: translateX(0);
  opacity: 1;
  pointer-events: all;
}

/* Side Menu Toggle Button - Positioned on the right side */
.side-menu-toggle-btn {
  position: absolute !important;
  right: -70px !important;
  top: 0;
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6) !important;
  border-radius: 20px;
  padding: 8px 16px;
  color: #2c3e50;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  z-index: 1060;
  font-weight: 500;
}

.side-menu-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
  color: #2c3e50;
}

/* Side Menu Cards */
.side-menu-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  min-width: 220px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.side-menu-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.9);
}

.side-menu-card .card-header {
  background: rgba(255, 255, 255, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  padding: 12px 16px 8px 16px;
  border-radius: 20px 20px 0 0;
}

.side-menu-card .card-body {
  padding: 16px;
}

/* Ensure consistent button styling in side menu */
.side-menu-card .btn {
  font-size: 0.875rem;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.side-menu-card .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Ensure consistent filter styling in side menu */
.side-menu-card .filter-item {
  margin-bottom: 0;
}

.side-menu-card .switch-label {
  font-size: 0.875rem;
}

/* Animated Switch Styles */
.filter-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.switch-label {
  margin-bottom: 0;
  cursor: pointer;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s ease;
  border-radius: 24px;
}

.switch:hover .slider {
  background-color: #b3b3b3;
}

.switch:hover input:checked + .slider {
  background-color: #229954;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s ease;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
  background-color: var(--lineage-green, #11451e);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--lineage-green, #11451e);
}

.admin-nav-container {
  position: fixed !important;
  bottom: 12px !important;
  left: 12px !important;
  z-index: 1050;
  display: flex;
  flex-direction: row;
  gap: 8px;
}

.lineage-container {
    background: transparent;
}
.node {
    cursor: pointer;
    transition: all 0.3s ease;
}
.node:active {
    cursor: pointer;
}
.node:hover {
    stroke-width: 3px;
}
/* Node label styles - font-size, fill, and dy are set dynamically via JavaScript */
.node-label {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 500;
    text-anchor: middle;
    pointer-events: none;
    dominant-baseline: middle;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

/* Link styles - stroke-width and stroke color are set dynamically via JavaScript */
.link {
    fill: none;
}
.link.dashed {
    stroke-dasharray: 5,5;
}

/* Link label styles - font-size and fill are set dynamically via JavaScript */
.link-label {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-anchor: middle;
    pointer-events: none;
    dominant-baseline: middle;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}
.tooltip {
    position: absolute;
    background: rgba(252, 250, 245, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 12px;
    pointer-events: none;
    box-shadow: 0 8px 32px rgba(44, 62, 80, 0.15);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    z-index: 1000;
}
.tooltip h6 {
    margin: 0 0 4px 0;
    font-weight: 600;
    color: #2c3e50;
}
.tooltip p {
    margin: 2px 0;
    color: #5d6d7e;
}
.admin-nav-btn {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    color: #2c3e50 !important;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 20px;
    padding: 8px 16px;
}
.admin-nav-btn:hover {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #2c3e50 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
} 

/* Floating menu button (mobile only) */
.floating-menu-btn {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1100;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  color: #2c3e50;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, box-shadow 0.2s;
  padding: 0;
}
.floating-menu-btn span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}
.floating-menu-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.floating-menu-btn:active, .floating-menu-btn:focus {
  background: rgba(255, 255, 255, 0.95);
  outline: none;
}

/* Modal overlay for mobile menu */
.mobile-menu-modal {
  display: none;
  position: fixed;
  z-index: 1200;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(44,62,80,0.35);
  backdrop-filter: blur(2px);
  align-items: center;
  justify-content: center;
}
.mobile-menu-modal-content {
  background: linear-gradient(135deg, #fcfaf5 90%, #f8f6f0 100%);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(44,62,80,0.18);
  padding: 24px 16px 16px 16px;
  max-width: 90vw;
  margin: 0 auto;
  position: relative;
}
.close-mobile-menu {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #2c3e50;
  cursor: pointer;
  z-index: 2;
}
.mobile-menu-legend-controls {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.legend-visualization-mobile {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  min-width: 0;
}
.visualization-controls-mobile .btn {
  font-size: 1.1rem;
  padding: 12px 0;
  margin-bottom: 10px;
}

.visualization-filters-mobile {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  min-width: 0;
}

.visualization-filters-mobile .filter-item {
  margin-bottom: 12px;
}

.visualization-filters-mobile .switch {
  width: 48px;
  height: 26px;
}

.visualization-filters-mobile .slider:before {
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
}

.visualization-filters-mobile input:checked + .slider:before {
  transform: translateX(22px);
}

/* Shared styles for co-consecrator dropdown */
.co-consecrators-container {
    position: relative;
}

.co-consecrator-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: max-content;
    min-width: 100%;
    max-width: 400px;
    z-index: 1000;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.truncate-cell {
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {
  .full-viewport-container {
    min-height: 100vh; /* Full viewport height */
  }
  .graph-container-full {
    height: 100vh; /* Full viewport height */
  }
  .side-menu {
    top: 68px !important;
  }
  .floating-menu-btn {
    display: flex !important;
  }
  .mobile-menu-modal {
    display: flex;
  }
  .side-menu {
    display: none !important;
  }
} 

/* Right Side Aside - Clergy Information Panel */
.clergy-aside {
  position: fixed !important;
  top: 68px !important;
  right: 12px !important;
  z-index: 1050;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  width: 320px;
  height: calc(100vh - 68px - 24px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.clergy-aside.expanded {
  transform: translateX(0);
  opacity: 1;
  pointer-events: all;
}

/* Draggable Clergy Info Windows */
.clergy-window {
  position: absolute;
  width: 320px;
  max-height: 80vh;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  pointer-events: all;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.clergy-window-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(189, 195, 199, 0.2);
  background: rgba(255, 255, 255, 0.5);
  cursor: move;
  user-select: none;
  flex-shrink: 0;
}

.clergy-window-title {
  font-weight: 600;
  font-size: 1rem;
  color: #2c3e50;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clergy-window-close {
  background: transparent;
  border: none;
  color: #2c3e50;
  cursor: pointer;
  font-size: 1.5rem;
  padding: 0;
  transition: all 0.2s ease;
  z-index: 10;
  font-weight: bold;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
  margin-left: 8px;
}

.clergy-window-close:hover {
  color: #e74c3c;
}

.clergy-window-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 0 16px 0;
}

.clergy-window-content .aside-content {
  padding: 0;
}

.clergy-window-content .aside-content > *:not(.clergy-image-container) {
  padding-left: 16px;
  padding-right: 16px;
}

/* Ensure windows can be scrolled */
.clergy-window-content::-webkit-scrollbar {
  width: 8px;
}

.clergy-window-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

.clergy-window-content::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.clergy-window-content::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}






.close-aside-btn-overlay {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #2c3e50;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 6px 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-weight: bold;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-aside-btn-overlay:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.8);
  color: #2c3e50;
  transform: scale(1.1);
  text-shadow: 0 2px 6px rgba(0,0,0,1);
}

.edit-clergy-btn-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #2c3e50;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 6px 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-weight: bold;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.edit-clergy-btn-overlay:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.8);
  color: #2c3e50;
  transform: scale(1.1);
}

.clergy-aside .aside-content {
  padding: 0 0 16px 0;
}

.clergy-aside .aside-content > *:not(.clergy-image-container) {
  padding-left: 16px;
  padding-right: 16px;
}

.relationship-item {
  font-size: 0.8rem;
  line-height: 1.3;
}

.relationship-item strong {
  font-size: 0.8rem;
  color: #2c3e50;
}



.clergy-image-container {
  text-align: center;
  margin: 0;
  width: 100%;
  height: 280px;
  overflow: hidden;
  border-radius: 0;
  position: relative;
  border: none;
}

.clergy-window .clergy-image-container {
  border-radius: 0;
}

.clergy-aside-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
  box-shadow: none;
}

/* Dates Section */
.dates-section {
  border-top: 1px solid rgba(189, 195, 199, 0.1);
  padding: 8px 0;
  margin-top: 0;
}

.date-item {
  padding: 2px;
}

.date-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 2px;
}

.date-label {
  font-size: 0.7rem;
  color: #7f8c8d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.clergy-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(189, 195, 199, 0.1);
}

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

.detail-label {
  font-weight: 600;
  color: #2c3e50;
  font-size: 0.875rem;
}

.detail-value {
  color: #34495e;
  font-size: 0.875rem;
  text-align: right;
  max-width: 150px;
  word-wrap: break-word;
}

/* Info Section */
.info-section {
  border-top: 1px solid rgba(189, 195, 199, 0.1);
  padding-top: 8px;
}

.bio-content {
  color: #34495e;
  font-size: 0.875rem;
  line-height: 1.5;
  max-height: 200px;
  overflow-y: auto;
}

@media (min-width: 769px) {
  .floating-menu-btn, .mobile-menu-modal {
    display: none !important;
  }
}

/* Timeline styling */
.timeline {
  pointer-events: none;
}

.timeline line {
  pointer-events: none;
}

.timeline text {
  pointer-events: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  user-select: none;
  font-weight: 500;
}

/* Fixed timeline styling */
.timeline-fixed {
  pointer-events: none;
  transform-origin: 0 0;
}

.timeline-fixed line {
  pointer-events: none;
}

.timeline-fixed text {
  pointer-events: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  user-select: none;
  font-weight: 500;
}

/* Search functionality styles */
.search-results {
  max-height: 200px;
  overflow-y: auto;
  background: white;
  border: 1px solid rgba(189, 195, 199, 0.3);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-result-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(189, 195, 199, 0.2);
  transition: background-color 0.2s ease;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover,
.search-result-item.selected {
  background-color: rgba(39, 174, 96, 0.1);
}

.search-result-name {
  font-weight: 500;
  color: #2c3e50;
}

.search-result-details {
  font-size: 0.85em;
  color: #7f8c8d;
  margin-top: 2px;
}

.search-no-results {
  padding: 12px;
  text-align: center;
  color: #7f8c8d;
}

/* Highlight search matches */
.search-result-name mark {
  background-color: rgba(255, 193, 7, 0.3);
  color: inherit;
  padding: 0;
  border-radius: 2px;
}

/* Search input group styling */
.input-group .form-control:focus {
  border-color: #27ae60;
  box-shadow: 0 0 0 0.2rem rgba(39, 174, 96, 0.25);
}

.input-group .btn-outline-secondary {
  border-left: 0;
}

/* Search Bar Overlay Styles */
.search-bar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.search-bar-overlay.show {
  opacity: 1;
}

.search-bar-container {
  width: 90%;
  max-width: 600px;
  position: relative;
  transform: translateY(-20px);
  transition: transform 0.2s ease;
}

.search-bar-overlay.show .search-bar-container {
  transform: translateY(0);
}

.search-bar-input-group {
  position: relative;
  display: flex;
  align-items: center;
  background: white;
  border-radius: 50px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  border: 2px solid transparent;
  transition: all 0.2s ease;
  overflow: hidden;
  outline: none;
}

.search-bar-input-group:focus-within {
  border-color: #27ae60;
  box-shadow: 0 8px 32px rgba(39, 174, 96, 0.2);
  outline: none;
}

/* When dropdown is visible, remove bottom border radius for seamless transition */
.search-bar-input-group.has-dropdown {
  border-radius: 25px 25px 0 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.search-bar-input-group.has-dropdown:focus-within {
  box-shadow: 0 4px 16px rgba(39, 174, 96, 0.15);
}

.search-bar-icon {
  position: absolute;
  right: 50px;
  color: #6c757d;
  font-size: 1rem;
  z-index: 1;
  pointer-events: none;
}

.search-bar-input {
  flex: 1 !important;
  border: none !important;
  outline: none !important;
  padding: 16px 90px 16px 24px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  font-family: 'SF Pro Text', 'Inter', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif !important;
  line-height: 1.4 !important;
  background: transparent !important;
  color: #2c3e50 !important;
  margin: 0 !important;
  width: auto !important;
  box-sizing: border-box !important;
}

.search-bar-input:focus {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  font-size: 16px !important;
  font-weight: 600 !important;
}

.search-bar-input::placeholder {
  color: #adb5bd;
  font-weight: 400;
}

.search-bar-clear {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
  z-index: 1;
}

.search-bar-clear:hover {
  background: #f8f9fa;
  color: #495057;
}

.search-bar-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-radius: 25px 25px 25px 25px;
  box-shadow: none;
  border: 2px solid #e9ecef;
  border-top: none;
  max-height: 400px;
  overflow-y: auto;
  z-index: 10;
  margin-top: -2px;
  transition: border-radius 0.2s ease;
}

/* When search bar has dropdown, remove top border radius for seamless connection */
.search-bar-input-group.has-dropdown + .search-bar-results {
  border-radius: 0 0 25px 25px;
}

.search-bar-input-group:focus-within + .search-bar-results {
  border-color: #27ae60;
}

.search-bar-results .search-result-item {
  padding: 16px 24px;
  cursor: pointer;
  border-bottom: 1px solid #f8f9fa;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.search-bar-results .search-result-item:last-child {
  border-bottom: none;
  border-radius: 0 0 18px 18px;
}

.search-bar-results .search-result-item:hover,
.search-bar-results .search-result-item.selected {
  background-color: rgba(39, 174, 96, 0.08);
  transform: translateX(4px);
}

.search-bar-results .search-result-name {
  font-weight: 600;
  color: #2c3e50;
  font-size: 16px;
  font-family: 'SF Pro Text', 'Inter', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.4;
  margin-bottom: 4px;
}

.search-bar-results .search-result-details {
  font-size: 0.85rem;
  color: #6c757d;
}

.search-bar-results .search-no-results {
  padding: 40px 24px;
  text-align: center;
  color: #6c757d;
  font-style: italic;
}

/* Highlight search matches in search bar */
.search-bar-results .search-result-name mark {
  background-color: rgba(255, 193, 7, 0.4);
  color: inherit;
  padding: 2px 4px;
  border-radius: 4px;
  font-weight: 700;
}

/* Mobile responsive adjustments for search bar */
@media (max-width: 768px) {
  .search-bar-overlay {
    padding-top: 80px;
  }
  
  .search-bar-container {
    width: 95%;
    max-width: none;
  }
  
  .search-bar-input {
    padding: 16px 70px 16px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
  }
  
  .search-bar-icon {
    right: 40px;
    font-size: 1rem;
  }
  
  .search-bar-clear {
    right: 12px;
  }
  
  .search-bar-results .search-result-item {
    padding: 14px 20px;
  }
}

.input-group .btn-outline-secondary:hover {
  background-color: #dc3545;
  border-color: #dc3545;
  color: white;
}

/* Status Badge Styles for Visualization */
.status-badge {
  transition: all 0.2s ease;
}

.status-badge-circle {
  transition: all 0.2s ease;
}

.status-badge:hover {
  transform: scale(1.1);
}

/* Status Indicators Panel in Info Aside */
.status-indicators-panel {
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 8px;
}

.status-badge-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  margin: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  font-size: 11px;
  color: #fff;
  transition: all 0.2s ease;
}

.status-badge-item:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.status-badge-item i {
  font-size: 10px;
}

/* Status Toggle Styles for Form */
.status-toggle-item {
  transition: all 0.2s ease;
}

.status-toggle-item:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  transform: translateX(2px);
}

.status-toggle-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.status-toggle-item input[type="checkbox"]:checked + label {
  font-weight: 500;
}

/* Status indicators in editor clergy list */
.clergy-status-badges {
  display: inline-flex;
  gap: 4px;
  margin-left: 8px;
}

.clergy-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 8px;
  color: #fff;
}

.clergy-status-more {
  font-size: 9px;
  color: #666;
  font-weight: 500;
}

/* Bottom Filter Menu */
.lineage-filter-menu {
  position: fixed !important;
  bottom: 12px !important;
  left: 12px !important;
  right: 12px !important;
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
}

.filter-menu-content {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  padding: 8px 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.filter-menu-content:hover {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.filter-menu-item {
  display: flex;
  align-items: center;
  position: relative;
}

.filter-menu-item.dropdown {
  position: relative;
}

.filter-toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  margin: 0;
}

.filter-label-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: #2c3e50;
  white-space: nowrap;
}

.filter-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.filter-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.filter-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s ease;
  border-radius: 24px;
}

.filter-switch:hover .filter-slider {
  background-color: #b3b3b3;
}

.filter-switch:hover input:checked + .filter-slider {
  background-color: #229954;
}

.filter-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s ease;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.filter-switch input:checked + .filter-slider {
  background-color: var(--lineage-green, #11451e);
}

.filter-switch input:checked + .filter-slider:before {
  transform: translateX(20px);
}

.filter-switch input:focus + .filter-slider {
  box-shadow: 0 0 1px var(--lineage-green, #11451e);
}

.filter-dropdown-btn {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.filter-dropdown-menu {
  position: absolute !important;
  bottom: calc(100% + 8px) !important;
  top: auto !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  min-width: 200px;
  max-width: 90vw;
  max-height: min(300px, calc(100vh - 120px));
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6) !important;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  padding: 8px 0;
  display: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 1060 !important;
}

.filter-dropdown-menu.show {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateX(-50%) !important;
}

.filter-dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  color: #2c3e50;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
  cursor: pointer;
  border: none;
  background: none;
  text-align: left;
}

.filter-dropdown-item:hover {
  background-color: rgba(39, 174, 96, 0.1);
  color: #2c3e50;
}

.filter-dropdown-item.active {
  background-color: rgba(39, 174, 96, 0.15);
  font-weight: 500;
}

.filter-dropdown-menu .dropdown-divider {
  height: 1px;
  margin: 4px 0;
  overflow: hidden;
  background-color: rgba(44, 62, 80, 0.1);
}

/* Mobile responsiveness for filter menu */
@media (max-width: 768px) {
  .lineage-filter-menu {
    bottom: 12px !important;
    left: 12px !important;
    right: 12px !important;
  }

  .filter-menu-content {
    flex-wrap: wrap;
    justify-content: flex-start;
    padding: 8px 12px;
    gap: 8px;
  }

  .filter-menu-item {
    flex: 1 1 auto;
    min-width: fit-content;
  }

  .filter-label-text {
    font-size: 0.85rem;
  }

  .filter-dropdown-menu {
    left: 0;
    right: 0;
    bottom: calc(100% + 8px);
    transform: translateX(0) translateY(-10px);
    min-width: auto;
    max-width: 100%;
  }

  .filter-dropdown-menu.show {
    transform: translateX(0) translateY(0);
  }
}

/* Visualization Style Panel */
.viz-style-toggle-btn {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 10000 !important;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  font-size: 1rem;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  pointer-events: auto !important;
}

.viz-style-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Button positioning handled by JavaScript when panel opens/closes */

.viz-style-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 40%;
  background: rgba(43, 46, 50, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 1055;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.viz-style-panel.hidden {
  display: none;
  transform: translateY(100%);
}

.viz-style-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75em 1em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

.viz-style-panel-header h6 {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9em;
  font-weight: 600;
}

.viz-style-close-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 1.2em;
  padding: 0.25em 0.5em;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.viz-style-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 1);
}

.viz-style-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 1em;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1em;
}

.viz-style-section {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.75em;
}

.viz-style-section-title {
  margin: 0 0 0.75em 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.85em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.viz-style-control {
  margin-bottom: 0.75em;
}

.viz-style-control:last-child {
  margin-bottom: 0;
}

.viz-style-control label {
  display: block;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8em;
  margin-bottom: 0.25em;
  font-weight: 500;
}

.viz-color-picker {
  width: 100%;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  cursor: pointer;
  background: transparent;
}

.viz-slider {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.viz-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.viz-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.viz-style-section:has(.viz-style-save-btn) {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.viz-style-save-btn {
  width: 100%;
  padding: 0.5em 1em;
  background: rgba(39, 174, 96, 0.8);
  border: 1px solid rgba(39, 174, 96, 0.6);
  border-radius: 4px;
  color: white;
  font-size: 0.85em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.viz-style-save-btn:hover {
  background: rgba(39, 174, 96, 1);
  border-color: rgba(39, 174, 96, 0.8);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

.viz-style-reset-btn {
  width: 100%;
  padding: 0.5em 1em;
  background: rgba(231, 76, 60, 0.8);
  border: 1px solid rgba(231, 76, 60, 0.6);
  border-radius: 4px;
  color: white;
  font-size: 0.85em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.viz-style-reset-btn:hover {
  background: rgba(231, 76, 60, 1);
  border-color: rgba(231, 76, 60, 0.8);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.viz-style-note {
  font-size: 0.75em;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 0.5em 0;
  line-height: 1.3;
}

.viz-metadata-toggle-btn {
  width: 100%;
  padding: 0.5em 1em;
  background: rgba(52, 152, 219, 0.8);
  border: 1px solid rgba(52, 152, 219, 0.6);
  border-radius: 4px;
  color: white;
  font-size: 0.85em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
}

.viz-metadata-toggle-btn:hover {
  background: rgba(52, 152, 219, 1);
  border-color: rgba(52, 152, 219, 0.8);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

/* Editor Graph Container - specific to editor panel */
.editor-graph-container {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: transparent;
}

/* Error message styling for editor visualization */
.viz-error-message {
  padding: 2em;
  text-align: center;
  color: rgba(255, 100, 100, 0.9);
  background: #1a1a1a;
}

.viz-error-message i {
  font-size: 2em;
  margin-bottom: 0.5em;
  display: block;
} 