.map-admin-container {
    position: relative;
    width: 100%;
    height: 100vh;
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
}

/* Landing Page Navigation Bar - With Ruda Font */
.navigation-bar {
    position: fixed;
    top: 10px;
    left: 10px;
    right: 10px;
    z-index: 1000;
    pointer-events: none; /* Allow clicks to pass through to background */
}

.navigation-bar .nav-content {
    border-radius: 12px;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: auto; /* Re-enable pointer events for the nav content */
}

.navigation-bar .nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.navigation-bar .logo-image {
    width: auto;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
}

.navigation-bar .logo-text {
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    display: none; /* Hidden by default, shown if image fails */
}

.navigation-bar .nav-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.navigation-bar .nav-button {
    background: none;
    border: none;
    color: #fff;
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.navigation-bar .nav-button:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.navigation-bar .nav-title {
    color: #fff !important;
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    white-space: nowrap;
    display: block;
    opacity: 1;
    visibility: visible;
}

/* Mobile responsive styles for landing page navigation */
@media (max-width: 768px) {
    .navigation-bar .nav-content {
        padding: 10px 16px;
    }
    
    .navigation-bar .logo-image {
        height: 40px;
    }
    
    .navigation-bar .nav-actions {
        gap: 8px;
    }
    
    .navigation-bar .nav-button {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .navigation-bar .nav-title {
        font-size: 0.9rem;
        margin-left: 8px;
        padding-left: 8px;
    }
}

/* Top Navigation Bar - Theme Aware */
.top-navigation-bar {
    position: fixed;
    top: 10px;
    left: 10px;
    right: 10px;
    z-index: 9999; /* Increased z-index to ensure it's always on top */
    pointer-events: none; /* Allow clicks to pass through to background */
}

.top-navigation-bar .nav-content {
    background: var(--color-background, white);
    border-radius: var(--border-radius-large, 12px);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: auto; /* Re-enable pointer events for the nav content */
    box-shadow: var(--shadow-medium, 0 4px 20px rgba(0, 0, 0, 0.15)); /* Enhanced shadow for better elevation */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--color-border-light, rgba(255, 255, 255, 0.2)); /* Added subtle border for better definition */
}

.top-navigation-bar .nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-navigation-bar .logo-image {
    width: auto;
    height: 40px;
    border-radius: var(--border-radius-medium, 6px);
    object-fit: cover;
}

.top-navigation-bar .logo-text {
    font-family: var(--font-family, 'Inter', sans-serif);
    font-size: var(--font-size-xl, 1.1rem);
    font-weight: var(--font-weight-semibold, 600);
    color: var(--color-text-primary, #333);
    display: none; /* Hidden by default, shown if image fails */
}

.top-navigation-bar .nav-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.top-navigation-bar .nav-button {
    background: none;
    border: none;
    color: var(--color-text-primary, #333);
    font-family: var(--font-family, 'Inter', sans-serif);
    font-weight: var(--font-weight-medium, 500);
    padding: 8px 16px;
    border-radius: var(--border-radius-medium, 8px);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 1rem;
}

.top-navigation-bar .nav-button:hover {
    background: var(--color-hover-background, rgba(0, 0, 0, 0.05));
    color: var(--color-text-primary, #333);
}

.top-navigation-bar .nav-button:active,
.top-navigation-bar .nav-button.active {
    border: 1px solid #a9a9a9;
    color: rgb(76, 76, 76);
}

/* Mobile-first responsive design */
.top-navigation-bar .desktop-nav {
    display: none; /* Hide desktop nav by default */
}

.mobile-menu-button {
    display: none; /* Hide mobile menu button by default */
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--color-text-primary, #333);
    border-radius: var(--border-radius-medium, 8px);
    transition: all 0.2s ease;
}

.mobile-menu-button:hover {
    background: var(--color-hover-background, rgba(0, 0, 0, 0.05));
}

.hamburger-icon {
    transition: transform 0.3s ease;
}

.hamburger-icon.open {
    transform: rotate(90deg);
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -280px; /* Start off-screen */
    width: 280px;
    height: 100vh;
    background: var(--color-background, white);
    box-shadow: var(--shadow-large, 0 8px 32px rgba(0, 0, 0, 0.2));
    z-index: 1000;
    transition: right 0.3s ease;
    border-left: 1px solid var(--color-border-light, #e5e7eb);
}

.mobile-menu.open {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border-light, #e5e7eb);
}

.mobile-menu-header h3 {
    margin: 0;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--color-text-primary, #333);
}

.mobile-menu-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--color-text-secondary, #666);
    border-radius: var(--border-radius-small, 4px);
    transition: all 0.2s ease;
}

.mobile-menu-close:hover {
    background: var(--color-hover-background, rgba(0, 0, 0, 0.05));
    color: var(--color-text-primary, #333);
}

.mobile-menu-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    pointer-events: auto;
    position: relative;
    z-index: 10002;
}

.mobile-nav-button {
    background: none;
    border: none;
    color: var(--color-text-primary, #333);
    font-family: var(--font-family, 'Inter', sans-serif);
    font-size: 18px;
    font-weight: var(--font-weight-medium, 500);
    padding: 16px 20px;
    border-radius: var(--border-radius-medium, 8px);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    border: 1px solid transparent;
    width: 100%;
    display: block;
    pointer-events: auto;
}

.mobile-nav-button:hover {
    background: var(--color-hover-background, rgba(0, 0, 0, 0.05));
}

.mobile-nav-button.active {
    background: var(--color-primary, #3b82f6);
    color: white;
    border-color: var(--color-primary, #3b82f6);
}

.mobile-nav-button:focus {
    outline: 2px solid var(--color-primary, #3b82f6);
    outline-offset: 2px;
}



/* Desktop styles */
@media (min-width: 769px) {
    .top-navigation-bar .desktop-nav {
        display: flex; /* Show desktop nav on larger screens */
    }
    
    .mobile-menu-button {
        display: none; /* Hide mobile menu button on desktop */
    }
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .top-navigation-bar {
        top: 10px;
        left: 10px;
        right: 10px;
        z-index: 9999; /* Maintain highest z-index on mobile */
    }
    
    .top-navigation-bar .nav-content {
        padding: 10px 16px;
    }
    
    .top-navigation-bar .logo-image {
        height: 28px;
    }
    
    .mobile-menu-button {
        display: flex; /* Show mobile menu button on mobile */
        align-items: center;
        justify-content: center;
    }
    
    /* Touch optimizations for mobile */
    .mobile-nav-button {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        min-height: 48px; /* Minimum touch target size */
        pointer-events: auto;
    }
    
    .mobile-menu-button {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        min-height: 44px;
        min-width: 44px;
        pointer-events: auto;
    }
    
    .mobile-menu {
        z-index: 1000;
    }
    
    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }
}

/* Protect marker opacity from being changed */
.location-marker.no-opacity-change {
    opacity: 1 !important;
    transition: none !important;
}

.map-container {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
}

.control-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 1;
    width: 300px;
    overflow: hidden;
}

.card {
    border-bottom: 1px solid #eee;
}

.card:last-child {
    border-bottom: none;
}

.header {
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    margin: 0;
    font-size: 1.2em;
    color: #333;
}

.upload-container {
    position: relative;
}

.upload-button {
    background: #4CAF50;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.upload-button:hover {
    background: #45a049;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.collections-list {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.collection-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.collection-info {
    flex: 1;
}

.collection-name {
    font-weight: bold;
    margin-bottom: 3px;
    font-size: 0.95em;
}

.collection-count {
    font-size: 0.85em;
    color: #666;
}

.collection-controls {
    display: flex;
    gap: 8px;
}

.control-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-button:hover {
    background: #f5f5f5;
}

.control-button.delete {
    color: #dc3545;
}

.control-button.view {
    color: #007bff;
}

.mapboxgl-popup {
    max-width: 300px;
}

.mapboxgl-popup-content {
    padding: 15px;
}

.lines-list {
    position: absolute;
    top: 20px;
    left: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    padding: 15px;
    max-width: 300px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    z-index: 1;
}

.lines-list h2 {
    margin: 0 0 15px 0;
    font-size: 1.2em;
    color: #333;
}

.lines-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.line-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 4px;
    background: #f8f9fa;
    transition: background-color 0.2s;
}

.line-item:hover {
    background: #e9ecef;
}

.line-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
}

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

.line-info h3 {
    margin: 0;
    font-size: 0.95em;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.line-details {
    margin: 5px 0 0 0;
    font-size: 0.8em;
    color: #666;
    display: flex;
    gap: 10px;
}

.line-details .system,
.line-details .status {
    padding: 2px 6px;
    border-radius: 3px;
    background: #e9ecef;
}

.lines-list.loading,
.lines-list.error {
    padding: 20px;
    text-align: center;
    color: #666;
}

/* Floating Actions Component Styles */
.floating-actions-container {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 400px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 1000;
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
}

.floating-actions-header {
    background: #f8f9fa;
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.floating-actions-header:hover {
    background: #e9ecef;
}

.floating-actions-toggle-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s ease;
}

.floating-actions-toggle-button:hover {
    background: #d1d5db;
    color: #374151;
}

.floating-actions-chevron {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.floating-actions-chevron.expanded {
    transform: rotate(180deg);
}

.floating-actions-chevron.collapsed {
    transform: rotate(0deg);
}

.floating-actions-title {
    font-size: 14px;
    font-weight: 600;
    color: #242424;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
}

.close-floating-actions-button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    color: #6b7280;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.close-floating-actions-button:hover {
    background: #e5e7eb;
}

.floating-actions-content {
    padding: 20px;
}

.floating-actions-section {
    margin-bottom: 20px;
}

.floating-actions-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 20px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
}

.floating-actions-description {
    color: #6b7280;
    font-size: 13px;
    line-height: 1.3;
    margin-bottom: 16px;
    font-weight: 400;
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
}

.divider {
    width: 100%;
    height: 1px;
    background: #e5e7eb;
    margin: 16px 0;
    border-radius: 1px;
}

.floating-actions-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.floating-action-button {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 12px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
}

.floating-action-button:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.floating-action-button:active {
    background: #f3f4f6;
    transform: translateY(1px);
}

.floating-action-button .button-icon {
    font-size: 20px;
    color: #374151;
}

.floating-action-button .button-text {
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    text-align: center;
    line-height: 1.2;
}

.floating-action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #374151;
}

.floating-action-icon svg {
    width: 30px;
    height: 30px;
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid #e0e0e0;
    border-top: 2px solid #374151;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.error-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #dc2626;
    width: 16px;
    height: 16px;
}

.floating-action-button.loading {
    opacity: 0.6;
    cursor: not-allowed;
}

.floating-action-button.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.floating-action-button.active {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af;
}

/* Specific styles for LayersListPanel buttons - horizontal layout */
#should-display-menu .floating-actions-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#should-display-menu .floating-action-button {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    padding: 12px 16px;
    gap: 12px;
    width: 100%;
}

#should-display-menu .floating-action-icon {
    flex-shrink: 0;
}

#should-display-menu .floating-action-icon svg {
    width: 24px;
    height: 24px;
}

#should-display-menu .floating-action-button span {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    line-height: 1.2;
}

/* System list styles for LayersListPanel */
#should-display-menu .system-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#should-display-menu .system-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 12px;
}

#should-display-menu .system-item:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

#should-display-menu .system-item.selected {
    background: #dbeafe;
    border-color: #3b82f6;
}

#should-display-menu .system-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

#should-display-menu .system-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

#should-display-menu .system-name {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    line-height: 1.2;
}

/* Geocoded address styles */
.geocoding-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #6b7280;
    font-size: 13px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px;
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
}

.geocoding-loading .loading-spinner {
    color: #6b7280;
    animation: spin 1s linear infinite;
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.geocoded-address {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px;
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
}

.geocoded-address .address-icon {
    color: #6b7280;
    font-size: 16px;
}

.geocoded-address .address-text {
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .floating-actions-container {
        bottom: 10px;
        left: 10px;
        font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    }

    .floating-actions-header {
        padding: 16px;
    }

    .floating-actions-title {
        font-size: 13px;
        font-weight: 600;
        font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    }

    .floating-actions-content {
        padding: 16px;
    }

    .floating-actions-buttons {
        gap: 6px;
    }

    .floating-action-button {
        padding: 10px 6px;
        min-height: 70px;
        font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    }

    .floating-action-button .button-text {
        font-size: 11px;
        font-weight: 500;
        font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    }

    .geocoded-address {
        padding: 10px;
        margin-bottom: 10px;
        font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    }

    .geocoded-address .address-text {
        font-size: 12px;
        font-weight: 500;
        font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    }

    .geocoding-loading {
        padding: 10px;
        margin-bottom: 10px;
        font-size: 12px;
        font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    }

    .floating-actions-description {
        font-size: 10px;
        margin-bottom: 12px;
        font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    }

    .divider {
        width: 100%;
        height: 2px;
        background: #b8b8b8;
        margin: 12px 0;
    }
}

/* Divider in LayersListPanel */
.floating-actions-divider {
    height: 1px;
    background-color: rgba(0, 0, 0, 0.1);
    margin: 16px 0;
    width: 100%;
}

/* Transport buttons section */
.transport-buttons {
    margin-top: 8px;
}

/* Land Analysis Component Styles */
.land-analysis-container {
    position: relative;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 1000;
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    margin-top: 10px;
    margin-bottom: 30px;
}

.land-analysis-header {
    background: #f8f9fa;
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.land-analysis-header:hover {
    background: #e9ecef;
}

.land-analysis-toggle-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s ease;
}

.land-analysis-toggle-button:hover {
    background: #d1d5db;
    color: #374151;
}

.land-analysis-chevron {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.land-analysis-chevron.expanded {
    transform: rotate(180deg);
}

.land-analysis-chevron.collapsed {
    transform: rotate(0deg);
}

.land-analysis-title {
    font-size: 14px;
    font-weight: 600;
    color: #242424;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
}

.land-analysis-content {
    padding: 20px;
}

.land-analysis-buttons {
    display: flex;
    gap: 3px;
    justify-content: space-between;
    align-items: center;
}

.land-analysis-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 4px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 50px;
    min-width: 0;
    flex: 1;
    gap: 4px;
}

.land-analysis-button:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
}

.land-analysis-button.selected {
    background-color: #FFF3E0;
    border-color: #FFA500;
    box-shadow: 0 0 0 1px #FFA500;
}

.land-analysis-button.selected:hover {
    background-color: #FFE0B2;
}

/* Disabled land analysis button state */
.land-analysis-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #F3F4F6;
    border-color: #E5E7EB;
}

.land-analysis-button.disabled:hover {
    background: #F3F4F6;
    border-color: #E5E7EB;
}

.land-analysis-button.disabled .land-analysis-icon {
    color: #9CA3AF;
}

.land-analysis-button.disabled span {
    color: #6B7280;
}

.land-analysis-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #374151;
}

.land-analysis-icon svg {
    width: 24px;
    height: 24px;
}

