/* Route Display System Styles */

/* Route Control Styles */
.route-toggle-control {
   background: white;
    border: 2px solid rgba(0,0,0,0.2);
    border-radius: 6px;
    padding: 8px;
    margin: 5px;
    margin-top: 60px; /* Add space for search */
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    user-select: none;
    position: relative;
    z-index: 1000;
}

.route-toggle-control:hover {
    background: #f0f0f0;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.route-toggle-control.active {
    background: #667eea;
    color: white;
    border-color: #5a67d8;
}

.route-toggle-text {
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Route Filters Panel */
.route-filters-panel {
   background: white;
    border-radius: 8px;
    padding: 15px;
    margin: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 280px;
    max-width: 320px;
    max-height: 400px;
    overflow-y: auto;
    position: relative;
    z-index: 1000; /* Ensure it's above other elements */
    margin-top: 60px; /* Add space for search component */
}

.filters-header {
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.collapse-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-group {
    margin-bottom: 15px;
}

.filter-label {
    display: block;
    font-size: 12px;
    font-weight: bold;
    color: #495057;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-input {
    width: 80%;
    padding: 6px 8px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 12px;
    transition: border-color 0.2s ease;
}

.filter-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.date-inputs {
    display: grid;
    /*grid-template-columns: 0fr 0fr;*/
    gap: 2px;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 4px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
}

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

.filter-stats {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    font-size: 12px;
    color: #666;
    text-align: center;
    border-top: 1px solid #eee;
    margin-top: 15px;
}

.clear-filters-btn {
    width: 100%;
    padding: 8px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.2s ease;
}

.clear-filters-btn:hover {
    background: #5a6268;
}

/* Route Markers */
.route-marker {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.route-marker:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.route-marker.private-route {
    background: linear-gradient(135deg, #dc3545 0%, #bd2130 100%);
}

.route-marker.shared-route {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #212529;
}

/* Route Modal Styles */
.route-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    justify-content: center;
    align-items: flex-start;
    z-index: 2000;
    padding: 20px;
    overflow-y: auto;
}

.route-modal.show {
    display: flex;
}

.route-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    margin-top: 20px;
}

.route-modal-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.route-modal-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.route-modal-summary {
    font-size: 14px;
    opacity: 0.9;
}

.route-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
    flex-shrink: 0;
}

.route-close-btn:hover {
    background: rgba(255,255,255,0.2);
}

.route-modal-body {
    padding: 0;
}

.route-info-section {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.route-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.route-meta-item {
    text-align: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.route-meta-value {
    font-size: 18px;
    font-weight: bold;
    color: #667eea;
    display: block;
}

.route-meta-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    margin-top: 4px;
}

.route-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 15px;
}

.route-action-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.route-action-btn.share {
    background: #17a2b8;
    color: white;
}

.route-action-btn.edit {
    background: #28a745;
    color: white;
}

.route-action-btn.delete {
    background: #dc3545;
    color: white;
}

.route-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.photos-section {
    padding: 20px;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.photo-card {
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.photo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.photo-placeholder {
    height: 120px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    text-align: center;
}

.photo-info {
    padding: 12px;
}

.photo-caption {
    font-weight: bold;
    margin-bottom: 5px;
    color: #2c3e50;
    cursor: pointer;
    transition: background-color 0.2s;
}

.photo-caption:hover {
  background-color: rgba(0,123,255,0.1);
  border-radius: 3px;
}

.photo-caption.empty {
    color: #999;
    font-style: italic;
    opacity: 0.7;
    font-style: italic;
}

.photo-meta {
    font-size: 12px;
    color: #666;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.photo-edit-actions {
    display: flex;
    gap: 5px;
}

.photo-edit-btn {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.photo-edit-btn.edit {
    background: #e3f2fd;
    color: #1976d2;
}

.photo-edit-btn.delete {
    background: #ffebee;
    color: #d32f2f;
}

.route-points-section {
    padding: 20px;
    border-top: 1px solid #eee;
}

.section-title {
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.route-point {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 10px;
}

.route-point.start {
    border-left: 4px solid #28a745;
    background: #f8fff8;
}

.route-point.end {
    border-left: 4px solid #dc3545;
    background: #fff8f8;
}

.route-point-icon {
    font-size: 20px;
    margin-right: 12px;
}

.route-point-info {
    flex: 1;
}

.route-point-type {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 2px;
}

.route-point-details {
    font-size: 12px;
    color: #666;
}

.loading-routes {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

/* Hide filters when collapsed */
.route-filters-panel.collapsed .filter-content {
    display: none;
}

.route-filters-panel.collapsed {
    padding: 8px 12px;
    min-width: auto;
    width: auto;
    max-width: 150px;
}

.route-filters-panel.collapsed .filters-header {
    font-size: 12px;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    white-space: nowrap;
}


/* Mobile Responsiveness */
@media (max-width: 768px) {
    .route-filters-panel {
        min-width: 240px;        /* Reduced from 280px */
        max-width: 70vw;         /* Reduced from 320px to 85% viewport width */
        padding: 7px;           /* Reduced from 15px */
        margin: 3px;             /* Reduced from 10px */
        max-height: 50vh;        /* Reduced from 400px to 60% viewport height */
        font-size: 13px; 
    }

    .route-filters-panel.collapsed {
        padding: 6px 10px;
        max-width: 120px;
        border-radius: 15px;
    }
    
    .route-filters-panel.collapsed .filters-header {
        font-size: 11px;
        display: flex;
        align-items: center;
        gap: 5px;
    }
    
    .route-filters-panel.collapsed .collapse-btn {
        font-size: 14px;
        width: 16px;
        height: 16px;
    }
    
    .route-modal-content {
        margin: 10px;
        max-width: calc(100vw - 20px);
    }
    
    .route-meta-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .photos-grid {
        grid-template-columns: repeat(auto-fit, minmin(250px, 1fr));
        gap: 15px;
    }
    
    .route-actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .route-action-btn {
        width: 100%;
    }

      .filters-header {
        font-size: 12px;         /* Reduced from 16px */
        margin-bottom: 8px;     /* Reduced from 15px */
        padding-bottom: 4px;     /* Reduced from 8px */
    }

    .filter-content {
        padding: 8px;           /* Reduced from 16px */
    }

    .filter-group {
        margin-bottom: 10px;     /* Reduced from 15px */
    }

    .filter-label {
        font-size: 11px;         /* Reduced from 12px */
        margin-bottom: 4px;      /* Reduced from 5px */
    }

    .filter-input {
        padding: 6px 8px;        /* Reduced from 8px 10px */
        font-size: 12px;         /* Reduced from 14px */
    }

    .date-inputs {
        gap: 4px;                /* Reduced from 8px */
    }

    .checkbox-group {
        gap: 4px;                /* Reduced from 8px */
    }

    .checkbox-item {
        gap: 4px;                /* Reduced from 8px */
        font-size: 12px;         /* Reduced from 14px */
    }

    .checkbox-item input[type="checkbox"] {
        width: 14px;             /* Reduced from 16px */
        height: 14px;            /* Reduced from 16px */
    }

    .filter-stats {
        padding: 6px;            /* Reduced from 10px */
        font-size: 11px;         /* Reduced from 12px */
        margin-top: 8px;         /* Reduced from 15px */
    }

    .clear-filters-btn {
        padding: 6px;            /* Reduced from 8px */
        font-size: 11px;         /* Reduced from 12px */
        margin-top: 8px;         /* Reduced from 10px */
    }

    /* Make route toggle control smaller on mobile too */
    .route-toggle-control {
        padding: 6px 12px;       /* Reduced from 8px 16px */
        font-size: 12px;         /* Reduced from 14px */
        margin: 3px;             /* Reduced from 5px */
    }

    /* Optimize date inputs for mobile */
    .date-inputs input {
        font-size: 12px;
        padding: 5px;
    }

    /* Make collapse button more prominent */
    .collapse-btn {
        width: 20px;
        height: 20px;
        font-size: 16px;
    }
}

/* Add this to your route-display.css for route type differentiation */

/* Stream Route Markers */
.route-marker.stream-route {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    border: 3px solid #ffffff;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}

.route-marker.stream-route:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.6);
}

/* Standard Route Markers */
.route-marker.standard-route {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Route Type Specific Colors for Privacy */
.route-marker.stream-route.private-route {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.route-marker.stream-route.shared-route {
    background: linear-gradient(135deg, #f39c12 0%, #d68910 100%);
}

.route-marker.stream-route.public-route {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

/* Route Tooltip Styling */
.route-tooltip {
    background: white;
    padding: 8px 12px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    border: none;
}

.route-name {
    font-weight: bold;
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 2px;
}

.route-meta {
    font-size: 12px;
    color: #7f8c8d;
}

/* Filter Section - Add Route Type Filter */
.route-type-filter {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.route-type-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.route-type-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.route-type-checkbox input[type="checkbox"] {
    width: 14px;
    height: 14px;
}

/* Photo markers styling */
.photo-marker {
    background: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #007bff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    transition: all 0.2s ease;
}

.photo-marker:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 6px rgba(0,0,0,0.4);
}

.photo-marker.stream-photo {
    border-color: #ff6b6b;
}

.photo-marker.standard-photo {
    border-color: #007bff;
}

/* Photo popup styling */
.photo-popup {
    text-align: center;
    max-width: 400px;
}

.photo-container {
    margin-bottom: 8px;
}

.route-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
    opacity: 0;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.photo-popup .route-photo-img {
    opacity: 1 !important;
}
.route-photo-img:hover {
    filter: brightness(1.05);
}
.photo-caption {
    font-weight: bold;
    margin: 8px 0 4px 0;
    color: #333;
    font-size: 14px;
}

.photo-date {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.photo-popup-container .leaflet-popup-content-wrapper {
    padding: 8px;
    min-width: 350px !important;
}

.photo-popup-container .leaflet-popup-content {
    margin: 0 !important;
    width: auto !important;
    min-width: 340px !important;
}

/* Mobile responsive photo popup */
@media (max-width: 768px) {
    .photo-popup {
        max-width: 300px;
    }
    
    .route-photo-img {
        max-height: 350px;
    }
    
    .photo-caption {
        font-size: 15px;
    }
    
    .photo-date {
        font-size: 15px;
    }
    .photo-popup-container .leaflet-popup-content-wrapper {
        min-width: 90vw !important;
        max-width: 90vw !important;
    }
    
    .photo-popup-container .leaflet-popup-content {
        min-width: calc(90vw - 20px) !important;
        max-width: calc(90vw - 20px) !important;
    }
    
    .route-photo-img {
        width: calc(90vw - 30px) !important;
        max-width: calc(90vw - 30px) !important;
    }
    
    .photo-popup {
        max-width: calc(90vw - 20px) !important;
    }
}

.finish-flag {
    background: #fff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #28a745;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.finish-flag:hover {
    transform: scale(1.1);
}

/* Add these new photo modal styles at the end of the file */
.photo-container {
    position: relative;
    width: 100%;
    height: 200px;
    background: #e9ecef;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-container.loaded .route-photo-img {
    opacity: 1;
}

.photo-container.loaded .photo-loading {
    display: none;
}

.photo-loading {
    position: absolute;
    color: #6c757d;
    font-size: 14px;
}

.photo-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #6c757d;
    font-size: 14px;
    text-align: center;
}

.photo-enlarged-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.photo-enlarged-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
}

.photo-enlarged-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
}

/* Privacy Toggle Styles */
.privacy-toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.privacy-toggle-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-weight: 500;
    gap: 8px;
}

.privacy-toggle {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    background-color: #ccc;
    border-radius: 24px;
    transition: background-color 0.3s ease;
}

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

.privacy-toggle:checked + .toggle-slider {
    background-color: #28a745;
}

.privacy-toggle:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.privacy-toggle:disabled + .toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

.route-point {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 10px;
}

.route-point-actions {
    margin-left: auto;
    display: flex;
    gap: 5px;
}

.edit-point-btn, .add-point-btn, .delete-point-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.edit-point-btn:hover {
    background: #e3f2fd;
    border-color: #1976d2;
}

.add-point-btn:hover {
    background: #e8f5e8;
    border-color: #28a745;
}

.delete-point-btn:hover {
    background: #ffebee;
    border-color: #dc3545;
}

.point-editor-overlay {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    z-index: 2000;
    text-align: center;
}

.editor-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.editor-subtitle {
    color: #666;
    margin-bottom: 15px;
}

.editor-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.cancel-edit-btn, .save-edit-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.cancel-edit-btn {
    background: #6c757d;
    color: white;
}

.save-edit-btn {
    background: #28a745;
    color: white;
}

.save-edit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.temp-point-marker {
    background: #ff6b6b;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.route-point {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.route-point:hover {
    background-color: #f8f9fa;
    border-color: #007bff;
    transform: translateX(2px);
}

.route-point.highlighted {
    background-color: #e3f2fd;
    border-color: #1976d2;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
}

.highlight-marker {
    background: #ff4444 !important;
    border: 4px solid white !important;
    box-shadow: 0 0 0 3px #ff4444, 0 4px 12px rgba(255, 68, 68, 0.6) !important;
    animation: pulseHighlight 2s ease-in-out infinite;
}

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

.highlight-popup {
    text-align: center;
    min-width: 200px;
}

.highlight-title {
    font-weight: bold;
    font-size: 16px;
    color: #1976d2;
    margin-bottom: 5px;
}

.highlight-time {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.highlight-coords {
    font-size: 12px;
    color: #999;
    font-family: monospace;
}

.highlight-marker-container {
    z-index: 1000 !important;
}

/* Minimize Modal Styles */
.route-modal.minimized {
    align-items: flex-start;
}

.route-modal.minimized .route-modal-content {
    transform: translateY(-85%);
    transition: transform 0.3s ease;
    margin-top: 0;
}

.route-modal.minimized .route-modal-header {
    cursor: pointer;
    pointer-events: all;
    position: relative;
}

.route-modal.minimized .route-modal-header::after {
    content: "👆 Tap to restore";
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.route-modal.minimized .route-modal-body {
    pointer-events: none;
    opacity: 0.3;
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    .route-modal.minimized .route-modal-content {
        transform: translateY(-90%);
        width: 95%;
    }
    
    .route-modal.minimized .route-modal-header::after {
        font-size: 11px;
        bottom: -20px;
    }
    
    .highlight-popup.mobile {
        font-size: 14px;
    }
    
    .highlight-popup.mobile .highlight-title {
        font-size: 15px;
    }
    
    .highlight-marker {
        animation-duration: 1.5s;
    }
}

/* Ensure highlight marker is visible above minimized modal */
.highlight-marker-container {
    z-index: 2100 !important;
}

/* Notification Styles */
.route-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    min-width: 300px;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    animation: slideInDown 0.3s ease;
}

.route-notification.info {
    background: #17a2b8;
    color: white;
}

.route-notification.success {
    background: #28a745;
    color: white;
}

.route-notification.error {
    background: #dc3545;
    color: white;
}

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

.notification-message {
    flex: 1;
    font-weight: 500;
}

.notification-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
}

@keyframes slideInDown {
    from {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .route-notification {
        left: 10px;
        right: 10px;
        transform: none;
        min-width: auto;
        max-width: none;
    }
}

/* Photo carousel styles */
.photo-popup.multi-photo {
    min-width: 350px;
}

.photo-carousel {
    position: relative;
    overflow: hidden;
}

.carousel-photo {
    display: none;
}

.carousel-photo.active {
    display: block;
}

.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: #f8f9fa;
    margin-top: 5px;
}

.carousel-btn {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: #0056b3;
}

.photo-counter {
    font-size: 14px;
    color: #666;
    font-weight: bold;
}
.photo-marker-container {
    width: auto !important;
    height: auto !important;
}

/* Update photo marker for count badge */
.photo-marker-container .photo-marker {
    font-size: 11px;
    white-space: nowrap;
    padding: 2px 6px; 
    min-width: 20px;
    text-align: center;
    border-radius: 12px; 
}

/* Force photo markers to use their programmatic sizes */
.leaflet-marker-icon.photo-marker-container {
    width: auto !important;
    height: auto !important;
}

.photo-marker-container .photo-marker {
    padding: 2px 6px !important;
    border-radius: 10px !important;
    font-size: 10px !important;
    line-height: 16px !important;
    text-align: center !important;
    white-space: nowrap !important;
    min-width: 18px !important;
    display: inline-block !important;
    box-sizing: border-box !important;
}

.route-modal-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.route-header-left {
    flex: 1;
}

.route-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: fit-content;
}

.business-link-header-input {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    width: 150px;
}

.business-link-header-input::placeholder {
    color: rgba(255,255,255,0.7);
}

.business-link-header-display {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.2s;
    flex: 1;
    text-align: center;
    margin: 0 15px;
}

.business-link-header-display:hover {
    background: rgba(255,255,255,0.3);
}

@media (max-width: 768px) {
    .route-header-right {
        flex-direction: column;
        gap: 8px;
        align-items: flex-end;
    }

    .business-link-header-input {
        width: 120px;
        font-size: 11px;
    }

    .business-link-header-display {
        margin: 0 5px;
        font-size: 12px;
        padding: 6px 12px;
    }
}

.photos-grid.limited .photo-card:nth-child(n+4) {
    display: none;
}

.load-more-photos-btn {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
    margin-top: 10px;
}

.load-more-photos-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.load-more-photos-btn.hidden {
    display: none;
}