.land-analysis-button span {
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    text-align: center;
    line-height: 1.2;
}

.land-analysis-vertical-separator {
    width: 1px;
    height: 30px;
    background: #e5e7eb;
    margin: 0 2px;
    flex-shrink: 0;
}

.land-analysis-divider {
    height: 1px;
    background-color: #e5e7eb;
    margin: 16px 0;
    width: 100%;
}

.radius-selector-content {
    padding: 0 16px;
}

.radius-buttons {
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.radius-button {
    flex: 1;
    padding: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    color: #374151;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.radius-button:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.radius-button.active {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af;
}

/* Mobile responsive styles for Land Analysis */
@media (max-width: 768px) {
    .land-analysis-container {
        bottom: 10px;
        font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    }

    .land-analysis-header {
        padding: 16px;
    }

    .land-analysis-title {
        font-size: 13px;
        font-weight: 600;
        font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    }

    .land-analysis-content {
        padding: 16px;
    }

    .land-analysis-buttons {
        gap: 3px;
    }

    .land-analysis-button {
        padding: 5px 3px;
        min-height: 45px;
        font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    }

    .land-analysis-icon svg {
        width: 18px;
        height: 18px;
    }

    .land-analysis-button span {
        font-size: 9px;
        font-weight: 500;
        font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    }

    .land-analysis-vertical-separator {
        height: 25px;
        margin: 0 1px;
    }
} 

/* Land Analysis Selected View */
.land-analysis-selected-view {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 12px 0px;
    width: 100%;
}

.land-analysis-back-button {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
    color: #374151;
}

.land-analysis-back-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.land-analysis-selected-info {
    flex: 1;
    text-align: right;
}

.land-analysis-selected-title {
    font-size: 20px;
    margin: 0 30px;
    font-weight: 500;
    color: #374151;
}

.land-analysis-selected-description {
    font-size: 12px;
    margin: 8px 30px 0;
    color: #6B7280;
    line-height: 1.4;
}

/* Vertical Panel Wrapper - Container for spacer and panel */
.vertical-panel-wrapper {
    position: absolute;
    bottom: 0px;
    left: 20px;
    width: 400px;
    z-index: 1000;
    max-height: 100vh;
    overflow: hidden;
    pointer-events: none; /* Allow clicks to pass through to map */
}

.vertical-panel-wrapper > * {
    pointer-events: auto; /* Re-enable pointer events for child elements */
}

/* Vertical Panel Container Styles */
.vertical-panel-container {
    position: absolute;
    bottom: 0px;
    left: 20px;
    width: 400px;
    z-index: 1000;
    max-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.vertical-panel-content {
    display: flex;
    flex-direction: column;
    flex: 1; /* Take remaining space after Spacer */
    min-height: 0; /* Allow flex item to shrink below content size */
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    /* Ensure content doesn't go behind the top navigation */
    max-height: calc(100vh - 160px); /* Account for spacer (100px) + nav bar + margins */
}

.vertical-panel-content::-webkit-scrollbar {
    display: none;
}

/* Update LayersListPanel to work within the container */
.vertical-panel-container .floating-actions-container {
    position: relative;
    bottom: auto;
    left: auto;
    width: 100%;
    margin-bottom: 15px;
}

.vertical-panel-container .floating-actions-container:last-child {
    margin-bottom: 0;
}

/* Ensure proper spacing for all panel components within vertical panel */
.vertical-panel-container .floating-actions-container,
.vertical-panel-container .land-analysis-container {
    margin-bottom: 15px;
    margin-top: 0; /* Remove top margin to align with other elements */
}

.vertical-panel-container .floating-actions-container:last-child,
.vertical-panel-container .land-analysis-container:last-child {
    margin-bottom: 0;
}

/* Mobile responsive styles for LayersListPanel */
@media (max-width: 768px) {
    /* Mobile layout for LayersListPanel - Single horizontal scrollable container */
    #should-display-menu .floating-actions-buttons.mobile-layout {
        display: block;
    }

    .mobile-single-scroll-container {
        width: 100% !important;
        max-width: none !important;
        overflow: hidden;
    }

    .mobile-buttons-scroll-all {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 4px 0 12px 0;
        scrollbar-width: none;
        -ms-overflow-style: none;
        scroll-behavior: smooth;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        width: 100% !important;
        align-items: center;
    }

    .mobile-buttons-scroll-all::-webkit-scrollbar {
        display: none;
    }

    .floating-action-button.mobile-button {
        flex: 0 0 auto;
        width: auto;
        min-width: auto;
        padding: 8px 6px;
        border-radius: 8px;
        gap: 4px;
        scroll-snap-align: start;
        transition: all 0.2s ease;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .floating-action-button.mobile-button span {
        font-size: 10px;
        font-weight: 500;
        line-height: 1.1;
        text-align: center;
        color: #374151;
        white-space: nowrap;
        padding: 0;
        display: inline-block;
    }

    .floating-action-button.mobile-button .floating-action-icon {
        flex-shrink: 0;
        margin-bottom: 2px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: auto;
    }

    .floating-action-button.mobile-button .floating-action-icon svg {
        width: 20px;
        height: 20px;
    }

    /* Visual separators between button groups */
    .mobile-separator {
        width: 1px;
        height: 35px;
        background: #e5e7eb;
        border-radius: 0.5px;
        flex-shrink: 0;
        margin: 0 4px;
        align-self: center;
    }

    /* Primary indicators styling */
    .floating-action-button.mobile-button.primary {
        border: 1px solid #d1d5db;
        background: #ffffff;
    }

    .floating-action-button.mobile-button.primary .floating-action-icon {
        color: #374151;
    }

    .floating-action-button.mobile-button.primary span {
        color: #374151;
        font-weight: 500;
    }

    /* Transport buttons styling */
    .floating-action-button.mobile-button.transport {
        border: 1px solid #d1d5db;
        background: #ffffff;
    }

    .floating-action-button.mobile-button.transport .floating-action-icon {
        color: #374151;
    }

    .floating-action-button.mobile-button.transport span {
        color: #374151;
        font-weight: 500;
    }

    /* Coming soon mobile buttons styling */
    .floating-action-button.mobile-button.coming-soon {
        opacity: 0.65;
        background: #f9fafb;
        border: 1px solid #e5e7eb;
    }

    .floating-action-button.mobile-button.coming-soon span {
        color: #6b7280;
        font-weight: 400;
    }

    .floating-action-button.mobile-button.coming-soon .floating-action-icon {
        opacity: 0.7;
        color: #9ca3af;
    }

    /* Disabled state for mobile buttons */
    .floating-action-button.mobile-button.disabled {
        opacity: 0.4;
        cursor: not-allowed;
        background: #f3f4f6;
        border-color: #e5e7eb;
    }

    .floating-action-button.mobile-button.disabled:hover {
        background: #f3f4f6;
        border-color: #e5e7eb;
        transform: none;
    }

    /* Hide coming-soon label on mobile */
    .floating-action-button.mobile-button .coming-soon-label {
        display: none;
    }

    /* Ensure mobile divider looks good */
    #should-display-menu .floating-actions-divider {
        margin: 12px 0;
        height: 1px;
        background: #e5e7eb;
    }

    /* Hide transport buttons section on mobile since they're in the main container */
    .floating-actions-buttons.transport-buttons.mobile-layout {
        display: none;
    }

    /* Override base floating-actions-container width on mobile */
    .floating-actions-container {
        left: 0 !important;
        right: 0 !important;
        position: relative !important;
    }

    /* Make VerticalPanelContainer elements take full width on mobile */
    .vertical-panel-container .floating-actions-container,
    .vertical-panel-container .land-analysis-container,
    .vertical-panel-container .indicators-panel,
    .vertical-panel-container .transport-systems-panel,
    .vertical-panel-container .line-details-panel,
    .vertical-panel-container .station-details-panel,
    .vertical-panel-container .geozone-details-panel {
        width: 95% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
        max-width: none !important;
    }

    /* Add internal padding to panels on mobile */
    .vertical-panel-container .floating-actions-content,
    .vertical-panel-container .land-analysis-content,
    .vertical-panel-container .indicators-content,
    .vertical-panel-container .transport-systems-content,
    .vertical-panel-container .line-details-content,
    .vertical-panel-container .station-details-content,
    .vertical-panel-container .geozone-details-content {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Mobile Primary Panel Styling */
    .mobile-primary-panel {
        width: 88% !important;
        position: fixed !important;
        bottom: 30px !important;
        left: 10px !important;
    }

    .mobile-primary-panel .floating-actions-header {
        background: #f8f9fa;
        padding: 16px 20px;
        border-bottom: 1px solid #e9ecef;
    }

    .mobile-primary-panel .floating-actions-title {
        font-size: 16px;
        font-weight: 600;
        color: #242424;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin: 0;
    }

    .mobile-primary-panel .floating-actions-content {
        padding: 16px 20px;
    }

    .mobile-primary-text {
        font-size: 14px;
        line-height: 1.5;
        color: #374151;
        margin: 0;
        font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    }
}

/* Mobile responsive styles for Land Analysis */
@media (max-width: 768px) {
    .vertical-panel-container {
        width: calc(100vw - 30px) !important;
        bottom: 0px !important;
        left: 10px !important;
        right: 10px !important;
        max-width: none !important;
    }
    
    .vertical-panel-content {
        max-height: calc(100vh - 30px) !important;
        padding: 10px 0;
        width: 100% !important;
    }

    .land-analysis-container {
        font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    }

    .land-analysis-header {
        padding: 16px;
    }

    .land-analysis-title {
        font-size: 13px;
        font-weight: 600;
        font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    }

    .land-analysis-content {
        padding: 16px;
    }

    .land-analysis-buttons {
        gap: 3px;
    }

    .land-analysis-button {
        padding: 5px 3px;
        min-height: 45px;
        font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    }

    .land-analysis-icon svg {
        width: 18px;
        height: 18px;
    }

    .land-analysis-button span {
        font-size: 9px;
        font-weight: 500;
        font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    }

    .land-analysis-vertical-separator {
        height: 25px;
        margin: 0 1px;
    }
} 

/* Info message styles */
.info-message {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #F3F4F6;
    border-radius: 6px;
    margin-bottom: 12px;
}

.info-icon {
    color: #6B7280;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-message span {
    color: #374151;
    font-size: 13px;
    line-height: 1.4;
}

/* Geozone Details Panel Styles */
.geozone-header-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.geozone-type-badge {
    font-size: 11px;
    color: #6B7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.geozone-details-content {
    padding: 16px;
}

.geozone-details-list {
    margin-bottom: 16px;
}

.geozone-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #F3F4F6;
}

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

.geozone-detail-label {
    font-weight: 500;
    color: #374151;
    font-size: 13px;
}

.geozone-detail-value {
    color: #6B7280;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    background: #F9FAFB;
    padding: 2px 6px;
    border-radius: 4px;
}

.geozone-info-message {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
    background: #F3F4F6;
    border-radius: 6px;
    margin-top: 12px;
}

.geozone-info-message span {
    color: #374151;
    font-size: 13px;
    line-height: 1.4;
}

/* Disabled button state */
.floating-action-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #F3F4F6;
    border-color: #E5E7EB;
}

.floating-action-button.disabled:hover {
    background: #F3F4F6;
    border-color: #E5E7EB;
}

.floating-action-button.disabled .floating-action-icon {
    color: #9CA3AF;
}

.floating-action-button.disabled span {
    color: #6B7280;
}

/* Ranking Section Styles */
.ranking-section {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 16px;
}

.ranking-content {
    text-align: right;
    width: 100%;
}

.ranking-title {
    font-size: 24px;
    font-weight: 700;
    color: #1F2937;
    margin: 0 0 4px 0;
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    text-align: right;
}

.ranking-caption {
    font-size: 12px;
    color: #6B7280;
    margin: 0;
    font-weight: 500;
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    text-align: right;
}

.section-divider {
    width: 100%;
    height: 1px;
    background: #E5E7EB;
    margin: 16px 0;
    border-radius: 1px;
}

/* Star Plot Styles */
.star-plot-section {
    margin-bottom: 20px;
}

.star-plot-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 16px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
}

.star-plot-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 0;
}

.star-plot-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.d3-star-plot-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.d3-star-plot-container svg {
    max-width: 100%;
    height: auto;
    display: block;
    background-color: #ffffff;
}

.simple-star-plot-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 0;
    overflow: hidden;
}

.star-plot-ranking {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #3b82f6;
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 700;
    font-family: 'Ruda', sans-serif;
    z-index: 10;
    min-width: 40px;
    text-align: center;
}

/* Reduce spacing between star plot and sections below */
.floating-actions-section:has(.simple-star-plot-container) {
    margin-bottom: 8px;
}

.floating-actions-section:has(.extended-info-section) {
    margin-top: 8px;
}

.simple-star-plot-container svg {
    max-width: 100%;
    height: auto;
    display: block;
    background-color: #ffffff;
}

.star-plot-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #6B7280;
    font-size: 14px;
}

.star-plot-loading .loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #E5E7EB;
    border-top: 2px solid #3B82F6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

.star-plot-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #6B7280;
    font-size: 14px;
    text-align: center;
}

.star-plot-error button {
    background: #3B82F6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 12px;
    transition: background-color 0.2s ease;
}

.star-plot-error button:hover {
    background: #2563EB;
}

/* Year selector styles */
.year-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0 12px 0;
    padding: 0 16px;
}

.year-label {
    font-size: 10px;
    font-weight: 600;
    color: #6B7280;
    white-space: nowrap;
    text-transform: uppercase;
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
}

.year-buttons-container {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}

.year-buttons-container::-webkit-scrollbar {
    display: none;
}

/* Indicator divider styles */
.indicator-divider {
    height: 1px;
    background-color: #E5E7EB;
    margin: 16px 16px 12px 16px;
}

.year-link {
    background: none;
    border: 1px solid #E5E7EB;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
}

.year-link:hover {
    background-color: #F3F4F6;
    border-color: #D1D5DB;
    color: #374151;
}

.year-link.active {
    background-color: #3B82F6;
    border-color: #3B82F6;
    color: white;
}

.year-link.active:hover {
    background-color: #2563EB;
    border-color: #2563EB;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .info-message {
        padding: 10px;
        margin-bottom: 10px;
    }

    .info-message span {
        font-size: 12px;
    }

    .year-selector {
        gap: 6px;
        margin: 6px 0 10px 0;
        padding: 0 12px;
    }

    .year-link {
        padding: 3px 6px;
        font-size: 11px;
    }

    /* Mobile responsive styles for ranking and star plot */
    .ranking-title {
        font-size: 20px;
    }

    .ranking-caption {
        font-size: 11px;
    }

    .star-plot-title {
        font-size: 12px;
        margin-bottom: 12px;
    }

    .star-plot-wrapper {
        padding: 12px 0;
    }
} 

.indicator-list-section-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 10px 8px 10px 0;
    margin-bottom: 8px;
}

.indicator-list-section-title {
    flex: 1;
    text-align: left;
    font-size: 1.1em;
    font-weight: 600;
    margin: 0;
}

.close-section-link {
    text-decoration: underline;
    color: #333;
    font-size: 0.8em;
    cursor: pointer;
    margin-left: 16px;
    align-self: center;
    background: none;
    border: none;
    padding: 0;
}

.close-section-link:hover {
    color: #000;
    text-decoration: underline;
}

.indicator-section-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
}

.indicator-section-container:last-child {
    margin-bottom: 0;
} 

/* Station Details Panel Styles */
.station-icon {
    width: 25px;
    height: 25px;
    margin-bottom: 12px;
    border-radius: 8px;
    object-fit: contain;
}

.station-name {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    line-height: 1.3;
}

.station-system {
    margin: 0 0 6px 0;
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.station-line {
    margin-top: 7px;
    font-size: 13px;
    color: #9ca3af;
    font-weight: 400;
}

/* Mobile responsive styles for station details */
@media (max-width: 768px) {
    .station-icon {
        width: 30px;
        height: 30px;
        margin-bottom: 10px;
    }
    
    .station-name {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .station-system {
        font-size: 12px;
        margin-bottom: 4px;
    }
    
    .station-line {
        font-size: 11px;
    }
} 

/* Line Details Panel Styles */
.line-system-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    border-radius: 8px;
    object-fit: contain;
}

.line-system-name {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    line-height: 1.3;
}

.line-info-section {
    margin-bottom: 16px;
}

.line-number-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 8px;
}

.line-number-label {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}

.line-route-name {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    text-align: center;
    line-height: 1.3;
}

.line-name-display {
    text-align: center;
    margin-top: 8px;
}

.line-name-text {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.stations-section {
    border-top: 1px solid #e5e7eb;
    padding-top: 16px;
}

.stations-title {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stations-list {
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db #f9fafb;
}

.stations-list::-webkit-scrollbar {
    width: 6px;
}

.stations-list::-webkit-scrollbar-track {
    background: #f9fafb;
    border-radius: 3px;
}

.stations-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.stations-list::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.station-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

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

.station-marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
}

.station-marker.rtp {
    background-color: #6cb34e;
}

.station-marker.metro {
    background-color: #ff6b35;
}

.station-marker.metrobus {
    background-color: #ff6b35;
}

.station-marker.trolebus {
    background-color: #0056b8;
}

.station-marker.cablebus {
    background-color: #ff6b35;
}

.station-marker.ecobici {
    background-color: #00a651;
}

.station-marker.concesionados {
    background-color: #ff6b35;
}

.station-marker.tren-interurbano {
    background-color: #ff6b35;
}

.station-marker.tren-suburbano {
    background-color: #ff6b35;
}

.station-marker.mexibus {
    background-color: #ff6b35;
}

.station-marker.mexicable {
    background-color: #7c1d4e;
}

.station-marker.tren-ligero {
    background-color: #ff6b35;
}

.station-name {
    font-size: 10px;
    color: #374151;
    font-weight: 500;
    flex: 1;
}

/* LineDetailsPanel specific station name styling */
.floating-actions-container .station-name {
    font-size: 12px;
    color: #374151;
    font-weight: 500;
    flex: 1;
    margin-left: 8px;
}

.station-identifier {
    font-size: 11px;
    color: #9ca3af;
    margin-left: 4px;
}

/* Line Details Panel Station Icons */
.floating-actions-container .station-icon {
    width: 25px;
    height: 25px;
    margin-right: 8px;
    flex-shrink: 0;
    border-radius: 3px;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.floating-actions-container .station-icon:hover {
    opacity: 0.7;
}

.floating-actions-container .station-icon-placeholder {
    width: 25px;
    height: 25px;
    margin-right: 8px;
    flex-shrink: 0;
    background-color: #e5e7eb;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #9ca3af;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.floating-actions-container .station-icon-placeholder:hover {
    background-color: #d1d5db;
}

/* Mobile responsive styles for line details */
@media (max-width: 768px) {
    .line-system-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 10px;
    }
    
    .line-system-name {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .line-number-label {
        font-size: 16px;
    }
    
    .line-route-name {
        font-size: 14px;
    }
    
    .line-name-text {
        font-size: 12px;
    }
    
    .stations-title {
        font-size: 12px;
        margin-bottom: 10px;
    }
    
    .station-item {
        padding: 6px 0;
    }
    
    .station-marker {
        width: 10px;
        height: 10px;
        margin-right: 10px;
    }
    
    .station-name {
        font-size: 9px;
    }
    
    .floating-actions-container .station-name {
        font-size: 10px;
    }
    
    .station-identifier {
        font-size: 10px;
    }
    
    .floating-actions-container .station-icon,
    .floating-actions-container .station-icon-placeholder {
        width: 20px;
        height: 20px;
        margin-right: 6px;
        font-size: 8px;
    }
} 

/* ========================================
   LINE DETAILS PANEL - NAMESPACED STYLES
   ======================================== */

/* LineDetailsPanel specific styles - all prefixed with .floating-actions-container */
.floating-actions-container .line-info {
    margin-bottom: 16px;
    text-align: center;
}

.floating-actions-container .line-number {
    font-size: 18px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 4px;
}

.floating-actions-container .line-route {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    line-height: 1.3;
}

.floating-actions-container .stations-section {
    margin-top: 16px;
}

.floating-actions-container .stations-title {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.floating-actions-container .stations-scrollable-list {
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 8px;
}

.floating-actions-container .stations-scrollable-list::-webkit-scrollbar {
    width: 6px;
}

.floating-actions-container .stations-scrollable-list::-webkit-scrollbar-track {
    background: #f9fafb;
    border-radius: 3px;
}

.floating-actions-container .stations-scrollable-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.floating-actions-container .stations-scrollable-list::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.floating-actions-container .station-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.floating-actions-container .station-item:last-child {
    border-bottom: none;
}

.floating-actions-container .station-identifier {
    font-size: 11px;
    color: #9ca3af;
    margin-left: 4px;
}

.floating-actions-container .no-stations {
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    padding: 16px 0;
}

/* LineDetailsPanel mobile responsive styles */
@media (max-width: 768px) {
    .floating-actions-container .line-number {
        font-size: 16px;
    }
    
    .floating-actions-container .line-route {
        font-size: 14px;
    }
    
    .floating-actions-container .stations-title {
        font-size: 12px;
        margin-bottom: 10px;
    }
    
    .floating-actions-container .station-item {
        padding: 6px 0;
    }
    
    .floating-actions-container .station-identifier {
        font-size: 10px;
    }
}

/* ========================================
   STATION DETAILS PANEL - NAMESPACED STYLES
   ======================================== */

/* StationDetailsPanel specific styles - all prefixed with .floating-actions-container */
.floating-actions-container .station-details-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    text-align: center;
}

.floating-actions-container .station-details-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.floating-actions-container .station-details-name {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 12px 0;
    line-height: 1.2;
    text-align: center;
}

.floating-actions-container .station-details-system {
    font-size: 16px;
    color: #6b7280;
    font-weight: 500;
    margin: 0 0 8px 0;
    text-align: center;
}

.floating-actions-container .station-details-line {
    font-size: 14px;
    color: #9ca3af;
    font-weight: 400;
    margin: 0;
    text-align: center;
}

/* StationDetailsPanel mobile responsive styles */
@media (max-width: 768px) {
    .floating-actions-container .station-details-content {
        min-height: 150px;
    }
    
    .floating-actions-container .station-details-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 12px;
    }
    
    .floating-actions-container .station-details-name {
        font-size: 20px;
        margin-bottom: 8px;
    }
    
    .floating-actions-container .station-details-system {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .floating-actions-container .station-details-line {
        font-size: 12px;
    }
}

/* ========================================
   GENERAL STYLES (for other components)
   ======================================== */

/* General line info styles (for other components) */
.line-info {
    margin-bottom: 16px;
    text-align: center;
}

.line-number {
    font-size: 18px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 4px;
}

.line-route {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    line-height: 1.3;
}

.stations-section {
    margin-top: 16px;
}

.stations-title {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stations-scrollable-list {
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 8px;
}

.stations-scrollable-list::-webkit-scrollbar {
    width: 6px;
}

.stations-scrollable-list::-webkit-scrollbar-track {
    background: #f9fafb;
    border-radius: 3px;
}

.stations-scrollable-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.stations-scrollable-list::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.station-list {
    margin-top: 16px;
}

.station-list-title {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.no-stations {
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    padding: 16px 0;
} 

/* Scrollable Content Area */
.scrollable-content-area {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

.scrollable-content-area::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Extended Information Section */
.extended-info-section {
    background: #ffffff;
    border-radius: 8px;
    padding: 16px;
    margin-top: 8px;
}

.extended-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
}

.extended-info-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin: 0;
    font-family: 'Ruda', sans-serif;
}

.close-extended-info {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    color: #6b7280;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-extended-info:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.extended-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.indicator-grid-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    position: relative;
    transition: all 0.2s ease;
    overflow: hidden;
}

.indicator-grid-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--category-color, #6b7280);
}

.indicator-grid-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.indicator-value {
    font-size: 35px !important;
    color: #6b6b6b !important;
    font-weight: 800;
    font-family: 'Ruda', sans-serif;
    margin-bottom: 6px;
    line-height: 1;
    letter-spacing: -0.5px;
}

.indicator-label {
    font-size: 12px;
    font-weight: 500;
    font-family: 'Ruda', sans-serif;
    line-height: 1.3;
    text-align: left;
    color: var(--category-color, #6b7280);
}

/* Mobile responsive styles for extended info */
@media (max-width: 768px) {
    .scrollable-content-area {
        max-height: calc(100vh - 150px);
    }
    
    .extended-info-section {
        padding: 12px;
        margin-top: 6px;
    }
    
    .extended-info-header {
        margin-bottom: 12px;
        padding-bottom: 8px;
    }
    
    .extended-info-title {
        font-size: 13px;
    }
    
    .extended-info-grid {
        gap: 8px;
    }
    
    .indicator-grid-item {
        padding: 8px;
    }
    
    .indicator-value {
        font-size: 12px;
    }
    
    .indicator-label {
        font-size: 11px;
    }
} 

/* Index Selector Styles */
.ranking-caption-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    text-align: right;
}

.other-indices-link {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    font-family: 'Ruda', sans-serif;
    align-self: flex-end;
}

.other-indices-link:hover {
    color: #2563eb;
}

.index-selector {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-top: 10px;
}

.index-selector-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin: 0;
    text-align: center;
    font-family: 'Ruda', sans-serif;
}

.index-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.index-button {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 10px;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-family: 'Ruda', sans-serif;
    width: 100%;
    box-sizing: border-box;
}

.index-button:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.index-button.selected {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.close-index-selector {
    background: #000000;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Ruda', sans-serif;
    align-self: center;
}

.close-index-selector:hover {
    background: #374151;
}

/* Mobile responsive styles for index selector */
@media (max-width: 768px) {
    .ranking-caption-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .index-selector {
        padding: 12px;
        gap: 12px;
    }
    
    .index-selector-title {
        font-size: 13px;
    }
    
    .index-button {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .close-index-selector {
        padding: 8px 12px;
        font-size: 12px;
    }
} 

/* Explore Introduction Component Styles */
.explore-introduction-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.explore-introduction-container {
    background: var(--color-background);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 1000px; /* Increased from 800px */
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: slideInUp 0.6s ease-out;
}

.explore-introduction-content {
    display: flex;
    align-items: center;
    padding: 0;
    gap: 0;
}

.explore-intro-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px;
    min-height: 400px;
    width: 100%;
}

.intro-image {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    background-color: #fff;
    padding: 10px;
}

.explore-intro-text {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.intro-title {
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0;
    line-height: 1.2;
}

.intro-description {
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin: 0;
}

.intro-small-text {
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin: 0;
    font-style: italic;
    opacity: 0.8;
}

.intro-tiny-text {
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.7rem;
    color: var(--color-text-secondary);
    margin: 0;
    font-style: italic;
}

.intro-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    align-self: flex-start;
}

.intro-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.intro-button:active {
    transform: translateY(0);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Mobile responsive styles for introduction */
@media (max-width: 768px) {
    .explore-introduction-container {
        width: 95%;
        max-width: none;
        margin: 20px;
    }
    
    .explore-introduction-content {
        flex-direction: column;
    }
    
    .explore-intro-image {
        padding: 30px;
        min-height: 250px;
    }
    
    .intro-image {
        max-height: 200px;
    }
    
    .explore-intro-text {
        padding: 30px;
        gap: 16px;
    }
    
    .intro-title {
        font-size: 1.6rem;
    }
    
    .intro-description {
        font-size: 1rem;
    }
    
    .intro-small-text {
        font-size: 0.85rem;
    }
    
    .intro-button {
        padding: 12px 24px;
        width: 100%;
        text-align: center;
    }
} 

.intro-checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.intro-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.intro-checkbox-label {
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    user-select: none;
}

.intro-actions-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 10px;
}

/* Help Panel Styles */
.explore-help-panel {
    position: fixed;
    top: 78px; /* Just below the navigation bar */
    right: 10px;
    z-index: 9999999; /* Highest z-index to appear above everything else */
    max-width: 380px;
    pointer-events: auto;
}

.help-panel-content {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.help-panel-image-container {
    text-align: center;
}

.help-panel-image-container img {
    max-width: 180px;
    height: auto;
    border-radius: 12px;
}

.help-panel-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.help-panel-title {
    text-align: center;
    font-size: 1.4em;
    font-weight: 700;
    font-family: 'Ruda', sans-serif;
    color: #1a1a1a;
    margin-bottom: 20px;
    line-height: 1.2;
}

.help-panel-description {
    font-size: 0.77rem;
    line-height: 1.6;
    font-family: var(--font-family, 'Ruda', sans-serif);
    color: #4a5568;
    text-align: center;
    max-width: 500px;
    margin: 0 auto 15px auto;
}

.help-panel-steps {
    display: flex;
    justify-content: space-around;
    gap: 24px;
    margin-top: 5px;
    margin-bottom: 20px;
}

.help-step-item {
    text-align: center;
    flex: 1;
    max-width: 200px;
}

.step-number-large {
    font-size: 3rem;
    font-weight: 700;
    font-family: 'Ruda', sans-serif;
    color: #a0aec0;
    margin-bottom: 5px;
    line-height: 1;
}

.step-text-below {
    font-size: 0.665rem;
    color: #2d3748;
    line-height: 1.5;
    font-weight: 500;
    font-family: 'Ruda', sans-serif;
    margin-left: 8px;
}

.help-panel-close-btn {
    margin-top: 5px;
    padding: 12px 24px;
    font-size: 0.9em;
    font-weight: 600;
    font-family: 'Ruda', sans-serif;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: flex-center;
}

.help-panel-close-btn:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
}

.help-panel-close-btn:active {
    background-color: #1d4ed8;
    transform: translateY(0);
}

/* Help button in navigation - special styling */
.nav-button.help-button {
    color: rgb(49, 49, 49) !important;
    padding: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
}

.nav-button.help-button:hover {
    transform: scale(1.05);
}

/* Mobile responsive styles for help panel */
@media (max-width: 768px) {
    .explore-help-panel {
        top: 68px;
        right: 8px;
        left: 8px;
        max-width: none;
    }
    
    .help-panel-content {
        padding: 16px;
    }
    
    .help-panel-title {
        font-size: var(--font-size-base, 2rem);
    }
    
    .help-panel-description {
        font-size: var(--font-size-xs, 0.8rem);
    }
}

/* Business Introduction Component Styles */
.business-introduction-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

/* Transport Introduction Component Styles */
.transport-introduction-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    backdrop-filter: blur(4px);
}

.transport-introduction-container {
    background: var(--color-background, white);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 1000px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: slideInUp 0.6s ease-out;
}

.transport-introduction-content {
    display: flex;
    align-items: center;
    padding: 0;
    gap: 0;
}

.transport-intro-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    padding: 40px;
    min-height: 400px;
    width: 100%;
}

.transport-intro-text {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    color: var(--color-text-primary, #333);
}

.business-introduction-container {
    background: var(--color-background);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 1000px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: slideInUp 0.6s ease-out;
}

.business-introduction-content {
    display: flex;
    align-items: center;
    padding: 0;
    gap: 0;
}

.business-intro-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    padding: 40px;
    min-height: 400px;
    width: 100%;
}

.business-intro-text {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.intro-emphasis {
    font-size: 1.2rem !important;
    font-weight: 600;
    color: #6a6a6a;
    text-transform: uppercase !important;
}

.empezar-button-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.empezar-button {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.empezar-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.empezar-button:active {
    transform: translateY(0);
}

.chevron-right {
    transition: transform 0.2s ease;
}

.empezar-button:hover .chevron-right {
    transform: translateX(2px);
}

/* Mobile responsive styles for business introduction */
@media (max-width: 768px) {
    .business-introduction-container {
        width: 95%;
        max-width: none;
        margin: 20px;
    }
    
    .business-introduction-content {
        flex-direction: column;
    }
    
    .business-intro-image {
        padding: 30px;
        min-height: 250px;
    }
    
    .business-intro-text {
        padding: 30px;
        gap: 16px;
    }
    
    .empezar-button-container {
        justify-content: center;
    }
    
    .empezar-button {
        padding: 14px 24px;
        width: 100%;
        justify-content: center;
    }
}

/* Mobile responsive styles for transport introduction */
@media (max-width: 768px) {
    .transport-introduction-container {
        width: 95%;
        max-width: none;
        margin: 20px;
    }
    
    .transport-introduction-content {
        flex-direction: column;
    }
    
    .transport-intro-image {
        padding: 30px;
        min-height: 250px;
    }
    
    .transport-intro-text {
        padding: 30px;
        gap: 16px;
    }
}

/* On a phone both intro cards have to fit the screen: a shorter picture, the
   card scrolls if the text still doesn't fit, and the checkbox sits above a
   full-width button instead of being squeezed beside it. */
@media (max-width: 768px) {
    .explore-introduction-overlay,
    .transport-introduction-overlay {
        height: 100dvh;
        padding: 16px;
        box-sizing: border-box;
    }

    .explore-introduction-container,
    .transport-introduction-container {
        width: 100%;
        margin: 0;
        max-height: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .explore-intro-image,
    .transport-intro-image {
        min-height: 0;
        padding: 20px;
        box-sizing: border-box;
    }

    .explore-intro-image .intro-image,
    .transport-intro-image img {
        max-height: 150px;
    }

    .explore-intro-text,
    .transport-intro-text {
        padding: 24px;
    }

    .intro-actions-container {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .intro-checkbox-container {
        margin-bottom: 0;
        min-height: 44px;
    }

    .intro-checkbox {
        width: 22px;
        height: 22px;
    }

    .intro-actions-container button {
        width: 100%;
        justify-content: center;
    }
}

/* The /transporte layers panel. The phone rule above that makes every
   floating panel `position: relative` would drop it below the full-height
   map, out of sight; on a phone it is a sheet along the bottom instead. */
@media (max-width: 768px) {
    .transport-page .transport-layers-panel {
        position: fixed !important;
        left: 8px !important;
        right: 8px !important;
        bottom: 8px !important;
        bottom: max(8px, env(safe-area-inset-bottom)) !important;
        max-width: none !important;
        max-height: 45dvh !important;
        box-sizing: border-box;
    }
}

/* Animation keyframes for dynamic loading */
@keyframes fadeInLayer {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

/* Scrollbar styling for GeoJSON layers list */
.floating-actions-container {
    scrollbar-width: thin;
    scrollbar-color: var(--color-border-medium) transparent;
}

.floating-actions-container::-webkit-scrollbar {
    width: 6px;
}

.floating-actions-container::-webkit-scrollbar-track {
    background: transparent;
}

.floating-actions-container::-webkit-scrollbar-thumb {
    background: var(--color-border-medium);
    border-radius: 3px;
}

.floating-actions-container::-webkit-scrollbar-thumb:hover {
    background: var(--color-border-dark);
}

/* BusinessWizard Component Styles - Top-aligned below navigation bar */
.business-wizard-container {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    z-index: 999900;
    pointer-events: auto;
    overflow: visible;
}

.business-wizard-state {
    background: var(--color-surface);
    border-radius: var(--border-radius-large);
    width: 100%;
    box-shadow: var(--shadow-medium);
    animation: slideInDown 0.4s ease-out;
    border: 1px solid var(--color-border-light);
    backdrop-filter: blur(10px);
    overflow: visible;
}

.wizard-content {
    display: flex;
    flex-direction: column;
    overflow-y: visible;
}

.wizard-header {
    display: flex;
    justify-content: flex-end;
    padding: 8px 20px 0 20px;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
}

.wizard-close-button {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--border-radius-small);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wizard-close-button:hover {
    background: var(--color-hover-background);
    color: var(--color-text-primary);
}

.wizard-close-button svg {
    width: 16px;
    height: 16px;
}

.wizard-text-section {
    padding: 20px 24px 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: visible;
    position: relative;
    margin-left: 30px;
}

.wizard-step-number {
    position: absolute;
    top: 10px;
    left: -20px;
    font-size: 120px;
    font-weight: bold;
    color: rgb(217, 217, 217);
    line-height: 1;
    z-index: -10;
    pointer-events: none;
    font-family: var(--font-family);
}

.wizard-title {
    font-family: var(--font-family);
    font-size: 1.6em;
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin: 0;
    text-align: left;
    line-height: 1.2;
}

.wizard-instruction {
    font-family: var(--font-family);
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    line-height: 1.4;
    margin: 0;
    text-align: left;
}

.wizard-search-container {
    position: relative;
    width: 100%;
    overflow: visible;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    z-index: 999998;
}

.wizard-input-container {
    display: flex;
    gap: 12px;
    align-items: center;
    position: relative;
    flex: 1;
    overflow: visible;
    min-width: 0;
}

.wizard-pin-button {
    background: var(--color-primary);
    border: none;
    border-radius: var(--border-radius-medium);
    padding: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wizard-pin-button:hover {
    background: var(--color-primary);
    opacity: 0.9;
    transform: translateY(-1px);
}

.wizard-pin-button:active {
    transform: translateY(0);
}

.pin-icon {
    width: 20px;
    height: 20px;
}

.wizard-location-input {
    flex: 1;
    padding: 14px 45px 14px 16px;
    border: 2px solid var(--color-border-light);
    border-radius: var(--border-radius-medium);
    font-family: var(--font-family);
    font-size: var(--font-size-lg);
    background: var(--color-background);
    color: var(--color-text-primary);
    transition: all 0.2s ease;
}

.wizard-location-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb, 255, 165, 0), 0.1);
}

.wizard-location-input::placeholder {
    color: var(--color-text-secondary);
}

.wizard-inline-next-button {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-status-success);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: var(--border-radius-small);
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: var(--shadow-small);
}

.wizard-inline-next-button:hover:not(:disabled) {
    background: var(--color-status-success);
    opacity: 0.9;
    transform: translateY(-50%) scale(1.02);
}

.wizard-inline-next-button:disabled {
    background: var(--color-border-medium);
    color: var(--color-text-secondary);
    cursor: not-allowed;
    box-shadow: none;
}

.wizard-inline-next-button .chevron-right {
    width: 12px;
    height: 12px;
}

.wizard-clear-button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--border-radius-small);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wizard-clear-button:hover {
    background: var(--color-hover-background);
    color: var(--color-text-primary);
}

.wizard-external-next-button {
    background: var(--color-status-success);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: var(--border-radius-medium);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    box-shadow: var(--shadow-small);
    flex-shrink: 0;
    border: 2px solid transparent;
}

.wizard-external-next-button:hover:not(:disabled) {
    background: var(--color-status-success);
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.wizard-external-next-button:disabled {
    background: var(--color-border-medium);
    color: var(--color-text-secondary);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.wizard-external-next-button .chevron-right {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.wizard-external-next-button:hover:not(:disabled) .chevron-right {
    transform: translateX(2px);
}

.wizard-loading-indicator {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Button group for back and next buttons */
.wizard-button-group {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

/* Back button styles */
.wizard-back-button {
    background: var(--color-surface);
    color: var(--color-text-primary);
    border: 2px solid var(--color-border-light);
    padding: 14px 20px;
    border-radius: var(--border-radius-medium);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    box-shadow: var(--shadow-small);
    flex-shrink: 0;
}

.wizard-back-button:hover {
    background: var(--color-hover-background);
    border-color: var(--color-border-medium);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.wizard-back-button:active {
    transform: translateY(0);
}

.wizard-back-button .chevron-left {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.wizard-back-button:hover .chevron-left {
    transform: translateX(-2px);
}

/* Radius selection styles */
.wizard-radius-and-navigation {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.wizard-radius-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    flex: 1;
}

.wizard-radius-button {
    background: var(--color-surface);
    color: var(--color-text-primary);
    border: 2px solid var(--color-border-light);
    padding: 14px 16px;
    border-radius: var(--border-radius-medium);
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: var(--shadow-small);
    flex: 1;
    min-width: 0;
    white-space: nowrap;
}

.wizard-radius-button:hover {
    background: var(--color-hover-background);
    border-color: var(--color-border-medium);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.wizard-radius-button:active {
    transform: translateY(0);
}

.wizard-radius-button.selected {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-medium);
}

.wizard-radius-button.selected:hover {
    background: var(--color-primary);
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

/* Review state styles */
.wizard-review-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.wizard-review-section {
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--border-radius-medium);
    padding: 16px;
}

.wizard-review-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.wizard-review-section-title {
    font-family: var(--font-family);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    margin: 0;
}

.wizard-change-link {
    background: none;
    border: none;
    color: var(--color-primary);
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    text-decoration: underline;
    transition: all 0.2s ease;
    padding: 4px 8px;
    border-radius: var(--border-radius-small);
}

.wizard-change-link:hover {
    background: var(--color-hover-background);
    color: var(--color-primary);
    opacity: 0.8;
}

.wizard-review-section-content {
    color: var(--color-text-secondary);
}

.wizard-review-text {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.4;
    margin: 0;
}

.wizard-review-categories {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wizard-review-category-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--color-background);
    border-radius: var(--border-radius-small);
    border: 1px solid var(--color-border-light);
}

.wizard-review-category-item .category-code {
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-primary);
    background: var(--color-primary);
    color: white;
    padding: 2px 6px;
    border-radius: var(--border-radius-small);
    font-size: 10px;
}

.wizard-review-category-item .category-name {
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    font-size: var(--font-size-sm);
    color: var(--color-text-primary);
    flex: 1;
}

.wizard-review-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.wizard-review-results-info {
    flex: 1;
}

.wizard-results-text {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
    margin: 0;
}

.wizard-loading-indicator .spinner {
    animation: spin 1s linear infinite;
    color: var(--color-primary);
    width: 18px;
    height: 18px;
}

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

.wizard-search-results {
    position: absolute;
    top: calc(100% + 2px);
    left: 48px;
    right: 0;
    background: var(--color-background);
    border: 1px solid var(--color-border-light);
    border-radius: var(--border-radius-medium);
    box-shadow: var(--shadow-large);
    max-height: 200px;
    overflow-y: auto;
    z-index: 999999;
}

.wizard-search-result-item {
    padding: 16px 20px;
    cursor: pointer;
    border-bottom: 1px solid var(--color-border-light);
    transition: background-color 0.2s ease;
}

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

.wizard-search-result-item:hover {
    background: var(--color-hover-background);
}

.wizard-search-result-item .result-name {
    font-family: var(--font-family);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-primary);
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wizard-search-result-item .result-distance {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    color: var(--color-text-secondary);
    background: var(--color-surface);
    padding: 4px 8px;
    border-radius: var(--border-radius-small);
    flex-shrink: 0;
}

.wizard-search-result-item .result-address {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
    line-height: 1.4;
}

.wizard-divider {
    height: 1px;
    background: var(--color-border-light);
    margin: 6px 0;
}

.wizard-next-button {
    display: none;
}

.wizard-next-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.wizard-next-button:active:not(:disabled) {
    transform: translateY(0);
}

.wizard-next-button:disabled {
    background: var(--color-surface-secondary);
    color: var(--color-text-secondary);
    cursor: not-allowed;
    box-shadow: none;
}

.wizard-next-button .chevron-right {
    transition: transform 0.2s ease;
}

.wizard-next-button:hover:not(:disabled) .chevron-right {
    transform: translateX(2px);
}

/* Animation for top-aligned wizard */
@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .business-wizard-container {
        top: 60px; /* Reduced top margin for better mobile experience */
        left: 10px;
        right: 10px;
        width: auto;
        max-width: none;
        transform: none;
    }
    
    /* Special handling for review state on mobile - allow scrolling */
    .business-wizard-container.review-state {
        max-height: 85vh;
        overflow-y: auto;
    }
    
    .business-wizard-container.review-state .business-wizard-state {
        max-height: 85vh;
        overflow-y: auto;
    }
    
    .business-wizard-container.review-state .wizard-content {
        max-height: 85vh;
        overflow-y: auto;
    }
    
    .business-wizard-container.review-state .wizard-text-section {
        max-height: calc(85vh - 40px);
        overflow-y: auto;
        padding-bottom: 20px;
        scrollbar-width: thin;
        scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
    }
    
    /* Webkit scrollbar styling for review state */
    .business-wizard-container.review-state .wizard-text-section::-webkit-scrollbar {
        width: 6px;
    }
    
    .business-wizard-container.review-state .wizard-text-section::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .business-wizard-container.review-state .wizard-text-section::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.3);
        border-radius: 3px;
    }
    
    .business-wizard-container.review-state .wizard-text-section::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 0, 0, 0.5);
    }
    
    .business-wizard-state {
        border-radius: 16px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
        margin: 0;
    }
    
    .wizard-text-section {
        padding: 20px 16px 24px 16px;
        gap: 16px;
        margin-left: 0;
    }
    
    .wizard-step-number {
        font-size: 72px;
        top: 12px;
        right: 16px;
        left: auto;
        color: rgba(217, 217, 217, 0.8);
    }
    
    .wizard-title {
        font-size: 1.4em;
        margin-bottom: 4px;
        line-height: 1.3;
    }
    
    .wizard-instruction {
        font-size: 0.95em;
        line-height: 1.5;
        color: #666;
        margin-bottom: 8px;
    }
    
    /* Compact layout for location-selection, category-selection, and radius-selection */
    .business-wizard-container:not(.review-state) .wizard-search-container {
        display: flex;
        flex-direction: column;
        gap: 16px;
        width: 100%;
        position: relative;
    }
    
    /* Location selection specific layout - button below input */
    .business-wizard-container:not(.review-state) .wizard-search-container.location-selection {
        gap: 12px;
    }
    
    .business-wizard-container:not(.review-state) .wizard-search-container.location-selection .wizard-external-next-button {
        margin-top: 8px;
        order: 2;
    }
    
    .business-wizard-container:not(.review-state) .wizard-search-container.location-selection .wizard-input-container {
        order: 1;
    }
    
    .wizard-search-container {
        gap: 12px;
        align-items: stretch;
        flex-direction: column;
    }
    
    .wizard-input-container {
        gap: 8px;
        align-items: stretch;
        width: 100%;
    }
    
    .wizard-pin-button {
        padding: 14px;
        border-radius: 12px;
        min-width: 48px;
    }
    
    .wizard-location-input {
        padding: 16px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 12px;
        border: 2px solid #e5e7eb;
        min-height: 52px;
    }
    
    .wizard-location-input:focus {
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }
    
    .wizard-external-next-button {
        padding: 16px 20px;
        font-size: 16px;
        font-weight: 600;
        border-radius: 12px;
        min-height: 52px;
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
        transition: all 0.2s ease;
    }
    
    .wizard-external-next-button:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
    }
    
    .wizard-external-next-button:disabled {
        background: #9ca3af;
        box-shadow: none;
        transform: none;
    }
    
    .wizard-back-button {
        padding: 16px 20px;
        font-size: 16px;
        font-weight: 600;
        border-radius: 12px;
        min-height: 52px;
        background: #f3f4f6;
        color: #374151;
        border: 2px solid #e5e7eb;
    }
    
    .wizard-back-button:hover {
        background: #e5e7eb;
        transform: translateY(-1px);
    }
    
    .wizard-button-group {
        gap: 12px;
        flex-direction: column;
        width: 100%;
    }
    
    /* Compact button layout for non-review states */
    .business-wizard-container:not(.review-state) .wizard-button-group {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        margin-top: 16px;
        order: 2; /* Ensure it appears after other content */
    }
    
    /* Ensure input containers come before button groups */
    .business-wizard-container:not(.review-state) .wizard-input-container {
        order: 1;
    }
    
    .wizard-radius-and-navigation {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    /* Compact radius selection layout */
    .business-wizard-container:not(.review-state) .wizard-radius-and-navigation {
        display: flex;
        flex-direction: column;
        gap: 16px;
        width: 100%;
    }
    
    /* Ensure radius buttons come before navigation buttons */
    .business-wizard-container:not(.review-state) .wizard-radius-buttons {
        order: 1;
    }
    
    .business-wizard-container:not(.review-state) .wizard-radius-and-navigation .wizard-button-group {
        order: 2;
        margin-top: 16px;
    }
    
    .wizard-radius-buttons {
        gap: 8px;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        width: 100%;
    }
    
    .wizard-radius-button {
        padding: 16px 12px;
        font-size: 14px;
        font-weight: 600;
        border-radius: 12px;
        min-height: 48px;
        background: #f9fafb;
        border: 2px solid #e5e7eb;
        color: #374151;
        transition: all 0.2s ease;
    }
    
    .wizard-radius-button:hover {
        background: #f3f4f6;
        transform: translateY(-1px);
    }
    
    .wizard-radius-button.selected {
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
        color: white;
        border-color: #3b82f6;
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    }
    
    .business-wizard-container:not(.review-state) .wizard-radius-buttons .wizard-radius-button {
        width: 100%;
        height: 48px;
        font-size: 14px;
        font-weight: 600;
    }
    
    .wizard-button-group {
        gap: 8px;
    }
    
    .wizard-review-sections {
        gap: 16px;
    }
    
    .wizard-review-section {
        padding: 16px;
        border-radius: 12px;
        background: #f9fafb;
        border: 1px solid #e5e7eb;
    }
    
    .wizard-review-section-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
    }
    
    /* Mobile styles for review section actions */
    @media (max-width: 768px) {
        .wizard-review-section-actions {
            gap: 8px;
        }
        
        .wizard-toggle-link {
            display: block; /* Show toggle button on mobile */
            font-size: 13px;
            padding: 4px 8px;
            color: #3b82f6;
            background: none;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-weight: 500;
            transition: all 0.2s ease;
            font-family: var(--font-family);
        }
        
        .wizard-toggle-link:hover {
            background: rgba(59, 130, 246, 0.1);
            color: #2563eb;
        }
        
        .wizard-change-link {
            font-size: 13px;
            padding: 3px 6px;
        }
        
        .wizard-review-categories-summary {
            padding: 10px 12px;
        }
        
        .categories-count {
            font-size: 13px;
        }
        
        .categories-count-button {
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
        }
        
        .categories-count-button:active {
            opacity: 0.7;
        }
        
        .wizard-review-categories-collapse {
            padding: 10px 0;
            margin-top: 10px;
        }
        
        .wizard-review-categories-collapse .wizard-toggle-link {
            font-size: 14px;
            padding: 8px 16px;
            background: #f3f4f6;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            color: #374151;
            font-weight: 500;
        }
        
        .wizard-review-categories-collapse .wizard-toggle-link:hover {
            background: #e5e7eb;
            color: #1f2937;
        }
        
        .wizard-review-footer .wizard-external-next-button {
            margin-bottom: 20px;
            padding: 16px 20px;
            min-height: 52px;
        }
        
        /* Mobile-only collapsed state */
        .wizard-review-categories.collapsed .wizard-review-category-item {
            display: none;
        }
        
        .wizard-review-categories.expanded .wizard-review-category-item {
            display: flex;
        }
    }
    
    .wizard-review-section-title {
        font-size: 16px;
        font-weight: 600;
        color: #1f2937;
        margin: 0;
    }
    
    .wizard-change-link {
        font-size: 14px;
        color: #3b82f6;
        background: none;
        border: none;
        padding: 4px 8px;
        border-radius: 6px;
        cursor: pointer;
        font-weight: 500;
        transition: all 0.2s ease;
    }
    
    .wizard-change-link:hover {
        background: rgba(59, 130, 246, 0.1);
        color: #2563eb;
    }
    
    .wizard-review-section-actions {
        display: flex;
        gap: 12px;
        align-items: center;
    }
    
    .wizard-toggle-link {
        display: none; /* Hidden by default, only shown on mobile */
        font-size: 14px;
        color: #6b7280;
        background: none;
        border: none;
        padding: 4px 8px;
        border-radius: 6px;
        cursor: pointer;
        font-weight: 500;
        transition: all 0.2s ease;
        font-family: var(--font-family);
    }
    
    .wizard-toggle-link:hover {
        background: rgba(107, 114, 128, 0.1);
        color: #374151;
    }
    
    .wizard-review-section-content {
        margin-top: 8px;
    }
    
    .wizard-review-text {
        font-size: 14px;
        color: #6b7280;
        line-height: 1.5;
        margin: 0;
    }
    
    .wizard-review-footer {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid #e5e7eb;
    }
    
    .wizard-review-footer .wizard-external-next-button {
        margin-bottom: 20px;
    }
    
    .wizard-search-result-item {
        padding: 16px;
        border-radius: 8px;
        background: white;
        border: 1px solid #e5e7eb;
        margin-bottom: 4px;
        transition: all 0.2s ease;
    }
    
    .wizard-search-result-item:hover {
        background: #f9fafb;
        border-color: #3b82f6;
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .wizard-search-result-item .result-name {
        font-size: 16px;
        font-weight: 600;
        color: #1f2937;
        margin-bottom: 4px;
    }
    
    .wizard-search-result-item .result-address {
        font-size: 14px;
        color: #6b7280;
        line-height: 1.4;
    }
    
    .result-distance {
        font-size: 12px;
        color: #9ca3af;
        background: #f3f4f6;
        padding: 2px 6px;
        border-radius: 4px;
        margin-left: 8px;
    }
    
    .wizard-search-results {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
        max-height: 200px;
        overflow-y: auto;
        z-index: 1000;
        margin-top: 4px;
    }
    
    /* Search results positioning for non-review states */
    .business-wizard-container:not(.review-state) .wizard-search-results {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
        max-height: 150px;
        overflow-y: auto;
        z-index: 999999;
        margin-top: 4px;
        pointer-events: auto;
    }
    
    /* Ensure search results appear above buttons */
    .business-wizard-container:not(.review-state) .wizard-button-group {
        position: relative;
        z-index: 1;
    }
    
    /* Ensure input containers have relative positioning for absolute search results */
    .business-wizard-container:not(.review-state) .wizard-input-container {
        position: relative;
    }
    
    /* Category search results positioning */
    .wizard-search-results {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
        max-height: 200px;
        overflow-y: auto;
        z-index: 1000;
        margin-top: 4px;
    }
    
    /* Compact layout adjustments */
    .business-wizard-container:not(.review-state) .wizard-text-section {
        padding: 16px 12px 20px 12px;
        gap: 12px;
    }
    
    .business-wizard-container:not(.review-state) .wizard-title {
        font-size: 1.2em;
        margin-bottom: 4px;
    }
    
    .business-wizard-container:not(.review-state) .wizard-instruction {
        font-size: 0.9em;
        margin-bottom: 8px;
    }
}

/* Small mobile screens */
@media (max-width: 480px) {
    .business-wizard-container {
        top: 50px;
        left: 8px;
        right: 8px;
    }
    
    .wizard-text-section {
        padding: 16px 12px 20px 12px;
        gap: 12px;
    }
    
    .wizard-title {
        font-size: 1.3em;
    }
    
    .wizard-instruction {
        font-size: 0.9em;
    }
    
    .wizard-step-number {
        font-size: 64px;
        top: 8px;
        right: 12px;
    }
    
    .wizard-location-input {
        padding: 14px 10px;
        font-size: 16px;
        min-height: 48px;
    }
    
    .wizard-external-next-button,
    .wizard-back-button {
        padding: 14px 16px;
        font-size: 15px;
        min-height: 48px;
    }
    
    .wizard-radius-button {
        padding: 14px 8px;
        font-size: 13px;
        min-height: 44px;
    }
    
    .wizard-review-section {
        padding: 12px;
    }
    
    .wizard-review-section-title {
        font-size: 15px;
    }
    
    .wizard-change-link {
        font-size: 13px;
        padding: 3px 6px;
    }
}

/* Desktop styles */
@media (min-width: 769px) {
    .business-wizard-container {
        max-width: 700px;
        top: 90px;
    }
}

/* Large desktop styles */
@media (min-width: 1024px) {
    .business-wizard-container {
        max-width: 900px;
        top: 100px;
    }
    
    .wizard-text-section {
        gap: 14px;
    }
    
    .wizard-instruction {
        font-size: var(--font-size-lg);
    }
}

/* Category Selection Styles */
.selected-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.selected-category-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--color-primary);
    color: white;
    padding: 8px 12px;
    border-radius: var(--border-radius-medium);
    font-size: var(--font-size-sm);
    animation: slideInUp 0.3s ease-out;
    transition: background-color 0.3s ease;
}

.selected-category-item .category-code {
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    font-weight: var(--font-weight-bold);
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 6px;
    border-radius: var(--border-radius-small);
    font-size: var(--font-size-xs);
    color: white;
}

.selected-category-item .category-name {
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    font-weight: var(--font-weight-medium);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    color: white;
}

.category-remove-button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 2px;
    border-radius: var(--border-radius-small);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
}

.category-remove-button:hover {
    background: rgba(255, 255, 255, 0.3);
    opacity: 1;
}

.wizard-search-result-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--color-surface-secondary);
}

.wizard-search-result-item.disabled:hover {
    background: var(--color-surface-secondary);
}

.wizard-search-result-item .result-name .category-code {
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: #bbbbbb;
    color: #4e4e4e;
    padding: 2px 6px;
    border-radius: var(--border-radius-small);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    margin-right: 8px;
    flex-shrink: 0;
}

.wizard-search-result-item .result-name .category-name {
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    font-weight: var(--font-weight-medium);
    flex: 1;
}

.wizard-location-input:disabled {
    background: var(--color-surface-secondary);
    color: var(--color-text-secondary);
    cursor: not-allowed;
    border-color: var(--color-border-light);
}

/* Animation for category items */
@keyframes slideInUp {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile responsive styles for categories */
@media (max-width: 768px) {
    .selected-categories {
        gap: 8px;
        margin-bottom: 16px;
    }
    
    /* Compact category selection layout */
    .business-wizard-container:not(.review-state) .selected-categories {
        width: 100%;
        max-height: 200px;
        overflow-y: auto;
    }
    
    .selected-category-item {
        font-size: 14px;
        padding: 12px 16px;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        transition: all 0.2s ease;
    }
    
    .selected-category-item:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    .selected-category-item .category-name {
        max-width: 200px;
        font-weight: 500;
    }
    
    .selected-category-item .category-code {
        font-size: 11px;
        padding: 3px 8px;
        border-radius: 6px;
        font-weight: 700;
    }
    
    .category-remove-button {
        padding: 4px;
        border-radius: 6px;
        background: rgba(255, 255, 255, 0.2);
        border: none;
        color: white;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .category-remove-button:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: scale(1.1);
    }
    
    /* Loading states */
    .wizard-loading-stats {
        padding: 16px;
        background: #f9fafb;
        border-radius: 12px;
        border: 1px solid #e5e7eb;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
    }
    
    .wizard-loading-stats .spinner {
        width: 20px;
        height: 20px;
        animation: spin 1s linear infinite;
    }
    
    .wizard-loading-stats span {
        font-size: 14px;
        color: #6b7280;
        font-weight: 500;
    }
    
    .wizard-stats-summary {
        padding: 16px;
        background: #f0f9ff;
        border-radius: 12px;
        border: 1px solid #bae6fd;
    }
    
    .wizard-results-text {
        font-size: 16px;
        font-weight: 600;
        color: #0369a1;
        margin-bottom: 4px;
    }
    
    .wizard-jobs-text {
        font-size: 14px;
        color: #0c4a6e;
        font-weight: 500;
    }
    
    /* Touch-friendly improvements */
    .wizard-pin-button,
    .wizard-external-next-button,
    .wizard-back-button,
    .wizard-radius-button,
    .wizard-change-link,
    .category-remove-button {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    /* Improved focus states for accessibility */
    .wizard-location-input:focus,
    .wizard-pin-button:focus,
    .wizard-external-next-button:focus,
    .wizard-back-button:focus,
    .wizard-radius-button:focus,
    .wizard-change-link:focus {
        outline: 2px solid #3b82f6;
        outline-offset: 2px;
    }
    
    /* Smooth animations */
    .business-wizard-state {
        transition: all 0.3s ease;
    }
    
    .wizard-text-section {
        transition: all 0.3s ease;
    }
    
    /* Better spacing for review categories */
    .wizard-review-categories {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .wizard-review-categories.collapsed {
        gap: 0;
    }
    
    .wizard-review-categories-summary {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 12px 16px;
        background: #f9fafb;
        border-radius: 8px;
        border: 1px solid #e5e7eb;
    }
    
    .categories-count {
        font-size: 14px;
        color: #374151;
        font-weight: 500;
        font-family: var(--font-family);
    }
    
    .categories-count-button {
        background: none;
        border: none;
        padding: 0;
        margin: 0;
        cursor: pointer;
        font-family: var(--font-family);
        text-align: left;
        width: 100%;
        transition: all 0.2s ease;
    }
    
    .categories-count-button:hover {
        opacity: 0.8;
    }
    
    .categories-count-button:focus {
        outline: 2px solid #3b82f6;
        outline-offset: 2px;
        border-radius: 4px;
    }
    
    .wizard-review-categories-collapse {
        display: flex;
        justify-content: center;
        padding: 12px 0;
        margin-top: 12px;
        border-top: 1px solid #e5e7eb;
    }
    
    .wizard-review-category-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        background: white;
        border-radius: 8px;
        border: 1px solid #e5e7eb;
    }
    
    .wizard-review-category-item .category-code {
        font-size: 12px;
        font-weight: 700;
        background: #f3f4f6;
        color: #374151;
        padding: 4px 8px;
        border-radius: 6px;
    }
    
    .wizard-review-category-item .category-name {
        flex: 1;
        font-size: 14px;
        color: #1f2937;
        font-weight: 500;
    }
    
    .wizard-review-category-item .category-color-dot {
        width: 16px;
        height: 16px;
        border-radius: 50%;
        border: 2px solid #e5e7eb;
    }
}

/* Category color dot styles */
.category-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-left: 8px;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.selected-category-item .category-color-dot {
    width: 14px;
    height: 14px;
    margin-left: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.wizard-search-result-item .result-name {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 8px;
}

/* Business Location Stats Styles */
.wizard-loading-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

    .wizard-loading-stats .spinner {
        animation: spin 1s linear infinite;
    }
    
    .wizard-loading-indicator-small {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        color: #6b7280;
    }
    
    .wizard-loading-indicator-small .spinner {
        animation: spin 1s linear infinite;
    }

.wizard-stats-summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wizard-jobs-text {
    font-size: 0.70rem;
    color: var(--color-text-secondary);
    margin: 0;
    font-weight: var(--font-weight-semibold);
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
}

.wizard-error {
    color: #ef4444;
}

.wizard-results-text {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin: 0;
}

.business-stats-content {
    background: var(--color-surface);
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--color-border-light);
    backdrop-filter: blur(10px);
    overflow: hidden;
    animation: slideInUp 0.4s ease-out;
}

.business-stats-header {
    padding: 20px 24px 16px 24px;
    border-bottom: 1px solid var(--color-border-light);
}

.business-stats-title {
    font-family: var(--font-family);
    font-size: 1.2em;
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin: 0 0 16px 0;
    text-align: left;
    line-height: 1.2;
}

.business-stats-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stats-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.stats-label {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    font-weight: var(--font-weight-medium);
}

.stats-value {
    font-size: 1rem;
    color: var(--color-text-primary);
    font-weight: var(--font-weight-bold);
}

.business-stats-categories {
    padding: 16px 24px;
    border-bottom: 1px solid var(--color-border-light);
    max-height: 300px;
    overflow-y: auto;
}

.categories-title {
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin: 0 0 12px 0;
}

.categories-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.category-stat-item {
    background: var(--color-surface-secondary);
    border-radius: var(--border-radius-medium);
    padding: 12px;
    border: 1px solid var(--color-border-light);
}

.category-stat-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.category-color-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.category-code {
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: #bbbbbb;
    color: #4e4e4e;
    padding: 2px 6px;
    border-radius: var(--border-radius-small);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    flex-shrink: 0;
}

.category-count {
    font-size: 0.9rem;
    color: var(--color-text-primary);
    font-weight: var(--font-weight-bold);
    margin-left: auto;
}

.category-stat-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.category-name {
    font-size: 0.85rem;
    color: var(--color-text-primary);
    line-height: 1.3;
}

.category-jobs {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

.business-stats-footer {
    padding: 16px 24px 20px 24px;
}

.business-stats-change-button {
    width: 100%;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius-medium);
    padding: 12px 16px;
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.business-stats-change-button:hover {
    background: #000000;
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.business-stats-change-button:active {
    transform: translateY(0);
}

.business-stats-change-button .change-icon {
    transition: transform 0.2s ease;
}

.business-stats-change-button:hover .change-icon {
    transform: rotate(180deg);
}

/* Business Popup Styles */
.business-popup {
    font-family: var(--font-family, 'Ruda', sans-serif);
    max-width: 300px;
    padding: 20px;
}

.business-popup h3 {
    font-size: 1.1rem;
    font-weight: var(--font-weight-bold, 700);
    color: var(--color-text-primary, #1a1a1a);
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.business-popup p {
    font-size: 0.9rem;
    color: var(--color-text-secondary, #666);
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.business-popup p:last-child {
    margin-bottom: 0;
}

.business-popup strong {
    color: var(--color-text-primary, #1a1a1a);
    font-weight: var(--font-weight-semibold, 600);
}

/* Mobile responsive styles for BusinessStatsPane */
@media (max-width: 768px) {
    
    .business-stats-content {
        border-radius: var(--border-radius-medium);
    }
    
    .business-stats-header {
        padding: 16px 20px 12px 20px;
    }
    
    .business-stats-title {
        font-size: 1.1em;
        margin-bottom: 12px;
    }
    
    .stats-item {
        padding: 6px 0;
    }
    
    .stats-label {
        font-size: 0.85rem;
    }
    
    .stats-value {
        font-size: 0.9rem;
    }
    
    .business-stats-categories {
        padding: 12px 20px;
        max-height: 200px;
    }
    
    .categories-title {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
    
    .category-stat-item {
        padding: 10px;
    }
    
    .category-stat-header {
        gap: 6px;
        margin-bottom: 4px;
    }
    
    .category-code {
        font-size: 0.7rem;
        padding: 1px 4px;
    }
    
    .category-name {
        font-size: 0.8rem;
    }
    
    .category-jobs {
        font-size: 0.75rem;
    }
    
    .business-stats-footer {
        padding: 12px 20px 16px 20px;
    }
    
    .business-stats-change-button {
        padding: 10px 14px;
        font-size: 0.85rem;
    }
}

/* Android-specific font size adjustments */
@media screen and (max-width: 768px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait) {
    /* Business Stats Pane */
    .business-stats-pane {
        --font-size-base: 0.7rem;  /* 30% smaller than default 1rem */
        --font-size-lg: 0.84rem;   /* 30% smaller than default 1.2rem */
        --font-size-xl: 0.98rem;   /* 30% smaller than default 1.4rem */
        --font-size-sm: 0.63rem;   /* 30% smaller than default 0.9rem */
        --font-size-xs: 0.56rem;   /* 30% smaller than default 0.8rem */
    }

    .stats-title {
        font-size: 0.84rem !important;
    }

    .stat-number {
        font-size: 0.77rem !important;
    }

    .stat-label {
        font-size: 0.63rem !important;
    }

    .category-title {
        font-size: 0.7rem !important;
    }

    .category-details {
        font-size: 0.63rem !important;
    }

    .category-detail {
        font-size: 0.56rem !important;
    }

    .indicator-hint {
        font-size: 0.56rem !important;
    }

    /* Business Indicator Pane */
    .business-indicator-pane {
        --font-size-base: 0.7rem;
        --font-size-lg: 0.84rem;
        --font-size-xl: 0.98rem;
        --font-size-sm: 0.63rem;
        --font-size-xs: 0.56rem;
    }

    .indicator-title {
        font-size: 0.84rem !important;
    }

    .indicator-label {
        font-size: 0.77rem !important;
    }

    .indicator-number {
        font-size: 0.7rem !important;
    }

    .indicator-description {
        font-size: 0.63rem !important;
    }
}

/* Trips Panel Styles */
.trips-panel {
    background: var(--color-surface, #ffffff);
    border: 1px solid var(--color-border-light, #e5e7eb);
    border-radius: var(--border-radius-large, 12px);
    box-shadow: var(--shadow-large, 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04));
    z-index: 1000;
    overflow: hidden;
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    /* Default fixed positioning for trips-panel when not in container */
    position: fixed;
    top: 80px;
    left: 20px;
    width: 360px;
    max-height: calc(100vh - 100px);
}

/* When in left-panels-container, use relative positioning */
.left-panels-container .trips-panel {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    height: 100%;
    max-height: none;
}

.trips-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border-light, #e5e7eb);
    background: var(--color-background, #ffffff);
}

.trips-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-primary, #374151);
}

.trips-content {
    padding: 16px 20px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* When in left-panels-container, adjust trips-content height */
.left-panels-container .trips-content {
    max-height: none;
}

.country-group {
    margin-bottom: 12px;
}

.country-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: var(--border-radius-medium, 6px);
    background: var(--color-background, #ffffff);
    border: 1px solid var(--color-border-light, #e5e7eb);
    transition: all 0.2s ease;
}

.country-item:hover {
    background: var(--color-hover-background, #f9fafb);
    border-color: var(--color-hover-border, #9ca3af);
}

.country-item.clickable {
    cursor: pointer;
}

.country-item.clickable:hover {
    background: var(--color-hover-background, #f9fafb);
    border-color: var(--color-hover-border, #9ca3af);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium, 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06));
}

.country-flag {
    font-size: 1.2rem;
    min-width: 24px;
    text-align: center;
}

.country-name {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-primary, #374151);
}

.country-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary, #FFA500);
    background: var(--color-primary, #FFA500);
    color: white;
    padding: 4px 8px;
    border-radius: var(--border-radius-small, 4px);
    min-width: 24px;
    text-align: center;
}

.loading, .error {
    text-align: center;
    padding: 20px;
    color: var(--color-text-secondary, #6b7280);
    font-size: 0.9rem;
}

.error {
    color: var(--color-status-error, #ef4444);
}

/* Trips Divider Styles */
.trips-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 24px 12px;
    position: relative;
}

.trips-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--color-border-light, #e5e7eb);
    z-index: 1;
}

.divider-text {
    background: var(--color-background, #ffffff);
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary, #6b7280);
    border-radius: var(--border-radius-medium, 6px);
    border: 1px solid var(--color-border-light, #e5e7eb);
    position: relative;
    z-index: 2;
    white-space: nowrap;
}

/* Enhanced Loading Indicator Styles */
.trips-panel .loading-indicator {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--color-background, #ffffff);
    border: 1px solid var(--color-border-light, #e5e7eb);
    border-radius: var(--border-radius-medium, 6px);
    margin-bottom: 16px;
    box-shadow: var(--shadow-small, 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06));
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--color-border-light, #e5e7eb);
    border-top: 3px solid var(--color-primary, #FFA500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    flex-shrink: 0;
}

.loading-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.loading-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-primary, #374151);
    margin: 0;
}

.loading-progress {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--color-border-light, #e5e7eb);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary, #FFA500), #ffb84d);
    border-radius: 3px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

.progress-text {
    font-size: 0.8rem;
    color: var(--color-text-secondary, #6b7280);
    text-align: center;
    font-weight: 500;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Devices view styles */
.devices-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.back-button {
    background: var(--color-primary, #FFA500);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: var(--border-radius-small, 4px);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.back-button:hover {
    background: var(--color-primary, #FFA500);
    opacity: 0.9;
    transform: translateY(-1px);
}

.device-group {
    margin-bottom: 12px;
}

.device-item {
    padding: 12px;
    border-radius: var(--border-radius-medium, 6px);
    background: var(--color-background, #ffffff);
    border: 1px solid var(--color-border-light, #e5e7eb);
    transition: all 0.2s ease;
    position: relative;
}

.device-item.clickable {
    cursor: pointer;
}

.device-item.clickable:hover {
    background: var(--color-hover-background, #f9fafb);
    border-color: var(--color-hover-border, #9ca3af);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium, 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06));
}

.device-item.selected {
    background: var(--color-primary-light, #fff3e0);
    border-color: var(--color-primary, #FFA500);
    box-shadow: 0 0 0 2px rgba(255, 165, 0, 0.2);
}

.device-item.loading {
    opacity: 0.7;
    pointer-events: none;
}

.device-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.device-id {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-primary, #374151);
    font-family: 'Courier New', monospace;
}

.device-details {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
}

.device-type {
    color: var(--color-text-secondary, #6b7280);
    background: var(--color-surface, #f8f9fa);
    padding: 2px 6px;
    border-radius: var(--border-radius-small, 4px);
}

.device-trips {
    color: var(--color-primary, #FFA500);
    font-weight: 500;
}

.device-files {
    font-size: 0.75rem;
    color: var(--color-primary, #FFA500);
    background: rgba(255, 165, 0, 0.1);
    padding: 2px 6px;
    border-radius: var(--border-radius-small, 4px);
    font-weight: 500;
}

.device-loading {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--color-text-secondary, #6b7280);
}

.device-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--color-border-light, #e5e7eb);
    border-top: 2px solid var(--color-primary, #FFA500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.device-timestamps {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.75rem;
}

.timestamp {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timestamp-label {
    color: var(--color-text-secondary, #6b7280);
    font-weight: 500;
}

.timestamp-value {
    color: var(--color-text-primary, #374151);
    font-family: 'Courier New', monospace;
}

/* Trip Item Styles */
.trip-group {
    margin-bottom: 12px;
}

.trip-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid var(--color-border-light, #e5e7eb);
    margin-bottom: 8px;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.trip-item:last-child {
    margin-bottom: 0;
}

.trip-item.clickable {
    cursor: pointer;
}

.trip-item.clickable:hover {
    background: var(--color-hover-background, #f9fafb);
    border-color: var(--color-border-light, #d1d5db);
}

.trip-item.loading {
    opacity: 0.6;
    pointer-events: none;
}

.trip-icon {
    display: none;
}

.trip-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.trip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.trip-identifier {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-primary, #374151);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trip-pings-badge {
    background: var(--color-border-light, #e5e7eb);
    color: var(--color-text-secondary, #6b7280);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 400;
    white-space: nowrap;
}

.trip-timestamps {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.trip-timestamps .timestamp {
    display: flex;
    align-items: center;
    gap: 8px;
}

.trip-timestamps .timestamp-icon {
    display: none;
}

.trip-timestamps .timestamp-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.trip-timestamps .timestamp-label {
    font-size: 0.75rem;
    color: var(--color-text-secondary, #6b7280);
    font-weight: 400;
    min-width: 40px;
}

.trip-timestamps .timestamp-value {
    font-size: 0.8rem;
    color: var(--color-text-primary, #374151);
    font-weight: 400;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.trip-loading {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
}

.trip-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--color-border-light, #e5e7eb);
    border-top: 2px solid var(--color-primary, #FFA500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.trips-header-details {
    flex: 1;
}

.trips-header-details h3 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary, #374151);
}

.trips-count {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-text-secondary, #6b7280);
    font-weight: 500;
}

/* Trip Detail Panel Styles */
.trip-detail-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border-light, #e5e7eb);
}

.trip-detail-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid var(--color-border-light, #e5e7eb);
}

.daily-segmentation-section {
    margin-top: 24px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary, #374151);
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-primary, #FFA500);
    flex: 1;
}

.clear-day-button {
    background: var(--color-primary, #FFA500);
    color: white;
    border: none;
    border-radius: var(--border-radius-small, 4px);
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 12px;
}

.clear-day-button:hover {
    background: #ffb84d;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(255, 165, 0, 0.3);
}

.days-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.day-item {
    padding: 12px;
    border-radius: var(--border-radius-medium, 6px);
    background: var(--color-background, #ffffff);
    border: 1px solid var(--color-border-light, #e5e7eb);
    transition: all 0.2s ease;
}

.day-item.clickable {
    cursor: pointer;
}

.day-item.clickable:hover {
    background: var(--color-hover-background, #f9fafb);
    border-color: var(--color-primary, #FFA500);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.day-item.selected {
    background: rgba(0, 255, 0, 0.1);
    border-color: #00FF00;
    border-width: 2px;
    box-shadow: 0 0 0 2px rgba(0, 255, 0, 0.2);
}

.day-item.selected .day-item-number {
    color: #00AA00;
    font-weight: 700;
}

.day-item-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.day-item-number {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary, #FFA500);
    min-width: 60px;
}

.day-item-date {
    font-size: 0.85rem;
    color: var(--color-text-primary, #374151);
    font-weight: 500;
}

.no-days-message {
    padding: 16px;
    text-align: center;
    color: var(--color-text-secondary, #6b7280);
    font-size: 0.85rem;
    font-style: italic;
}

/* Dark theme support for trip detail */
[data-theme="dark"] .trip-detail-item {
    background: var(--color-background, #1f2937);
    border-color: var(--color-border-light, #4b5563);
}

[data-theme="dark"] .section-title {
    color: var(--color-text-primary, #f9fafb);
    border-color: var(--color-primary, #FFA500);
}

[data-theme="dark"] .day-item {
    background: var(--color-background, #1f2937);
    border-color: var(--color-border-light, #4b5563);
}

[data-theme="dark"] .day-item:hover {
    background: var(--color-hover-background, #4b5563);
    border-color: var(--color-primary, #FFA500);
}

[data-theme="dark"] .day-item-date {
    color: var(--color-text-primary, #f9fafb);
}

[data-theme="dark"] .no-days-message {
    color: var(--color-text-secondary, #d1d5db);
}

[data-theme="dark"] .day-item.selected {
    background: rgba(0, 255, 0, 0.15);
    border-color: #00FF00;
}

[data-theme="dark"] .clear-day-button {
    background: var(--color-primary, #FFA500);
}

[data-theme="dark"] .clear-day-button:hover {
    background: #ffb84d;
}

/* Dark theme support for trips panel */
[data-theme="dark"] .trips-panel {
    background: var(--color-surface, #374151);
    border-color: var(--color-border-light, #4b5563);
}

[data-theme="dark"] .trips-header {
    background: var(--color-background, #1f2937);
    border-color: var(--color-border-light, #4b5563);
}

[data-theme="dark"] .trips-header h3 {
    color: var(--color-text-primary, #f9fafb);
}

[data-theme="dark"] .country-item {
    background: var(--color-background, #1f2937);
    border-color: var(--color-border-light, #4b5563);
}

[data-theme="dark"] .country-item:hover {
    background: var(--color-hover-background, #4b5563);
    border-color: var(--color-hover-border, #9ca3af);
}

[data-theme="dark"] .country-name {
    color: var(--color-text-primary, #f9fafb);
}

[data-theme="dark"] .loading, 
[data-theme="dark"] .error {
    color: var(--color-text-secondary, #d1d5db);
}

[data-theme="dark"] .error {
    color: var(--color-status-error, #f87171);
}

/* Dark theme support for devices view */
[data-theme="dark"] .device-item {
    background: var(--color-background, #1f2937);
    border-color: var(--color-border-light, #4b5563);
}

[data-theme="dark"] .device-item:hover {
    background: var(--color-hover-background, #4b5563);
    border-color: var(--color-hover-border, #9ca3af);
}

[data-theme="dark"] .device-id {
    color: var(--color-text-primary, #f9fafb);
}

[data-theme="dark"] .device-type {
    color: var(--color-text-secondary, #d1d5db);
    background: var(--color-surface, #374151);
}

[data-theme="dark"] .device-trips {
    color: var(--color-primary, #FFA500);
}

[data-theme="dark"] .timestamp-label {
    color: var(--color-text-secondary, #d1d5db);
}

[data-theme="dark"] .timestamp-value {
    color: var(--color-text-primary, #f9fafb);
}

/* Dark theme support for trip items */
[data-theme="dark"] .trip-item {
    background: var(--color-background-dark, #1f2937);
    border-color: var(--color-border-dark, #374151);
}

[data-theme="dark"] .trip-item:hover {
    background: var(--color-hover-background, #4b5563);
}

[data-theme="dark"] .trip-identifier {
    color: var(--color-text-primary, #f9fafb);
}

[data-theme="dark"] .trip-pings-badge {
    background: var(--color-border-dark, #374151);
    color: var(--color-text-secondary-dark, #9ca3af);
}

[data-theme="dark"] .trip-timestamps .timestamp-label {
    color: var(--color-text-secondary, #d1d5db);
}

[data-theme="dark"] .trip-timestamps .timestamp-value {
    color: var(--color-text-primary, #f9fafb);
}

[data-theme="dark"] .trip-detail-item {
    background: var(--color-background-dark, #1f2937);
    border-color: var(--color-border-dark, #374151);
}

[data-theme="dark"] .trips-header-details h3 {
    color: var(--color-text-primary, #f9fafb);
}

[data-theme="dark"] .trips-count {
    color: var(--color-text-secondary, #d1d5db);
}

/* Dark theme support for trips divider */
[data-theme="dark"] .trips-divider::before {
    background: var(--color-border-light, #4b5563);
}

[data-theme="dark"] .divider-text {
    background: var(--color-background, #1f2937);
    color: var(--color-text-secondary, #d1d5db);
    border-color: var(--color-border-light, #4b5563);
}

/* Dark theme support for enhanced components */
[data-theme="dark"] .trips-loading-spinner {
    border-color: var(--color-border-light, #4b5563);
    border-top-color: var(--color-primary, #FFA500);
}

[data-theme="dark"] .trips-loading-text {
    color: var(--color-text-primary, #f9fafb);
}

[data-theme="dark"] .trips-progress-bar {
    background: var(--color-border-light, #4b5563);
}

[data-theme="dark"] .trips-progress-text {
    color: var(--color-text-secondary, #d1d5db);
}

[data-theme="dark"] .country-card {
    background: var(--color-background, #1f2937);
    border-color: var(--color-border-light, #4b5563);
}

[data-theme="dark"] .country-card:hover {
    border-color: var(--color-primary, #FFA500);
}

[data-theme="dark"] .country-info h4 {
    color: var(--color-text-primary, #f9fafb);
}

[data-theme="dark"] .country-code {
    color: var(--color-text-secondary, #d1d5db);
}

[data-theme="dark"] .stat-label {
    color: var(--color-text-secondary, #d1d5db);
}

[data-theme="dark"] .device-card {
    background: var(--color-background, #1f2937);
    border-color: var(--color-border-light, #4b5563);
}

[data-theme="dark"] .device-card:hover {
    background: var(--color-hover-background, #4b5563);
    border-color: var(--color-hover-border, #9ca3af);
}

[data-theme="dark"] .device-main-info h4 {
    color: var(--color-text-primary, #f9fafb);
}

[data-theme="dark"] .device-type-badge {
    background: var(--color-surface, #374151);
    color: var(--color-text-secondary, #d1d5db);
}

[data-theme="dark"] .timeline-icon {
    background: var(--color-surface, #374151);
    color: var(--color-text-secondary, #d1d5db);
}

[data-theme="dark"] .timeline-label {
    color: var(--color-text-secondary, #d1d5db);
}

[data-theme="dark"] .timeline-value {
    color: var(--color-text-primary, #f9fafb);
}

[data-theme="dark"] .devices-header-info h3 {
    color: var(--color-text-primary, #f9fafb);
}

[data-theme="dark"] .devices-count {
    color: var(--color-text-secondary, #d1d5db);
}

/* Enhanced Loading Styles */
.trips-loading-container {
    padding: 24px 20px;
    text-align: center;
}

.trips-loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.trips-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-border-light, #e5e7eb);
    border-top: 3px solid var(--color-primary, #FFA500);
    border-radius: 50%;
    animation: spin 1s linear infinite, pulse 2s ease-in-out infinite;
}

.trips-loading-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-primary, #374151);
}

.trips-progress-container {
    width: 100%;
    max-width: 200px;
}

.trips-progress-bar {
    width: 100%;
    height: 6px;
    background: var(--color-border-light, #e5e7eb);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.trips-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary, #FFA500), #ffb84d);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.trips-progress-text {
    font-size: 0.8rem;
    color: var(--color-text-secondary, #6b7280);
    font-weight: 500;
}

/* Enhanced Country Cards */
.countries-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.country-card {
    background: var(--color-background, #ffffff);
    border: 1px solid var(--color-border-light, #e5e7eb);
    border-radius: var(--border-radius-medium, 8px);
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out;
}

.country-card:nth-child(1) { animation-delay: 0.1s; }
.country-card:nth-child(2) { animation-delay: 0.2s; }
.country-card:nth-child(3) { animation-delay: 0.3s; }
.country-card:nth-child(4) { animation-delay: 0.4s; }
.country-card:nth-child(5) { animation-delay: 0.5s; }
.country-card:nth-child(n+6) { animation-delay: 0.6s; }

.country-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary, #FFA500), #ffb84d);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.country-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium, 0 8px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05));
    border-color: var(--color-primary, #FFA500);
}

.country-card:hover::before {
    transform: scaleX(1);
}

.country-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.country-flag-large {
    font-size: 2rem;
    min-width: 40px;
    text-align: center;
}

.country-info {
    flex: 1;
}

.country-info h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary, #374151);
    line-height: 1.2;
}

.country-code {
    margin: 2px 0 0 0;
    font-size: 0.8rem;
    color: var(--color-text-secondary, #6b7280);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.country-card-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.stat-number {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-primary, #FFA500);
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--color-text-secondary, #6b7280);
    font-weight: 500;
    margin-top: 2px;
}

.country-card-footer {
    text-align: center;
}

.view-details {
    font-size: 0.8rem;
    color: var(--color-primary, #FFA500);
    font-weight: 500;
    transition: color 0.2s ease;
}

.country-card:hover .view-details {
    color: #ff8c00;
}

/* Enhanced Device Cards */
.devices-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.device-card {
    background: var(--color-background, #ffffff);
    border: 1px solid var(--color-border-light, #e5e7eb);
    border-radius: var(--border-radius-medium, 8px);
    padding: 16px;
    transition: all 0.2s ease;
    animation: slideInLeft 0.4s ease-out;
}

.device-card:nth-child(1) { animation-delay: 0.1s; }
.device-card:nth-child(2) { animation-delay: 0.15s; }
.device-card:nth-child(3) { animation-delay: 0.2s; }
.device-card:nth-child(4) { animation-delay: 0.25s; }
.device-card:nth-child(5) { animation-delay: 0.3s; }
.device-card:nth-child(n+6) { animation-delay: 0.35s; }

.device-card:hover {
    background: var(--color-hover-background, #f9fafb);
    border-color: var(--color-hover-border, #9ca3af);
    transform: translateY(-1px);
    box-shadow: var(--shadow-small, 0 2px 4px -1px rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.06));
}

.device-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.device-icon {
    width: 40px;
    height: 40px;
    background: var(--color-primary, #FFA500);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.device-main-info {
    flex: 1;
}

.device-main-info h4 {
    margin: 0 0 6px 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-primary, #374151);
    font-family: 'Courier New', monospace;
    line-height: 1.2;
}

.device-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.device-type-badge {
    background: var(--color-surface, #f8f9fa);
    color: var(--color-text-secondary, #6b7280);
    padding: 2px 8px;
    border-radius: var(--border-radius-small, 4px);
    font-size: 0.75rem;
    font-weight: 500;
}

.device-location-badge {
    background: var(--color-primary, #FFA500);
    color: white;
    padding: 2px 8px;
    border-radius: var(--border-radius-small, 4px);
    font-size: 0.75rem;
    font-weight: 500;
}

.device-card-body {
    margin-top: 8px;
}

.device-timeline {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline-icon {
    width: 24px;
    height: 24px;
    background: var(--color-surface, #f8f9fa);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary, #6b7280);
    flex-shrink: 0;
}

.timeline-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.timeline-label {
    font-size: 0.75rem;
    color: var(--color-text-secondary, #6b7280);
    font-weight: 500;
}

.timeline-value {
    font-size: 0.8rem;
    color: var(--color-text-primary, #374151);
    font-family: 'Courier New', monospace;
}

/* Enhanced Back Button */
.back-button-modern {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--color-primary, #FFA500);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--border-radius-medium, 8px);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Ruda', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.back-button-modern:hover {
    background: #ff8c00;
    transform: translateY(-1px);
    box-shadow: var(--shadow-small, 0 2px 4px -1px rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.06));
}

.devices-header-info {
    flex: 1;
}

.devices-header-info h3 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-primary, #374151);
}

.devices-count {
    margin: 0;
    font-size: 0.8rem;
    color: var(--color-text-secondary, #6b7280);
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .trips-panel {
        position: fixed;
        top: 60px;
        left: 10px;
        right: 10px;
        width: auto;
        max-height: calc(100vh - 80px);
    }
    
    .trips-header {
        padding: 12px 16px;
    }
    
    .trips-content {
        padding: 12px 16px;
        max-height: calc(100vh - 140px);
    }
    
    .country-card {
        padding: 12px;
    }
    
    .country-card-header {
        gap: 8px;
        margin-bottom: 8px;
    }
    
    .country-flag-large {
        font-size: 1.5rem;
        min-width: 32px;
    }
    
    .country-info h4 {
        font-size: 0.9rem;
    }
    
    .country-card-stats {
        gap: 12px;
        margin-bottom: 8px;
    }
    
    .stat-number {
        font-size: 1rem;
    }
    
    .device-card {
        padding: 12px;
    }
    
    .device-card-header {
        gap: 8px;
        margin-bottom: 8px;
    }
    
    .device-icon {
        width: 32px;
        height: 32px;
    }
    
    .device-main-info h4 {
        font-size: 0.8rem;
    }
    
    .device-badges {
        gap: 6px;
    }
    
    .device-type-badge,
    .device-location-badge {
        font-size: 0.7rem;
        padding: 1px 6px;
    }
    
    .timeline-icon {
        width: 20px;
        height: 20px;
    }
    
    .timeline-label {
        font-size: 0.7rem;
    }
    
    .timeline-value {
        font-size: 0.75rem;
    }
    
    .back-button-modern {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .devices-header-info h3 {
        font-size: 1rem;
    }
    
    .devices-count {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .trips-panel {
        top: 50px;
        left: 5px;
        right: 5px;
        max-height: calc(100vh - 60px);
    }
    
    .trips-header {
        padding: 10px 12px;
    }
    
    .trips-content {
        padding: 10px 12px;
        max-height: calc(100vh - 120px);
    }
    
    .country-card {
        padding: 10px;
    }
    
    .country-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .country-info {
        width: 100%;
    }
    
    .country-card-stats {
        justify-content: space-around;
    }
    
    .device-card {
        padding: 10px;
    }
    
    .device-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .device-main-info {
        width: 100%;
    }
    
    .device-badges {
        justify-content: flex-start;
    }
    
    .devices-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .devices-header-info {
        width: 100%;
    }
}

/* Layers Panel Styles */
.layers-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 16px;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    /* Default fixed positioning for layers-panel when not in container */
    position: fixed;
    top: 100px;
    right: 20px;
    min-width: 250px;
    max-width: 300px;
    max-height: calc(100vh - 140px);
    width: auto;
    height: auto;
}

/* When in left-panels-container, use relative positioning and match TripsPanel width */
.left-panels-container .layers-panel {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    height: 100%;
    min-width: auto;
    max-width: none;
    max-height: none;
    /* Ensure it matches TripsPanel width of 360px */
    box-sizing: border-box;
}

/* Custom scrollbar for layers panel */
.layers-panel::-webkit-scrollbar {
    width: 6px;
}

.layers-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.layers-panel::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.layers-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.layers-header {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* When collapsed, adjust header */
.layers-panel-collapsed .layers-header {
    margin-bottom: 0;
    border-bottom: none;
}

.layers-content {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.layers-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.layer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.layer-item:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

.layer-item.active {
    background: rgba(52, 152, 219, 0.1);
    border-color: rgba(52, 152, 219, 0.3);
}

.layer-item.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.layer-checkbox {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

.layer-checkbox input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
}

.layer-checkbox input:checked ~ .checkmark {
    background-color: #3498db;
    border-color: #3498db;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.layer-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.layer-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.layer-name {
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    line-height: 1.3;
}

.layer-loading {
    font-size: 12px;
    color: #7f8c8d;
    font-style: italic;
}

/* Separator Styles */
.layers-separator {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 16px 0;
}

/* Downloads Section Styles */
.downloads-title {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.downloads-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.download-link {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
}

.download-link:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: #1a1a1a;
}

.download-link:active {
    background: rgba(0, 0, 0, 0.08);
    transform: translateY(1px);
}

.download-link svg {
    flex-shrink: 0;
}

/* Transport Section Styles */
.transport-header {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.transport-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.transport-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.transport-item:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

.transport-item.active {
    background: rgba(52, 152, 219, 0.08);
    border-color: rgba(52, 152, 219, 0.2);
}

.transport-item.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.transport-checkbox {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

.transport-checkbox input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    cursor: pointer;
    height: 0;
    width: 0;
}

.transport-checkbox .checkmark {
    height: 16px;
    width: 16px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 3px;
    position: relative;
    transition: all 0.2s ease;
}

.transport-checkbox input:checked ~ .checkmark {
    background-color: #3498db;
    border-color: #3498db;
}

.transport-checkbox .checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 4px;
    top: 1px;
    width: 3px;
    height: 6px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.transport-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.transport-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.transport-name {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
}

.transport-loading {
    font-size: 11px;
    color: #7f8c8d;
    font-style: italic;
}

/* Metro Station Tooltip Styles */
.metro-station-tooltip {
    padding: 12px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    min-width: 150px;
}

.metro-station-tooltip h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.2;
}

.metro-station-tooltip p {
    margin: 0 0 4px 0;
    font-size: 13px;
    color: #7f8c8d;
    font-weight: 500;
}

.metro-station-tooltip .station-id {
    font-size: 11px;
    color: #95a5a6;
    font-family: monospace;
    margin-top: 4px;
}

.metro-station-tooltip .station-route {
    font-size: 12px;
    color: #34495e;
    font-style: italic;
    margin-top: 2px;
}

/* Public Transport List Styles */
.public-transport-list {
    margin-bottom: 16px;
}

.transport-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.transport-section-header:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

.transport-header-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.transport-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.transport-count {
    font-size: 12px;
    color: #7f8c8d;
    font-weight: 500;
}

.transport-chevron {
    font-size: 12px;
    color: #7f8c8d;
    transition: transform 0.2s ease;
    user-select: none;
}

.transport-chevron.collapsed {
    transform: rotate(-90deg);
}

.transport-chevron.expanded {
    transform: rotate(0deg);
}

.transport-content {
    margin-top: 8px;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

/* Mobile responsiveness for layers panel */
@media (max-width: 768px) {
    .layers-panel {
        top: 100px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
        max-height: calc(100vh - 120px);
        padding: 12px;
    }
    
    .layers-header {
        font-size: 14px;
    }
    
    .layer-name {
        font-size: 13px;
    }
}

/* Table Modal - Ensure it appears above everything including navbar */
.table-modal-overlay {
    z-index: 2147483647 !important;
    position: fixed !important;
}

.table-modal {
    z-index: 2147483647 !important;
    position: relative !important;
}

/* Loading spinner for neighbourhoods data */
.neighbourhoods-loading-spinner {
    animation: spin 1s linear infinite;
}
/* Índice de habitabilidad card (GeozoneDetailsPanel) */
.hab-status {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #6B7280;
    font-family: 'Ruda', sans-serif;
}

.hab-summary {
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: 'Ruda', sans-serif;
}

.hab-score {
    flex: 0 0 auto;
    width: 84px;
    height: 84px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hab-score-number {
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.5px;
}

.hab-score-scale {
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
    opacity: 0.8;
}

.hab-summary-text {
    min-width: 0;
}

.hab-summary-text p {
    margin: 0;
}

.hab-eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #6B7280;
}

.hab-rank {
    font-size: 15px;
    color: #374151;
    margin: 2px 0 4px !important;
}

.hab-rank strong {
    font-size: 22px;
    font-weight: 800;
    color: #111827;
}

.hab-caption {
    font-size: 12px;
    line-height: 1.4;
    color: #6B7280;
}

.hab-radar {
    display: block;
    width: 100%;
    max-width: 300px;
    height: auto;
    margin: 0 auto;
}

.hab-radar-axis {
    cursor: pointer;
}

.hab-radar-label {
    font-size: 12px;
    font-weight: 500;
    font-family: 'Ruda', sans-serif;
}

.hab-radar-label.is-active {
    font-weight: 700;
}

.hab-radar-value {
    font-size: 13px;
    font-weight: 700;
    font-family: 'Ruda', sans-serif;
}

.hab-radar-value.is-peak {
    font-size: 16px;
    font-weight: 800;
}

.hab-radar-peak {
    pointer-events: none;
}

.hab-axes {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    border-top: 1px solid #F3F4F6;
}

.hab-axis {
    border-bottom: 1px solid #F3F4F6;
}

/* The axis of the tab the user is on. */
.hab-axis.is-highlighted .hab-axis-head {
    padding-left: 10px;
    margin-left: -8px;
    width: calc(100% + 8px);
    border-radius: 8px;
    background: color-mix(in srgb, var(--axis-color) 10%, transparent);
    box-shadow: inset 3px 0 0 var(--axis-color);
    color: #111827;
}

.hab-axis.is-highlighted .hab-axis-name,
.hab-axis.is-highlighted .hab-axis-value {
    font-weight: 800;
}

.hab-axis-head {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 2px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: 'Ruda', sans-serif;
    color: #374151;
}

.hab-axis-head:hover .hab-axis-name {
    color: #111827;
}

.hab-axis-dot {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--axis-color);
}

.hab-axis-name {
    flex: 0 0 104px;
    font-size: 13px;
    font-weight: 600;
}

.hab-bar {
    flex: 1 1 auto;
    display: block;
    height: 6px;
    border-radius: 3px;
    background: #F3F4F6;
    overflow: hidden;
}

.hab-bar-fill {
    display: block;
    height: 100%;
    border-radius: 3px;
    background: var(--axis-color);
}

.hab-axis-value {
    flex: 0 0 auto;
    min-width: 30px;
    text-align: right;
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}

.hab-axis-value.is-missing {
    font-size: 12px;
    font-weight: 500;
    color: #9CA3AF;
}

.hab-axis-chevron {
    flex: 0 0 auto;
    color: #9CA3AF;
    transition: transform 0.2s ease;
}

.hab-axis.is-open .hab-axis-chevron {
    transform: rotate(180deg);
}

.hab-indicators {
    list-style: none;
    margin: 0 0 12px 18px;
    padding: 4px 0 0 12px;
    border-left: 2px solid var(--axis-color);
    font-family: 'Ruda', sans-serif;
}

.hab-indicator {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 12px;
    row-gap: 5px;
    align-items: baseline;
    padding: 6px 0;
}

.hab-indicator-label {
    font-size: 12px;
    line-height: 1.35;
    color: #4B5563;
}

.hab-indicator-value {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
}

.hab-bar-thin {
    grid-column: 1 / -1;
    height: 4px;
    opacity: 0.85;
}

.hab-indicators-note {
    padding: 6px 0 2px;
    font-size: 11px;
    line-height: 1.4;
    color: #9CA3AF;
}

.hab-method-toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: #2563EB;
    font-family: 'Ruda', sans-serif;
}

.hab-method-toggle:hover {
    text-decoration: underline;
}

.hab-method {
    margin-top: 8px;
    padding: 12px;
    border-radius: 8px;
    background: #F9FAFB;
    font-size: 12px;
    line-height: 1.5;
    color: #4B5563;
    font-family: 'Ruda', sans-serif;
}

.hab-method p {
    margin: 0 0 6px;
}

.hab-method p:last-child {
    margin: 0;
}

.hab-ranking .hab-eyebrow {
    margin: 0;
}

.hab-ranking {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-family: 'Ruda', sans-serif;
}

.hab-ranking-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 32px;
}

.hab-ranking-home {
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid #BFDBFE;
    border-radius: 999px;
    background: #EFF6FF;
    color: #1D4ED8;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.hab-ranking-focus {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: #F9FAFB;
}

.hab-ranking-badge {
    flex: 0 0 auto;
    min-width: 56px;
    padding: 10px 6px;
    border-radius: 12px;
    text-align: center;
    font-size: 16px;
    font-weight: 800;
}

.hab-ranking-focus-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hab-ranking-focus-text .hab-caption {
    margin: 0;
}

.hab-ranking-focus-rank {
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    color: #111827;
}

.hab-ranking-focus-name {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hab-ranking-open {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0 14px;
    border: none;
    border-radius: 10px;
    background: #111827;
    color: #FFFFFF;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.hab-ranking-strip {
    display: flex;
    align-items: flex-end;
    gap: 1px;
    height: 60px;
    margin-top: 4px;
}

.hab-ranking-bucket {
    flex: 1 1 0;
    min-width: 0;
    padding: 0;
    border: none;
    border-radius: 2px 2px 0 0;
    background: var(--bucket-color);
    opacity: 0.5;
    cursor: pointer;
}

.hab-ranking-bucket:hover {
    opacity: 0.8;
}

.hab-ranking-bucket.is-home {
    opacity: 0.9;
}

.hab-ranking-bucket.is-current {
    background: #1D4ED8;
    opacity: 1;
}

.hab-ranking-slider {
    width: 100%;
    height: 28px;
    margin: 0;
    accent-color: #1D4ED8;
}

.hab-ranking-ends {
    display: flex;
    justify-content: space-between;
    margin-top: -6px;
    font-size: 11px;
    color: #6B7280;
}

.hab-ranking-steps {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
}

.hab-ranking-steps button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 40px;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    background: #FFFFFF;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    cursor: pointer;
}

.hab-ranking-steps svg {
    flex: 0 0 auto;
}

.hab-ranking-steps button:disabled {
    color: #D1D5DB;
    cursor: default;
}

.hab-ranking-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hab-ranking-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 46px;
    padding: 6px 10px;
    border: none;
    border-radius: 8px;
    background: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    color: #374151;
}

.hab-ranking-row:hover {
    background: #F9FAFB;
}

.hab-ranking-row.is-home {
    background: #EFF6FF;
}

.hab-ranking-row.is-current {
    box-shadow: inset 3px 0 0 #1D4ED8;
}

.hab-ranking-rank {
    flex: 0 0 52px;
    font-size: 12px;
    font-weight: 700;
    color: #6B7280;
    font-variant-numeric: tabular-nums;
}

.is-current .hab-ranking-rank {
    color: #1D4ED8;
}

.hab-ranking-name {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

.hab-ranking-name > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hab-ranking-place {
    font-size: 11px;
    font-weight: 500;
    color: #6B7280;
}

.hab-ranking-score {
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 800;
    color: #111827;
    font-variant-numeric: tabular-nums;
}

/* Transport hover tooltip (TransportSystemsPanel): line or station, with its icon and the system's logo */
.mapboxgl-popup.tx-hover { pointer-events: none; }
/* the page sets padding: 0 !important on every popup, so the padding lives on .tx-tip */
.tx-hover .mapboxgl-popup-content { border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 8px 24px rgba(0,0,0,.10); font-family: inherit; color: #111; }
.tx-tip { display: flex; flex-direction: column; gap: 6px; min-width: 200px; padding: 14px 16px; font-size: 13px; line-height: 1.3; }
.tx-tip.tx-station { flex-direction: row; align-items: flex-start; gap: 12px; }
.tx-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tx-icon { width: 40px; height: 40px; object-fit: contain; flex: none; border-radius: 6px; background: #F3F3F0; }
.tx-sys { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .02em; color: #6B6B68; }
.tx-logo { width: 18px; height: 18px; object-fit: contain; flex: none; }
.tx-title { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.tx-name { font-size: 15px; line-height: 1.2; }
.tx-route { color: #444; }
.tx-lines { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.tx-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; font-size: 12px; font-weight: 700; box-sizing: border-box; }
.tx-meta { font-size: 11px; color: #9A9A96; margin-top: 2px; padding-top: 8px; border-top: 1px solid #EFEFEC; }
