* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #2A9D8F 0%, #3EBBA5 100%);
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    height: 100vh;
    background: rgba(255, 255, 255, 0.05);
}

.sidebar {
    width: 400px;
    background: rgba(255, 255, 255, 0.98);
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 15px rgba(0,0,0,0.1);
}

.header {
    background: linear-gradient(135deg, #2A9D8F, #3EBBA5);
    color: white;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.header p {
    opacity: 0.9;
    font-size: 0.85rem;
}

.login-modal-container{
    background: linear-gradient(135deg, #2A9D8F, #3EBBA5);
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.login-modal-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #2A9D8F, #3EBBA5);
    padding-bottom: 10px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1002;
}

.login-modal-header {
   
    color: white;
    padding: 20px;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    border-left: 15px;
    text-align: center;
    z-index: 1003;
    margin-bottom: 2rem;
}

.search-section {
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.search-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.tab-btn {
    flex: 1;
    padding: 8px;
    border: 2px solid #2A9D8F;
    background: white;
    color: #2A9D8F;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.tab-btn.active {
    background: #2A9D8F;
    color: white;
}

.search-input-group {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s;
}

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

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #2A9D8F;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.search-btn:hover {
    background: #5a67d8;
}

.search-results {
    max-height: 150px;
    overflow-y: auto;
    background: white;
    border-radius: 8px;
    margin-top: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: none;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.search-result-item:hover {
    background: #f8f9fa;
}

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

/* Campsite Input Section */
.campsite-input-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid #e0e0e0;
}

.campsite-input-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.campsite-input-label i {
    color: #28a745;
}

/* Place Photo Thumbnail */
.place-photo {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
}

.place-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Place Info Container */
.place-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Place Header (Name + Price + Cached Badge) */
.place-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.place-header strong {
    color: #2c3e50;
    font-size: 1rem;
}

/* Place Rating */
.place-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
    color: #666;
    margin: 2px 0;
}

/* Place Price Level */
.place-price {
    color: #34a853;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Cached Badge */
.cached-badge {
    color: #34a853;
    font-size: 0.75rem;
    background: rgba(52, 168, 83, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

/* Place Address */
.place-address {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.3;
}

/* Google Place Info Section in Modal */
.google-place-info {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
    border: 1px solid #e0e0e0;
}

.info-section-header {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.info-section-header i {
    color: #4285f4;
}

/* Google Data Badges and Controls */
.place-info-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.place-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.google-badge {
    background: #4285f4;
    color: white;
}

.manual-badge {
    background: #6c757d;
    color: white;
}

/* Refresh Google Data Button */
.btn-refresh-google {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #34a853;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn-refresh-google:hover {
    background: #2d8e47;
}

.btn-refresh-google:disabled {
    background: #9e9e9e;
    cursor: not-allowed;
}

.btn-refresh-google i.fa-spin {
    animation: spin 1s linear infinite;
}

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

/* Notes Textarea */
.form-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

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

.char-counter {
    display: block;
    text-align: right;
    color: #999;
    font-size: 0.85rem;
    margin-top: 5px;
}

/* Photo Gallery */
.place-photos-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.place-photos-gallery img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.place-photos-gallery img:hover {
    transform: scale(1.05);
}

/* Place Details Grid */
.place-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.place-detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: white;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #2c3e50;
}

.place-detail-item i {
    font-size: 1rem;
}

.place-detail-item a {
    color: #4285f4;
    text-decoration: none;
}

.place-detail-item a:hover {
    text-decoration: underline;
}

/* Address and Hours sections in modal */
.place-address-section,
.place-hours-section {
    margin-top: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #2A9D8F;
}

.info-subsection-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #2A9D8F;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.info-subsection-header i {
    font-size: 1rem;
}

.info-text {
    color: #2c3e50;
    font-size: 0.9rem;
    line-height: 1.5;
}

.info-hours-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hours-day {
    font-size: 0.85rem;
    color: #2c3e50;
    padding: 4px 0;
    border-bottom: 1px solid #e0e0e0;
}

.hours-day:last-child {
    border-bottom: none;
}

.controls {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn {
    flex: 1;
    background: linear-gradient(135deg, #2A9D8F, #3EBBA5);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
}

.places-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #fafafa;
}

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

.places-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

.campsites-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #fafafa;
    display: none;
}

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

.campsites-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

.place-item {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.place-item:hover {
    transform: translateX(5px);
    border-color: #2A9D8F;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.place-item.selected {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-color: #2A9D8F;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    transform: translateX(5px);
}

.place-item.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

.place-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.place-number {
    background: linear-gradient(135deg, #2A9D8F, #3EBBA5);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85rem;
    margin-right: 5px;
}

.map-popup-header {
    display: flex;
    align-items: center;
    gap: 1px;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.map-popup-content {
    min-width: 200px;
}

.map-popup-coords {
    font-size: 0.75rem;
    color: #707070;
    margin-bottom: 10px;
}

/* Schedule section in popup */
.map-popup-schedule {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #2A9D8F;
    padding: 6px 12px;
    margin: 4px 0;
    background: #f0faf8;
    border-radius: 6px;
}

.map-popup-schedule i {
    font-size: 0.85rem;
}

/* Schedule in expanded mobile popup */
.schedule-times {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.schedule-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.schedule-label {
    font-weight: 600;
    color: #555;
    min-width: 75px;
}

/* Notes section in popup */
.map-popup-notes {
    margin: 12px 0;
    padding: 10px;
    background: #f8f9fa;
    border-left: 3px solid #6366f1;
    border-radius: 4px;
}

.map-popup-notes .notes-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: #495057;
}

.map-popup-notes .notes-header i {
    color: #6366f1;
}

.map-popup-notes .notes-content {
    color: #212529;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Notes in expanded mobile view */
.notes-text {
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.6;
}

/* Notes links */
.notes-content a,
.notes-text a,
.compact-notes a {
    color: #6366f1;
    text-decoration: underline;
    word-break: break-all;
}

/* Compact notes in mobile popup */
.compact-notes {
    padding: 8px 12px;
    font-size: 0.85rem;
    color: #495057;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 60px;
    overflow: hidden;
    border-left: 3px solid #6366f1;
    background: #f8f9fa;
    border-radius: 4px;
    margin: 4px 12px 8px;
}

.map-popup-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.place-name {
    flex: 1;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

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

.action-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.delete-btn {
    background: #ff6b6b;
    color: white;
}

.delete-btn:hover {
    background: #ee5a6f;
    transform: scale(1.1);
}

.place-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.link-btn {
    padding: 5px 10px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.google-maps {
    background: #4285f4;
    color: white;
}

.google-maps:hover {
    background: #3367d6;
    transform: scale(1.05);
}

.google-nav {
    background: #34a853;
    color: white;
}

.google-nav:hover {
    background: #2d8e47;
    transform: scale(1.05);
}

#map {
    flex: 1;
    position: relative;
}

.map-controls {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.map-btn {
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.map-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.info-panel {
    position: absolute;
    bottom: 15px;
    left:450px;
    z-index: 1000;
    background: white;
    padding: 12px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    font-size: 0.85rem;
    max-width: 250px;
}

.loading {
    display: none;
    text-align: center;
    padding: 20px;
    color: #707070;
}

.loading.active {
    display: block;
}

.route-management {
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.route-selector {
    margin-bottom: 10px;
}

.route-selector label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.route-select-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.route-select {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

.route-select:focus {
    outline: none;
    border-color: #2A9D8F;
}

/* Route Start Date Picker */
.route-start-date {
    margin-bottom: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #e0e0e0;
}

.route-start-date label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.route-start-date label i {
    color: #2A9D8F;
}

.date-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.date-input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    transition: border-color 0.3s;
    font-family: inherit;
}

.date-input:focus {
    outline: none;
    border-color: #2A9D8F;
}

.date-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: invert(0.5) sepia(1) saturate(5) hue-rotate(130deg);
}

.btn-apply-date {
    width: 35px;
    height: 35px;
    border: none;
    background: #e0e0e0;
    color: #999;
    border-radius: 8px;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-apply-date:not(:disabled) {
    background: #2A9D8F;
    color: white;
    cursor: pointer;
}

.btn-apply-date:not(:disabled):hover {
    background: #248a7e;
    transform: scale(1.05);
}

.btn-apply-date.loading {
    pointer-events: none;
}

.btn-apply-date.loading i {
    animation: spin 1s linear infinite;
}

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

.btn-icon {
    width: 35px;
    height: 35px;
    border: none;
    background: #2A9D8F;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-icon:hover {
    background: #5a67d8;
    transform: scale(1.05);
}

.route-actions {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2001;
}

.modal-header {
    padding: 20px 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #707070;
    padding: 5px;
}

.btn-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #2A9D8F;
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

.modal-footer {
    padding: 0 20px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-secondary {
    background: #95a5a6;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-primary {
    background: linear-gradient(135deg, #2A9D8F, #3EBBA5);
}

/* Route Info Display */
.route-info {
    padding: 10px 15px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.route-info h4 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 1rem;
}

.route-info p {
    margin: 0;
    color: #707070;
    font-size: 0.85rem;
}

/* Leaflet Popup Customization */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.leaflet-popup-content {
    margin: 12px 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.leaflet-popup-tip {
    background: white;
}

.leaflet-popup-close-button {
    font-size: 24px !important;
    width: 35px !important;
    height: 35px !important;
    padding: 4px !important;
    color: #ffffff !important;
    border-radius: 20%;
}

.leaflet-popup-close-button:hover {
    color: #ff6b6b !important;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Override Leaflet's default link styles for our custom buttons */
.leaflet-container .link-btn,
.leaflet-popup .link-btn {
    padding: 5px 10px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.leaflet-container .google-maps,
.leaflet-popup .google-maps {
    background: #4285f4;
    color: white;
}

.leaflet-container .google-maps:hover,
.leaflet-popup .google-maps:hover {
    background: #3367d6;
    color: white;
    transform: scale(1.05);
}

.leaflet-container .google-nav,
.leaflet-popup .google-nav {
    background: #34a853;
    color: white;
}

.leaflet-container .google-nav:hover,
.leaflet-popup .google-nav:hover {
    background: #2d8e47;
    color: white;
    transform: scale(1.05);
}

/* Desktop Navigation Bar */
.desktop-nav {
    background: white;
    border-bottom: 1px solid #e0e0e0;
}

.desktop-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
}

.desktop-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    background: none;
    border: none;
    color: #707070;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.7rem;
    font-weight: 500;
}

.desktop-nav-item i {
    font-size: 1.3rem;
    transition: transform 0.2s;
}

.desktop-nav-item.active {
    color: #2A9D8F;
}

.desktop-nav-item.active i {
    transform: scale(1.15);
}

.desktop-nav-item:hover {
    color: #2A9D8F;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
}

.desktop-nav-item:active {
    transform: scale(0.95);
}

/* Mobile Navigation Bar */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1500;
    border-top: 1px solid #e0e0e0;
}

.mobile-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
}

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    background: none;
    border: none;
    color: #707070;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.7rem;
    font-weight: 500;
}

.mobile-nav-item i {
    font-size: 1.3rem;
    transition: transform 0.2s;
}

.mobile-nav-item.active {
    color: #2A9D8F;
}

.mobile-nav-item.active i {
    transform: scale(1.15);
}

.mobile-nav-item:active {
    transform: scale(0.95);
}

/* Mobile Content Panel */
.mobile-content-panel {
    display: none;
    position: fixed;
    bottom: 65px;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1400;
    max-height: 0;
    overflow: hidden;
    /* Spring animation matching popup */
    /* transition: max-height 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.4s ease; */
    /* Prevent iOS Safari pull-to-refresh */
    overscroll-behavior: contain;
    touch-action: pan-y;
    will-change: max-height;
}

.mobile-content-panel.hidden {
    /* display: none; */
    max-height: 0;
}

.mobile-content-panel.active {
    /* display: flex; */
    max-height: 40vh;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.15);
}

.mobile-content-panel.expanded {
    /* display: flex; */
    max-height: 80vh;
    box-shadow: 0 -8px 25px rgba(0,0,0,0.2);
}

.mobile-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: linear-gradient(135deg, #2A9D8F, #3EBBA5);
    color: white;
    position: relative;
}

.mobile-panel-header::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
}

.mobile-panel-title {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 8px;
}

.mobile-panel-expand {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    display: none;
}

.mobile-panel-expand i {
    transition: transform 0.3s;
}

.mobile-content-panel.expanded .mobile-panel-expand i {
    transform: rotate(180deg);
}

.mobile-panel-content {
    overflow-y: auto;
    max-height: calc(40vh - 56px); /* 40vh panel - 56px header */
    background: #fafafa;
    position: relative;
    /* Prevent iOS Safari pull-to-refresh when scrolling content */
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
}

.mobile-content-panel.expanded .mobile-panel-content {
    max-height: calc(80vh - 56px); /* 80vh panel - 56px header */
}

/* Mobile panel content styles */
.mobile-content-panel .route-management,
.mobile-content-panel .search-section,
.mobile-content-panel .controls {
    background: white;
    border: none;
}

.mobile-content-panel .places-list,
.mobile-content-panel .filters-container,
.mobile-content-panel .campsites-list,
.mobile-content-panel .mobile-section {
    background: #fafafa;
    padding: 10px;
    padding-bottom: 20px; /* Extra padding at bottom to ensure last item is scrollable */
    height: auto !important; /* Override inline height: 100% */
    overflow-y: visible !important; /* Let parent handle scrolling */
    min-height: 0; /* Allow content to determine height */
}

.mobile-content-panel .place-item {
    margin-bottom: 8px;
}

.mobile-content-panel .campsite-item {
    margin-bottom: 8px;
}

/* Ensure last item in lists has enough bottom margin */
.mobile-content-panel .place-item:last-child,
.mobile-content-panel .campsite-item:last-child {
    margin-bottom: 20px;
}

.mobile-content-panel .search-results {
    max-height: 200px;
}

/* Ensure buttons work in mobile panel */
.mobile-content-panel .btn,
.mobile-content-panel .tab-btn,
.mobile-content-panel .search-btn,
.mobile-content-panel .action-btn {
    pointer-events: auto;
    cursor: pointer;
}

/* ============================================
   MOBILE DOCKED POPUP (ABOVE NAV BAR)
   ============================================ */

.mobile-docked-popup {
    display: none; /* Hidden by default, shown only on mobile */
    position: fixed;
    bottom: 65px; /* Above mobile nav */
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1600; /* Above mobile nav (1500) and panel (1400) */
    max-height: 0;
    overflow: hidden;
    /* Spring-like animation with smooth easing */
    transition: max-height 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.4s ease;
    border-radius: 16px 16px 0 0;
    will-change: max-height; /* Optimize for animations */
    /* Prevent iOS Safari pull-to-refresh */
    overscroll-behavior: contain;
    touch-action: pan-y; /* Allow vertical panning but prevent browser gestures */
}

.mobile-docked-popup.show {
    max-height: 320px; /* Compact state height */
    display: flex;
    flex-direction: column;
}

/* Expanded state - full height with spring animation */
.mobile-docked-popup[data-state="expanded"].show {
    max-height: 85vh;
    /* Smooth spring transition for expansion */
    transition: max-height 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.45s ease;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.25); /* Deeper shadow when expanded */
}

/* Swipe handle with transition */
.mobile-popup-swipe-handle {
    width: 40px;
    height: 4px;
    background: #d0d0d0;
    border-radius: 2px;
    margin: 8px auto 4px;
    flex-shrink: 0;
    cursor: grab;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.mobile-popup-swipe-handle:active {
    cursor: grabbing;
    background: #b0b0b0;
}

.mobile-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
    gap: 12px;
}

.mobile-popup-title-section {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    min-width: 0; /* Allow text truncation */
}

.mobile-popup-position {
    font-size: 0.75rem;
    color: #7f8c8d;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.mobile-popup-place-name {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-popup-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.mobile-popup-badges .google-place-badge {
    padding: 2px 8px;
    font-size: 0.65rem;
}

.mobile-popup-close {
    background: #f5f5f5;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    color: #666;
    transition: all 0.2s;
}

.mobile-popup-close:hover,
.mobile-popup-close:active {
    background: #e0e0e0;
    color: #333;
    transform: scale(1.1);
}

.mobile-popup-content {
    flex: 1;
    overflow: hidden; /* No scrolling in compact mode */
    padding: 12px 16px 16px;
    display: flex;
    flex-direction: column;
    /* Prevent iOS Safari pull-to-refresh when scrolling content */
    overscroll-behavior-y: contain;
}

/* Enable scrolling in expanded mode */
.mobile-docked-popup[data-state="expanded"] .mobile-popup-content {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Unified carousel - smooth height transition */
.unified-carousel {
    height: 100px; /* Compact height */
    margin-bottom: 12px;
    margin-right: 0;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    transition: height 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Expanded carousel height */
.mobile-docked-popup[data-state="expanded"] .unified-carousel {
    height: 250px;
}

.unified-carousel .carousel-container {
    height: 100%;
}

.unified-carousel .carousel-image {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.unified-carousel .carousel-btn {
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
}

/* Compact view - visible in compact state */
.compact-view {
    display: block;
    opacity: 1;
    transition: opacity 0.25s ease;
}

.mobile-docked-popup[data-state="expanded"] .compact-view {
    display: none; /* Completely hide - no space taken */
    opacity: 0;
    pointer-events: none;
}

/* Expanded view - visible in expanded state */
.expanded-view {
    display: none; /* Completely hidden in compact mode */
    opacity: 0;
    pointer-events: none;
}

.mobile-docked-popup[data-state="expanded"] .expanded-view {
    display: block; /* Show in expanded mode */
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.25s ease;
}

/* Mobile popup content styling */
.mobile-popup-place-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-shrink: 0;
}

.mobile-popup-place-number {
    background: linear-gradient(135deg, #2A9D8F 0%, #3EBBA5 100%);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.mobile-popup-place-info {
    flex: 1;
}

.mobile-popup-place-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 5px 0;
}

.mobile-popup-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.mobile-popup-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
}

.mobile-popup-rating .stars {
    color: #f39c12;
}

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

.mobile-popup-info-section:last-child {
    margin-bottom: 0;
}

.mobile-popup-info-label {
    font-size: 0.85rem;
    color: #7f8c8d;
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mobile-popup-info-value {
    font-size: 0.95rem;
    color: #2c3e50;
}

.mobile-popup-action-btn {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    margin-top: 12px;
}

/* Stacked buttons in mobile popup (no footer) */
.mobile-popup-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto; /* Push to bottom */
    flex-shrink: 0;
}

.mobile-popup-buttons .btn {
    width: 100%;
    padding: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-popup-buttons .btn-primary {
    background: linear-gradient(135deg, #2A9D8F 0%, #3EBBA5 100%);
    color: white;
}

.mobile-popup-buttons .btn-primary:active {
    background: linear-gradient(135deg, #258075 0%, #35a88f 100%);
    transform: scale(0.98);
}

.mobile-popup-buttons .btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.mobile-popup-buttons .btn-danger:active {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: scale(0.98);
}

.mobile-popup-buttons .btn i {
    font-size: 1rem;
}

/* ============================================
   EXPANDED MOBILE POPUP STYLES
   ============================================ */

.carousel-photo-count {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Removed .expanded-content-scroll - content now scrolls as a whole */

/* Rating section */
.expanded-rating-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.rating-display {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rating-stars {
    font-size: 1.2rem;
}

.rating-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
}

.rating-count {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.price-display {
    display: flex;
    align-items: center;
}

.price-symbols {
    font-size: 1.1rem;
    font-weight: 700;
    color: #27ae60;
}

/* Status section */
.expanded-status-section {
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

/* Info sections */
.expanded-info-section {
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.info-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #7f8c8d;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-section-title i {
    color: #2A9D8F;
}

.info-section-content {
    font-size: 0.95rem;
    color: #2c3e50;
    line-height: 1.5;
}

.info-section-link {
    color: #2A9D8F;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-section-link:active {
    color: #258075;
}

/* Hours list */
.hours-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hours-day {
    font-size: 0.9rem;
    color: #2c3e50;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}

.hours-day:last-child {
    border-bottom: none;
}

/* Badges row */
.badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* External links */
.expanded-external-links {
    display: flex;
    gap: 8px;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.expanded-external-links .link-btn {
    flex: 1;
    padding: 10px;
    text-align: center;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.expanded-external-links .google-maps {
    background: #4285f4;
    color: white;
}

.expanded-external-links .google-nav {
    background: #34a853;
    color: white;
}

/* Expanded action buttons for non-route places */
.expanded-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 0 0 0;
}

.expanded-action-group {
    display: flex;
    gap: 8px;
}

.expanded-action-group .btn {
    flex: 1;
}

/* Action buttons - now part of scrollable content */
.expanded-view .btn-large {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 16px;
}

.expanded-view .btn-primary {
    background: linear-gradient(135deg, #2A9D8F 0%, #3EBBA5 100%);
    color: white;
}

.expanded-view .btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.expanded-view .btn-large:active {
    transform: scale(0.98);
}

/* ============================================
   FULLSCREEN IMAGE GALLERY
   ============================================ */

.fullscreen-gallery {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fullscreen-gallery.show {
    display: flex;
    flex-direction: column;
    opacity: 1;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    color: white;
}

.gallery-counter {
    font-size: 0.95rem;
    font-weight: 500;
}

.gallery-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.gallery-close:active {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(0.95);
}

.gallery-content {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gallery-images {
    width: 100%;
    height: 100%;
    position: relative;
}

.gallery-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: scale(0.95);
}

.gallery-image.active {
    opacity: 1;
    transform: scale(1);
}

.gallery-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}

.gallery-nav:active {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(0.95);
}

.gallery-prev {
    left: 20px;
}

.gallery-next {
    right: 20px;
}

.gallery-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Tablet Styles (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .sidebar {
        width: 350px;
    }

    .header h1 {
        font-size: 1.3rem;
    }

    .place-item {
        padding: 12px;
    }
}

/* Mobile Styles (max-width: 768px) */
@media (max-width: 768px) {
    body {
        overflow: hidden;
    }

    .container {
        flex-direction: column;
        position: relative;
    }

    /* Hide desktop sidebar on mobile */
    .sidebar {
        display: none;
    }

    /* Hide desktop navigation on mobile */
    .desktop-nav {
        display: none;
    }

    #map {
        height: 100vh;
        width: 100%;
    }

    /* Show mobile navigation */
    .mobile-nav {
        display: block;
    }

    .mobile-content-panel {
        display: block;
    }

    /* Show expand button for Place List, Campsites, and Routes modes */
    .mobile-content-panel[data-mode="routes"] .mobile-panel-expand,
    .mobile-content-panel[data-mode="places"] .mobile-panel-expand,
    .mobile-content-panel[data-mode="campsites"] .mobile-panel-expand {
        display: block;
    }
    .mobile-content-panel.active {
        max-height: 40vh;
    }
    .mobile-content-panel.expanded {
        max-height: 80vh;
    }

    .mobile-panel-content {
        max-height: calc(40vh - 56px);
    }

    .mobile-content-panel.expanded .mobile-panel-content {
        max-height: calc(80vh - 56px);
    }

    /* Map controls repositioned */
    .map-controls {
        top: 15px;
        right: 15px;
        gap: 8px;
    }

    .map-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    /* Modal adjustments */
    .modal-content {
        width: 95%;
        margin: 10px;
    }

    .modal-header {
        padding: 15px 15px 0;
    }

    .modal-body {
        padding: 15px;
    }

    .modal-footer {
        padding: 0 15px 15px;
    }
}

/* Small Mobile Styles (max-width: 480px) */
@media (max-width: 480px) {
    .mobile-content-panel.active {
        max-height: 40vh;
    }

    .mobile-content-panel.expanded {
        max-height: 80vh;
    }

    .mobile-panel-content {
        max-height: calc(40vh - 56px);
    }

    .mobile-content-panel.expanded .mobile-panel-content {
        max-height: calc(80vh - 56px);
    }

    .map-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .link-btn {
        font-size: 0.7rem;
        padding: 4px 8px;
    }

    .mobile-nav-item {
        font-size: 0.65rem;
        padding: 6px;
    }

    .mobile-nav-item i {
        font-size: 1.1rem;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .mobile-content-panel.active {
        max-height: 60vh;
    }

    .mobile-content-panel.expanded {
        max-height: 75vh;
    }

    .mobile-panel-content {
        max-height: calc(60vh - 56px);
    }

    .mobile-content-panel.expanded .mobile-panel-content {
        max-height: calc(75vh - 56px);
    }
}

/* Campsite Marker Icons */
.campsite-marker-icon {
    border-radius: 50%;
    background: white;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Ensure SVG icons display correctly */
.campsite-marker-icon img {
    display: block;
}

/* Campsite Popup Styling */
.campsite-popup-container .leaflet-popup-content {
    margin: 0 !important;
    width: 100% !important;
}

.campsite-popup {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    min-width: 300px;
}

/* Image Carousel in Popup */
.popup-image-carousel {
    position: relative;
    width: 100%;
    height: 160px;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    background: #f0f0f0;
}

.carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    cursor: pointer;
}

.carousel-image.active {
    opacity: 1;
    z-index: 1;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

.carousel-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.carousel-indicators .indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.carousel-indicators .indicator.active {
    background: white;
    width: 24px;
    border-radius: 4px;
}

.carousel-indicators .indicator:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.2);
}

/* Popup Info Section */
.popup-info {
    font-size: 0.85rem;
    margin-top: 6px;
    padding: 0 12px;
}

/* Services and Activities Sections */
.popup-services,
.popup-activities {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.popup-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 0.85rem;
    font-weight: 600;
}

.popup-section-title i {
    color: #2A9D8F;
    font-size: 0.9rem;
}

/* Icons Row (icon only, no text) */
.popup-icons-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.popup-icon-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 4px;
    transition: all 0.2s;
    cursor: help;
}

.popup-icon-item:hover {
    transform: scale(1.15);
}

.popup-icon-item:hover .popup-icon {
    filter: brightness(0.7);
}

.popup-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    transition: filter 0.2s;
}

.popup-icon-item i {
    font-size: 1.3rem;
    color: #2A9D8F;
    transition: color 0.2s;
}

.popup-icon-item:hover i {
    color: #248075;
}

/* Adjust popup content padding */
.campsite-popup .map-popup-header {
    padding: 0 12px;
    margin-top: 8px;
}

.campsite-popup .map-popup-coords {
    padding: 0 12px;
    margin-top: 8px;
}

.campsite-popup .map-popup-links {
    padding: 8px 12px 12px;
}

/* ============================================
   CAMPERMATE-SPECIFIC POPUP STYLES
   ============================================ */

/* Campermate text list for services/activities */
.popup-text-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.popup-text-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #333;
}

.popup-text-item i {
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* Source link buttons */
.link-btn.park4night-source {
    background: #3EBBA5;
    color: white;
}

.link-btn.park4night-source:hover {
    background: #2a9d8f;
}

.link-btn.campermate-source {
    background: #fce94e;
    color: #333;
}

.link-btn.campermate-source:hover {
    background: #e6d343;
}

/* ============================================
   FILTER SECTION STYLES
   ============================================ */

.filters-container {
    display: none;
    overflow-y: auto;
    padding: 15px;
    background: #fafafa;
    flex: 1;
}

.filter-section {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e0e0e0;
}

.filter-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-header h3 i {
    color: #2A9D8F;
}

.btn-text {
    background: none;
    border: none;
    color: #2A9D8F;
    font-weight: 600;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.btn-text:hover {
    background: rgba(42, 157, 143, 0.1);
    color: #258075;
}

.filter-group {
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s;
}

.filter-group.collapsed .filter-options {
    display: none;
}

.filter-group.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.filter-group-header {
    background: linear-gradient(135deg, #2A9D8F 0%, #3EBBA5 100%);
    color: white;
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: all 0.3s;
}

.filter-group-header:hover {
    background: linear-gradient(135deg, #258075 0%, #35a894 100%);
}

.filter-group-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-icon {
    transition: transform 0.3s;
    font-size: 0.9rem;
}

.filter-options {
    padding: 10px;
    background: #fafafa;
    max-height: 350px;
    overflow-y: auto;
}

/* Custom scrollbar for filter options */
.filter-options::-webkit-scrollbar {
    width: 6px;
}

.filter-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.filter-options::-webkit-scrollbar-thumb {
    background: #2A9D8F;
    border-radius: 3px;
}

.filter-options::-webkit-scrollbar-thumb:hover {
    background: #258075;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    user-select: none;
}

.filter-option:hover {
    background: #f0f9f8;
    border-color: #2A9D8F;
    transform: translateX(3px);
}

.filter-option:has(.filter-checkbox:checked) {
    background: linear-gradient(135deg, rgba(42, 157, 143, 0.1) 0%, rgba(62, 187, 165, 0.1) 100%);
    border-color: #2A9D8F;
    box-shadow: 0 2px 6px rgba(42, 157, 143, 0.2);
}

.filter-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #2A9D8F;
    flex-shrink: 0;
}

.filter-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(42, 157, 143, 0.1);
    border-radius: 6px;
}

.filter-name {
    flex: 1;
    color: #2c3e50;
    font-weight: 500;
    font-size: 0.95rem;
}

.filter-count {
    background: #2A9D8F;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.active-filters-summary {
    margin-top: 15px;
    padding: 12px 15px;
    background: linear-gradient(135deg, rgba(42, 157, 143, 0.15) 0%, rgba(62, 187, 165, 0.15) 100%);
    border-left: 4px solid #2A9D8F;
    border-radius: 8px;
    color: #2c3e50;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.active-filters-summary i {
    color: #2A9D8F;
    font-size: 1rem;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .filters-container {
        padding: 0;
        background: #fafafa;
    }

    .filter-section {
        box-shadow: none;
        border-radius: 0;
        padding: 12px;
    }

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

    .filter-header h3 {
        font-size: 1.1rem;
    }

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

    .filter-group-header {
        padding: 10px 12px;
    }

    .filter-group-header h4 {
        font-size: 0.95rem;
    }

    .filter-options {
        max-height: 280px;
        padding: 8px;
    }

    .filter-option {
        padding: 12px 10px;
        margin-bottom: 6px;
        /* Larger touch targets for mobile */
        min-height: 48px;
    }

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

    .filter-icon {
        font-size: 1.4rem;
        width: 32px;
        height: 32px;
    }

    .filter-name {
        font-size: 0.95rem;
    }

    .filter-count {
        font-size: 0.85rem;
        padding: 3px 9px;
    }

    .active-filters-summary {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    /* Improve touch feedback */
    .filter-option:active {
        transform: scale(0.98);
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .filter-header h3 {
        font-size: 1.15rem;
    }

    .filter-option {
        padding: 11px;
    }
}

/* Large screens */
@media (min-width: 1440px) {
    .filters-container {
        padding: 20px;
    }

    .filter-section {
        padding: 20px;
    }

    .filter-header h3 {
        font-size: 1.3rem;
    }

    .filter-options {
        max-height: 400px;
    }
}

/* ============================================
   CUSTOM MAP MARKERS (with Category Icons)
   ============================================ */

.custom-marker-container {
    background: transparent;
    border: none;
}

.custom-marker {
    position: relative;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #2A9D8F 0%, #3EBBA5 100%);
    border: 3px solid white;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
    cursor: pointer;
}

.custom-marker.selected {
    width: 44px;
    height: 44px;
    border-width: 4px;
    box-shadow: 0 5px 15px rgba(42, 157, 143, 0.5);
}

.custom-marker .marker-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    font-size: 1.3rem;
    line-height: 1;
}

.custom-marker.selected .marker-icon {
    font-size: 1.6rem;
}

.custom-marker:hover {
    transform: rotate(-45deg) scale(1.1);
    box-shadow: 0 5px 15px rgba(42, 157, 143, 0.4);
}

/* Numbered Route Markers */
.route-marker-numbered {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #2A9D8F 0%, #3EBBA5 100%);
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.route-marker-numbered.selected {
    width: 40px;
    height: 40px;
    border-width: 4px;
    box-shadow: 0 5px 15px rgba(42, 157, 143, 0.5);
}

.route-marker-numbered .marker-number {
    color: white;
    font-weight: bold;
    font-size: 14px;
    line-height: 1;
    text-align: center;
    user-select: none;
}

.route-marker-numbered.selected .marker-number {
    font-size: 16px;
}

.route-marker-numbered:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(42, 157, 143, 0.4);
}

/* Category and Country Badges in Popups */
.map-popup-categories,
.map-popup-countries {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}

.category-badge,
.country-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.category-badge {
    background: linear-gradient(135deg, rgba(42, 157, 143, 0.15) 0%, rgba(62, 187, 165, 0.15) 100%);
    color: #2A9D8F;
    border: 1px solid rgba(42, 157, 143, 0.3);
}

.country-badge {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

/* Responsive adjustments for badges */
@media (max-width: 768px) {
    .category-badge,
    .country-badge {
        font-size: 0.7rem;
        padding: 3px 8px;
    }

    .custom-marker {
        width: 32px;
        height: 32px;
    }

    .custom-marker.selected {
        width: 38px;
        height: 38px;
    }

    .custom-marker .marker-icon {
        font-size: 1.1rem;
    }

    .custom-marker.selected .marker-icon {
        font-size: 1.4rem;
    }

    .non-route-custom-marker {
        width: 20px;
        height: 20px;
    }

    .non-route-custom-marker .marker-icon {
        font-size: 0.85rem;
    }
}
/* ============================================
   PLACE ITEM ACTION BUTTONS
   ============================================ */

.place-item {
    transition: all 0.3s ease;
}

.place-item.selected {
    background: linear-gradient(135deg, rgba(42, 157, 143, 0.08) 0%, rgba(62, 187, 165, 0.08) 100%);
    border-left: 4px solid #2A9D8F;
    padding-left: calc(15px - 4px);
}

.place-item.sorting-mode {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 152, 0, 0.1) 100%);
    border: 2px dashed #ff9800;
}

/* Selected item in sorting mode - green/teal background like header */
.place-item.sorting-mode.selected {
    background: linear-gradient(135deg, rgba(42, 157, 143, 0.2) 0%, rgba(62, 187, 165, 0.2) 100%);
    border: 2px solid #2A9D8F;
    border-style: solid;
    padding-left: 15px;
}

.place-item.sorting-mode:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.place-item.sorting-mode.selected:hover {
    box-shadow: 0 4px 12px rgba(42, 157, 143, 0.4);
}

.place-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.place-actions {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.action-btn {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);    
    cursor: pointer;
}

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

.rename-btn {
    color: #2A9D8F;
    border-color: #2A9D8F;
}

.rename-btn:hover {
    background: linear-gradient(135deg, #2A9D8F 0%, #3EBBA5 100%);
    color: white;
    border-color: #2A9D8F;
}

.sort-btn {
    color: #ff9800;
    border-color: #ff9800;
    position: relative;
}

.sort-btn:hover {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    border-color: #ff9800;
}

.delete-btn {
    color: #e74c3c;
    border-color: #e74c3c;
}

.delete-btn:hover {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border-color: #e74c3c;
}

/* Coordinates display in modal */
.coords-display {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 15px;
    font-family: 'Courier New', monospace;
    color: #2c3e50;
    font-size: 0.95rem;
}

/* Mobile responsive adjustments for action buttons */
@media (max-width: 768px) {
    .place-item.selected {
        border-left: 3px solid #2A9D8F;
        padding-left: calc(12px - 3px);
    }

    .place-actions {
        gap: 4px;
    }

    .action-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .action-btn:hover {
        transform: none;
    }

    .action-btn:active {
        transform: scale(0.95);
        background: rgba(42, 157, 143, 0.1);
    }

    .coords-display {
        font-size: 0.85rem;
        padding: 8px 12px;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .action-btn {
        width: 38px;
        height: 38px;
    }
}

/* Sorting mode visual feedback */
.place-item.sorting-mode .place-number {
    background: #ff9800;
    color: white;
    animation: pulse-number 1s ease-in-out infinite;
}

@keyframes pulse-number {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Dragging state */
.place-item.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

/* Focus states for accessibility */
.action-btn:focus {
    outline: 2px solid #2A9D8F;
    outline-offset: 2px;
}

.action-btn:focus:not(:focus-visible) {
    outline: none;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .action-btn {
        border-width: 3px;
    }

    .place-item.selected {
        border-left-width: 6px;
    }
}

/* Sorting mode enhancements */
.sort-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff9800;
    font-size: 1.2rem;
    margin-right: 8px;
    cursor: grab;
}

.sort-handle:active {
    cursor: grabbing;
}

.sorting-hint {
    margin-left: auto;
    font-size: 0.8rem;
    color: #ff9800;
    font-weight: 600;
    padding: 4px 8px;
    background: rgba(255, 152, 0, 0.1);
    border-radius: 6px;
}



/* Mobile sorting mode */
@media (max-width: 768px) {
    .sort-handle {
        font-size: 1.4rem;
        margin-right: 6px;
    }

    .sorting-hint {
        font-size: 0.75rem;
        padding: 3px 6px;
    }
}

/* Sorting Mode Banner */
.sorting-mode-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

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

.sorting-banner-content {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.95rem;
}

.sorting-banner-content i {
    font-size: 1.2rem;
    animation: pulse-icon 1.5s ease-in-out infinite;
}

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

.btn-done {
    background: white;
    color: #ff9800;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.btn-done:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

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

.sorting-hint-selected {
    margin-left: auto;
    font-size: 0.75rem;
    color: #2A9D8F;
    font-weight: 600;
    padding: 4px 10px;
    background: rgba(42, 157, 143, 0.15);
    border-radius: 6px;
    border: 1px solid rgba(42, 157, 143, 0.3);
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Mobile adjustments for sorting banner */
@media (max-width: 768px) {
    .sorting-mode-banner {
        padding: 10px 12px;
        margin-bottom: 8px;
    }

    .sorting-banner-content {
        font-size: 0.85rem;
        gap: 8px;
    }

    .sorting-banner-content i {
        font-size: 1.1rem;
    }

    .btn-done {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .sorting-hint-selected {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
}

/* ============================================
   EDIT PLACE MODAL
   ============================================ */

.modal-large {
    max-width: 650px;
    width: 95%;
}

/* Desktop overflow handling - constrain modal height and make body scrollable */
.modal-content.modal-large {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-content.modal-large .modal-header {
    flex-shrink: 0; /* Keep header fixed */
}

.modal-content.modal-large .modal-body {
    overflow-y: auto;
    flex: 1 1 auto; /* Allow body to grow and shrink */
    max-height: calc(90vh - 140px); /* Leave space for header and footer */
}

.modal-content.modal-large .modal-footer {
    flex-shrink: 0; /* Keep footer fixed */
}

/* Custom scrollbar for modal body */
.modal-content.modal-large .modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-content.modal-large .modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-content.modal-large .modal-body::-webkit-scrollbar-thumb {
    background: #2A9D8F;
    border-radius: 4px;
}

.modal-content.modal-large .modal-body::-webkit-scrollbar-thumb:hover {
    background: #258075;
}

/* ============================================
   EDIT PLACE MODAL - VIEW/EDIT MODE SYSTEM
   ============================================ */

/* View Mode - Read-only, info-focused display */
#editPlaceModal[data-mode="view"] .form-input,
#editPlaceModal[data-mode="view"] .form-textarea,
#editPlaceModal[data-mode="view"] .multi-select-container {
    pointer-events: none;
    background: #f8f9fa;
    border-color: #e0e0e0;
    color: #2c3e50;
}

#editPlaceModal[data-mode="view"] .form-input[readonly],
#editPlaceModal[data-mode="view"] .form-textarea[readonly] {
    background: #f8f9fa;
    cursor: default;
}

#editPlaceModal[data-mode="view"] .checkbox-item {
    pointer-events: none;
    opacity: 0.7;
}

#editPlaceModal[data-mode="view"] .checkbox-item input[type="checkbox"]:checked {
    accent-color: #2A9D8F;
}

/* Hide edit-only elements in view mode */
#editPlaceModal[data-mode="view"] .edit-mode-only {
    display: none !important;
}

/* Show view-only elements only in view mode */
#editPlaceModal[data-mode="edit"] .view-mode-only {
    display: none !important;
}

/* View mode: Transform categories/countries to badges */
#editPlaceModal[data-mode="view"] .view-mode-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    min-height: 44px;
}

#editPlaceModal[data-mode="view"] .view-mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(42, 157, 143, 0.15) 0%, rgba(62, 187, 165, 0.15) 100%);
    border: 1px solid #2A9D8F;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #2c3e50;
}

#editPlaceModal[data-mode="view"] .view-mode-badge i {
    color: #2A9D8F;
    font-size: 0.9rem;
}

/* View mode: Enhance Google data section */
#editPlaceModal[data-mode="view"] .google-place-info {
    background: linear-gradient(135deg, #f0f9f8 0%, #e6f5f3 100%);
    border: 2px solid #2A9D8F;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

#editPlaceModal[data-mode="view"] .google-place-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(42, 157, 143, 0.3);
}

#editPlaceModal[data-mode="view"] .google-place-header i {
    font-size: 1.5rem;
    color: #2A9D8F;
}

#editPlaceModal[data-mode="view"] .google-place-header h4 {
    margin: 0;
    color: #2A9D8F;
    font-size: 1.1rem;
}

/* View mode: Photo gallery enhancement */
#editPlaceModal[data-mode="view"] .place-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

#editPlaceModal[data-mode="view"] .place-photo-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
}

#editPlaceModal[data-mode="view"] .place-photo-item:hover {
    transform: scale(1.05);
}

#editPlaceModal[data-mode="view"] .place-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Modal footer buttons for different modes */
.modal-mode-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-mode-buttons .btn {
    min-width: 100px;
}

/* Edit mode button styling */
.btn-switch-to-edit {
    background: linear-gradient(135deg, #2A9D8F 0%, #3EBBA5 100%);
    color: white;
    border: none;
}

.btn-switch-to-edit:hover {
    background: linear-gradient(135deg, #258075 0%, #35a88f 100%);
    transform: translateY(-2px);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.form-group label i {
    color: #2A9D8F;
    font-size: 1rem;
}

.form-input[type="number"] {
    font-family: 'Courier New', monospace;
}

/* Multi-Select Container */
.multi-select-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
}

.multi-select-container::-webkit-scrollbar {
    width: 8px;
}

.multi-select-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.multi-select-container::-webkit-scrollbar-thumb {
    background: #2A9D8F;
    border-radius: 4px;
}

.multi-select-container::-webkit-scrollbar-thumb:hover {
    background: #258075;
}

/* Checkbox Items */
.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    user-select: none;
}

.checkbox-item:hover {
    background: #f0f9f8;
    border-color: #2A9D8F;
    transform: translateX(2px);
}

.checkbox-item:has(input:checked) {
    background: linear-gradient(135deg, rgba(42, 157, 143, 0.15) 0%, rgba(62, 187, 165, 0.15) 100%);
    border-color: #2A9D8F;
    box-shadow: 0 2px 6px rgba(42, 157, 143, 0.2);
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #2A9D8F;
    flex-shrink: 0;
}

.checkbox-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox-label {
    flex: 1;
    font-size: 0.9rem;
    color: #2c3e50;
    font-weight: 500;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .modal-large {
        max-width: 100%;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .multi-select-container {
        grid-template-columns: 1fr;
        max-height: 180px;
        gap: 6px;
        padding: 8px;
    }

    .checkbox-item {
        padding: 12px 10px;
        min-height: 48px; /* Touch-friendly */
    }

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

    .checkbox-icon {
        font-size: 1.3rem;
        width: 28px;
        height: 28px;
    }

    .checkbox-label {
        font-size: 0.95rem;
    }

    /* Make modal scrollable on mobile - use flexbox approach */
    .modal-content.modal-large {
        max-height: 100vh;
        display: flex;
        flex-direction: column;
    }

    .modal-content.modal-large .modal-header {
        flex-shrink: 0; /* Keep header fixed */
    }

    .modal-content.modal-large .modal-body {
        overflow-y: auto;
        flex: 1 1 auto; /* Allow body to grow and shrink */
        max-height: calc(100vh - 140px); /* Leave space for header and footer */
    }

    .modal-content.modal-large .modal-footer {
        flex-shrink: 0; /* Keep footer fixed */
    }

    /* Custom scrollbar for mobile */
    .modal-content.modal-large .modal-body::-webkit-scrollbar {
        width: 6px;
    }

    .modal-content.modal-large .modal-body::-webkit-scrollbar-thumb {
        background: #2A9D8F;
        border-radius: 3px;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .modal-large {
        max-width: 600px;
    }

    .multi-select-container {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

/* ==================== Coordinate Selection Styles ==================== */

/* Readonly coordinate inputs */
.coords-input {
    font-family: 'Courier New', Consolas, monospace;
    background: #f8f9fa !important;
    cursor: not-allowed;
    color: #495057;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Change Location Button */
.btn-change-location {
    width: 100%;
    padding: 12px 16px;
    margin-top: 12px;
    background: linear-gradient(135deg, #2196F3 0%, #1976d2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.btn-change-location:hover {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.btn-change-location:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.3);
}

.btn-change-location i {
    font-size: 1.1rem;
}

/* Hide entire modal during location change to avoid flex display conflict */
.modal.location-change-mode {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Hide sidebar during location change for better map focus */
#sidebar.location-change-hidden {
    display: none !important;
}

/* Hide mobile navigation and panel during location change */
.mobile-nav.location-change-hidden,
.mobile-content-panel.location-change-hidden {
    display: none !important;
}

/* Location Change Banner on Map */
.location-change-banner {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 24px;
    background: linear-gradient(135deg, #2196F3 0%, #1976d2 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.5);
    animation: bannerSlideDown 0.4s ease-out;
    min-width: 300px;
    max-width: 90%;
}

@keyframes bannerSlideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.location-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 1rem;
}

.location-banner-content i {
    font-size: 1.4rem;
    animation: markerPulse 2s infinite;
}

.btn-location-done {
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.95);
    color: #2196F3;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-location-done:hover {
    background: white;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-location-done:active {
    transform: scale(0.98);
}

.btn-location-done i {
    font-size: 1rem;
}

/* Coordinate update animation */
@keyframes coordsUpdate {
    0% {
        background: #fff3cd;
        transform: scale(1);
    }
    50% {
        background: #d4edda;
        transform: scale(1.02);
    }
    100% {
        background: #f8f9fa;
        transform: scale(1);
    }
}

.coords-updated {
    animation: coordsUpdate 0.6s ease-out;
    border-color: #28a745 !important;
}

/* Map coordinate selection mode */
.coordinate-selection-active {
    cursor: crosshair !important;
}

.coordinate-selection-active * {
    cursor: crosshair !important;
}

/* Coordinate preview marker */
.coordinate-preview-icon {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.coordinate-preview-marker {
    position: relative;
    width: 30px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: markerBounce 0.5s ease-out, markerPulse 2s infinite;
}

.coordinate-preview-marker i {
    font-size: 32px;
    color: #2196F3;
    filter: drop-shadow(0 2px 4px rgba(33, 150, 243, 0.4));
}

/* Marker bounce animation */
@keyframes markerBounce {
    0% {
        transform: translateY(-20px) scale(0.8);
        opacity: 0;
    }
    50% {
        transform: translateY(-5px) scale(1.1);
        opacity: 1;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Marker pulse animation */
@keyframes markerPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Coordinate preview popup */
.coord-preview-popup {
    font-family: 'Courier New', Consolas, monospace;
    text-align: center;
    padding: 8px;
}

.coord-preview-popup strong {
    display: block;
    margin-bottom: 6px;
    color: #2196F3;
    font-size: 0.95rem;
    font-weight: 600;
}

.coord-preview-popup br + text {
    color: #495057;
    font-size: 0.85rem;
}

/* Mobile coordinate selection adjustments */
@media (max-width: 768px) {
    .btn-change-location {
        padding: 14px 18px;
        font-size: 1.05rem;
        min-height: 48px; /* Touch-friendly */
    }

    .location-change-banner {
        top: 10px;
        flex-direction: column;
        gap: 12px;
        padding: 14px 18px;
        min-width: 280px;
    }

    .location-banner-content {
        font-size: 0.95rem;
        gap: 10px;
    }

    .location-banner-content i {
        font-size: 1.3rem;
    }

    .btn-location-done {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
        min-height: 44px; /* Touch-friendly */
    }

    .coordinate-preview-marker {
        width: 36px;
        height: 48px;
    }

    .coordinate-preview-marker i {
        font-size: 38px;
    }

    .coords-input {
        font-size: 0.95rem;
    }
}

/* ============================================
   NON-ROUTE PLACES & DUAL MARKER SYSTEM
   ============================================ */

/* Non-route custom marker container */
.non-route-marker-container {
    background: transparent;
    border: none;
}

/* Non-route custom marker - muted gray teardrop style */
.non-route-custom-marker {
    position: relative;
    width: 25px;
    height: 25px;
    /* background: linear-gradient(135deg, #6c757d 0%, #8a939c 100%); */
    border: 1px solid #2A9D8F ;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
    transition: all 0.3s;
    cursor: pointer;
    opacity: 0.9;
}

.non-route-custom-marker .marker-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    font-size: 1rem;
    line-height: 1;
}

.non-route-custom-marker:hover {
    transform: rotate(-45deg) scale(1.15);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
    opacity: 1;
}

/* Legacy: Gray markers for non-route places (fallback) */
.leaflet-marker-icon.non-route-marker {
    filter: grayscale(100%) brightness(0.7);
    opacity: 0.8;
}

/* Non-route place popup styling */
.map-popup-content.non-route-popup {
    min-width: 280px;
}

.non-route-badge {
    display: inline-block;
    background: #6c757d;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 8px;
}

/* Action buttons in non-route popup */
.map-popup-actions {
    display: flex;
    flex-direction: row;
    gap: 8px;
    margin: 10px 0;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

.popup-action-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.popup-action-btn.add-to-route-btn {
    background: #2A9D8F;
    color: white;
}

.popup-action-btn.add-to-route-btn:hover {
    background: #248075;
}

.popup-action-btn.edit-btn {
    background: #667eea;
    color: white;
}

.popup-action-btn.edit-btn:hover {
    background: #5568d3;
}

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

.popup-action-btn.delete-btn:hover {
    background: #c82333;
}

/* Route Place Popup Action Buttons (Icon-only, like place list) */
.route-popup-action-btn {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 0.9rem;
    cursor: pointer;
}

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

.route-popup-action-btn:active {
    transform: translateY(0);
}

.route-popup-action-btn.edit-btn {
    color: #2A9D8F;
    border-color: #2A9D8F;
}

.route-popup-action-btn.edit-btn:hover {
    background: linear-gradient(135deg, #2A9D8F 0%, #3EBBA5 100%);
    color: white;
    border-color: #2A9D8F;
}

.route-popup-action-btn.delete-btn {
    color: #e74c3c;
    border-color: #e74c3c;
}

.route-popup-action-btn.delete-btn:hover {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border-color: #e74c3c;
}

/* ============================================
   POSITION SELECTOR MODAL
   ============================================ */

.modal-small {
    max-width: 500px;
}

.modal-instruction {
    color: #495057;
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

#placeToAddName {
    font-weight: 600;
    color: #2A9D8F;
}

.position-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding: 5px;
}

.position-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    text-align: left;
}

.position-btn:hover {
    border-color: #2A9D8F;
    background: #f0fdf8;
    transform: translateX(4px);
}

.position-btn i {
    color: #2A9D8F;
    font-size: 1rem;
}

.position-btn span {
    flex: 1;
    font-weight: 500;
    color: #333;
}

.position-btn-end {
    background: #2A9D8F;
    color: white;
    border-color: #2A9D8F;
    font-weight: 600;
}

.position-btn-end:hover {
    background: #248075;
    border-color: #248075;
}

.position-btn-end i {
    color: white;
}

.position-btn-end span {
    color: white;
}

/* ============================================
   FILTER SCOPE TOGGLE
   ============================================ */

.filter-group.scope-toggle {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 15px;
}

.scope-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.scope-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.scope-option:hover {
    border-color: #2A9D8F;
    background: #f0fdf8;
}

.scope-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #2A9D8F;
}

.scope-option input[type="radio"]:checked + span {
    font-weight: 600;
    color: #2A9D8F;
}

.scope-option span {
    flex: 1;
    color: #495057;
}

/* Mobile adjustments for scope toggle */
@media (max-width: 768px) {
    .position-buttons {
        max-height: 300px;
    }

    .position-btn {
        padding: 14px 16px;
        min-height: 48px; /* Touch-friendly */
    }

    .scope-option {
        padding: 12px 14px;
        min-height: 48px; /* Touch-friendly */
    }

    .scope-option input[type="radio"] {
        width: 20px;
        height: 20px;
    }
}

/* ============================================
   FILTER PANEL OVERLAY (ON MAP)
   ============================================ */

.filter-panel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 20px;
    z-index: 1000;
    backdrop-filter: blur(2px);
}

.filter-panel-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 100%;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.filter-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.filter-panel-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #2A9D8F;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.map-btn.active {
    background: #2A9D8F;
    color: white;
}

/* Mobile filter panel overlay */
@media (max-width: 768px) {
    .filter-panel-overlay {
        padding: 10px;
    }

    .filter-panel-content {
        max-width: 100%;
        max-height: calc(100vh - 20px);
    }

    .filter-panel-header {
        padding: 15px;
    }

    .filter-panel-body {
        padding: 15px;
    }
}

/* ============================================
   ALL PLACES SECTION
   ============================================ */

.all-places-section {
    flex: 1;
    overflow: auto;
    padding: 15px;
    min-height: 0;
}

.all-places-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.all-places-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #2A9D8F;
    display: flex;
    align-items: center;
    gap: 8px;
}

.all-places-count {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

.all-places-search {
    position: relative;
    margin-bottom: 15px;
}

.all-places-search .search-input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
}

.all-places-search .search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

.all-places-list {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    gap: 10px;
}

/* All Place Card */
.all-place-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 10px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.2s;
    cursor: pointer;
}

.all-place-card:hover {
    border-color: #2A9D8F;
    box-shadow: 0 2px 8px rgba(42, 157, 143, 0.1);
    background: #f0fdf8;
}

.all-place-card.selected {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #2196f3;
    border-left-width: 4px;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
    transform: translateX(2px);
}

.all-place-card.selected .all-place-card-name {
    color: #1565c0;
    font-weight: 700;
}

.all-place-card.selected .all-place-card-icon {
    background: #e3f2fd;
}

.all-place-card-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0fdf8;
    border-radius: 8px;
    flex-shrink: 0;
}

.all-place-card-content {
    flex: 1;
    min-width: 0;
}

.all-place-card-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.all-place-card-tags {
    font-size: 0.85rem;
    color: #6c757d;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.all-place-card-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.all-place-btn {
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.all-place-btn.add-btn {
    background: #2A9D8F;
    color: white;
}

.all-place-btn.add-btn:hover {
    background: #248075;
}

.all-place-btn.edit-btn {
    background: #667eea;
    color: white;
}

.all-place-btn.edit-btn:hover {
    background: #5568d3;
}

.all-place-btn.delete-btn {
    background: #dc3545;
    color: white;
}

.all-place-btn.delete-btn:hover {
    background: #c82333;
}

/* Empty state */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #6c757d;
}

.empty-state p {
    margin: 10px 0 0 0;
    font-size: 1rem;
}

/* ============================================
   PLACE ADDED SUCCESS MODAL
   ============================================ */

.modal-sub-instruction {
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 10px;
    margin-bottom: 20px;
}

.modal-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

/* ============================================
   REMOVE FROM ROUTE BUTTON
   ============================================ */

.btn-remove-from-route {
    width: 100%;
    padding: 12px 18px;
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    color: #856404;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
}

.btn-remove-from-route:hover {
    background: #ffc107;
    color: white;
    border-color: #ffc107;
}

.btn-remove-from-route i {
    font-size: 1.1rem;
}

/* ============================================
   MOBILE RESPONSIVENESS
   ============================================ */

@media (max-width: 768px) {
    .all-place-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .all-place-card-actions {
        width: 100%;
        justify-content: space-between;
    }

    .all-place-btn {
        flex: 1;
        justify-content: center;
    }

    /* Smaller button text on mobile */
    .all-place-btn span {
        display: none;
    }

    .all-place-btn i {
        margin: 0;
    }
}

/* ============================================
   TAG MANAGEMENT
   ============================================ */

/* Tags Tabs */
.tags-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.tags-tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #666;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tags-tab-btn:hover {
    color: #2A9D8F;
    background: #f0fdf8;
}

.tags-tab-btn.active {
    color: #2A9D8F;
    border-bottom-color: #2A9D8F;
}

.tags-tab-btn i {
    font-size: 1.1rem;
}

/* Tags Tab Content */
.tags-tab-content {
    display: none;
}

.tags-tab-content.active {
    display: block;
}

/* Tags List Header */
.tags-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.tags-list-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
}

/* Tags List */
.tags-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

.tags-list::-webkit-scrollbar {
    width: 8px;
}

.tags-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.tags-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.tags-list::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Tag Item */
.tag-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s;
}

.tag-item:hover {
    border-color: #2A9D8F;
    box-shadow: 0 2px 6px rgba(42, 157, 143, 0.1);
}

.tag-icon {
    font-size: 1.8rem;
    min-width: 40px;
    text-align: center;
}

.tag-name {
    flex: 1;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
}

.tag-actions {
    display: flex;
    gap: 8px;
}

.tag-action-btn {
    padding: 8px 12px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #666;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tag-action-btn:hover {
    background: #f5f5f5;
    border-color: #999;
    color: #333;
}

.tag-action-btn.edit-btn:hover {
    background: #e3f2fd;
    border-color: #2196F3;
    color: #2196F3;
}

.tag-action-btn.delete-btn:hover {
    background: #ffebee;
    border-color: #E76F51;
    color: #E76F51;
}

/* Icon Input Group */
.icon-input-group {
    display: flex;
    gap: 10px;
}

.icon-input {
    flex: 1;
    font-size: 1.2rem;
    text-align: center;
}

/* Emoji Picker */
.emoji-picker {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
}

.emoji-picker-header {
    margin-bottom: 10px;
}

.emoji-search {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.emoji-search:focus {
    outline: none;
    border-color: #2A9D8F;
}

.emoji-picker-categories {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.emoji-picker-categories::-webkit-scrollbar {
    height: 6px;
}

.emoji-picker-categories::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.emoji-picker-categories::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.emoji-category-btn {
    padding: 8px 12px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.emoji-category-btn:hover {
    border-color: #2A9D8F;
    background: #f0fdf8;
}

.emoji-category-btn.active {
    background: #2A9D8F;
    border-color: #2A9D8F;
    color: white;
}

.emoji-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
    gap: 5px;
    max-height: 300px;
    overflow-y: auto;
    padding: 5px;
}

.emoji-picker-grid::-webkit-scrollbar {
    width: 8px;
}

.emoji-picker-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.emoji-picker-grid::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.emoji-picker-grid::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.emoji-btn {
    padding: 10px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-btn:hover {
    background: #2A9D8F;
    border-color: #2A9D8F;
    transform: scale(1.1);
}

/* Delete Tag Modal */
.delete-tag-places-list {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
}

.delete-tag-places-scroll {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
}

.delete-tag-places-scroll::-webkit-scrollbar {
    width: 6px;
}

.delete-tag-places-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.delete-tag-places-scroll::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.delete-tag-place-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #333;
}

.delete-tag-place-item i {
    color: #E76F51;
    font-size: 0.9rem;
}

/* Modal Medium Size (for edit tag modal) */
.modal-medium {
    max-width: 600px;
}

/* ============================================
   MOBILE SCHEDULE EDIT MODAL
   ============================================ */
.schedule-edit-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.schedule-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.schedule-field label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.datetime-inputs {
    display: flex;
    gap: 10px;
}

.datetime-inputs input[type="date"],
.datetime-inputs input[type="time"] {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
}

.datetime-inputs input[type="date"]:focus,
.datetime-inputs input[type="time"]:focus {
    outline: none;
    border-color: #2A9D8F;
    box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.15);
}

/* Tappable time elements in mobile timeline */
.mobile-timeline-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    margin: -4px -8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.mobile-timeline-time:active {
    background-color: rgba(42, 157, 143, 0.15);
}

.mobile-timeline-time i.fa-edit {
    font-size: 10px;
    color: #2A9D8F;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .datetime-inputs {
        flex-direction: column;
    }

    .datetime-inputs input[type="date"],
    .datetime-inputs input[type="time"] {
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
}

/* Empty State for Tags */
.tags-list .empty-state {
    padding: 40px 20px;
}

/* Mobile Responsiveness for Tags */
@media (max-width: 768px) {
    .tags-tabs {
        gap: 5px;
    }

    .tags-tab-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    .tags-tab-btn i {
        font-size: 1rem;
    }

    .tags-list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .tags-list-header .btn {
        width: 100%;
    }

    .tag-item {
        padding: 10px 12px;
    }

    .tag-icon {
        font-size: 1.5rem;
        min-width: 35px;
    }

    .tag-name {
        font-size: 0.95rem;
    }

    .tag-action-btn {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    .icon-input-group {
        flex-direction: column;
    }

    .icon-input-group .btn {
        width: 100%;
    }

    .emoji-picker-grid {
        grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
        gap: 3px;
    }

    .emoji-btn {
        padding: 8px;
        font-size: 1.3rem;
    }

    .emoji-category-btn {
        padding: 6px 10px;
        font-size: 1rem;
    }
}

/* ===== Modern Google Places Popup Styles ===== */

/* Place Popup with Google Data */
.place-popup {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.place-popup.has-google-data {
    min-width: 320px;
}

/* Header Content Container */
.place-popup .header-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.place-popup .map-popup-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 0 12px;
    margin-top: 10px;
}

.place-popup .map-popup-header strong {
    font-size: 1.15rem;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.operational {
    background: #d4edda;
    color: #155724;
}

.status-badge.closed-temp {
    background: #fff3cd;
    color: #856404;
}

.status-badge.closed-perm {
    background: #f8d7da;
    color: #721c24;
}

/* Google Place Badge */
.google-place-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #4285f4 0%, #34a853 50%, #fbbc05 75%, #ea4335 100%);
    color: white;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.google-place-badge i {
    font-size: 0.8rem;
}

/* Quick Info Section (Rating + Price) */
.popup-quick-info {
    display: flex;
    gap: 15px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 8px;
    margin: 10px 0;
}

/* Rating Display */
.popup-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

.popup-rating .rating-stars {
    font-size: 1.1rem;
}

.popup-rating strong {
    color: #f39c12;
    font-size: 1rem;
}

.popup-rating .rating-count {
    color: #7f8c8d;
    font-size: 0.8rem;
}

/* Price Display */
.popup-price {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

.popup-price .price-symbols {
    color: #27ae60;
    font-weight: bold;
    font-size: 1.1rem;
}

.popup-price .price-label {
    color: #7f8c8d;
    font-size: 0.8rem;
}

/* Address Display */
.popup-address {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 10px 0;
    font-size: 0.85rem;
    color: #495057;
    line-height: 1.4;
}

.popup-address i {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 2px;
}

/* Contact Section */
.popup-contact-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
    padding: 10px 12px;
    background: linear-gradient(135deg, #ecf0f1 0%, #ffffff 100%);
    border-radius: 8px;
}

.popup-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #2c3e50;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.popup-contact-item:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.popup-contact-item i {
    font-size: 1rem;
    color: #2A9D8F;
    transition: color 0.3s;
}

.popup-contact-item:hover i {
    color: white;
}

/* Opening Hours Section */
.popup-hours-section {
    margin: 12px 0;
    padding: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 10px;
    border-left: 4px solid #3498db;
}

.popup-hours-section .popup-section-title {
    color: #2c3e50;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.popup-hours-section .popup-section-title i {
    color: #3498db;
}

.popup-hours-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hours-day {
    font-size: 0.8rem;
    color: #495057;
    padding: 5px 8px;
    background: white;
    border-radius: 6px;
    border-left: 3px solid #ecf0f1;
    transition: all 0.2s;
}

.hours-day:hover {
    border-left-color: #3498db;
    background: #f8f9fa;
}

/* Coordinates with Icon */
.place-popup .map-popup-coords {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: #7f8c8d;
    margin: 12px 0 10px;
    padding: 0 12px;
}

.place-popup .map-popup-coords i {
    color: #95a5a6;
    font-size: 0.85rem;
}

/* Categories and Countries in Place Popup */
.place-popup .map-popup-categories,
.place-popup .map-popup-countries {
    padding: 0 12px;
    margin: 10px 0;
}

/* Enhanced Action Buttons Container */
.place-popup .map-popup-actions {
    display: flex;
    gap: 10px;
    padding: 12px;
    margin-top: 8px;
    border-top: 2px solid #ecf0f1;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

/* Links Section */
.place-popup .map-popup-links {
    padding: 10px 12px 12px;
    margin-top: 5px;
}

/* Popup Container Styling */
.place-popup-container {
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
    overflow: hidden !important;
}

.place-popup-container .leaflet-popup-content-wrapper {
    border-radius: 12px !important;
    padding: 0 !important;
    overflow: hidden;
}

.place-popup-container .leaflet-popup-content {
    margin: 0 !important;
    width: auto !important;
}

.place-popup-container .leaflet-popup-tip {
    display: none !important;
}

/* Non-route popup specific styling */
.non-route-popup-container .map-popup-content {
    border-left: 4px solid #95a5a6;
}

/* Loading and Error Indicators for Google Data */
.google-data-loading,
.google-data-error {
    padding: 12px;
    margin: 10px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 500;
}

.google-data-loading {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1976d2;
    border-left: 4px solid #2196f3;
}

.google-data-loading i {
    font-size: 1.1rem;
    color: #2196f3;
}

.google-data-error {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
    border-left: 4px solid #f44336;
}

.google-data-error i {
    font-size: 1.1rem;
    color: #f44336;
}

/* Responsive adjustments for place popups */
@media (max-width: 768px) {
    .place-popup.has-google-data {
        min-width: 280px;
    }

    .popup-quick-info {
        flex-direction: column;
        gap: 8px;
    }

    .popup-contact-section {
        padding: 8px;
    }

    .popup-contact-item {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .popup-hours-section {
        padding: 10px;
    }

    .hours-day {
        font-size: 0.75rem;
    }
}

/* ===== TOAST NOTIFICATION SYSTEM ===== */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: all;
    transform: translateY(-120%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 400px;
    min-width: 280px;
    border-left: 4px solid #ccc;
    position: relative;
    overflow: hidden;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.hide {
    transform: translateX(120%);
    opacity: 0;
}

.toast-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toast-message {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
    color: #333;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #666;
}

/* Progress bar for auto-dismiss */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.2);
    transition: width linear;
}

/* Toast types */
.toast.success {
    border-left-color: #10b981;
}

.toast.success .toast-icon {
    color: #10b981;
}

.toast.success .toast-progress {
    background: #10b981;
}

.toast.error {
    border-left-color: #ef4444;
}

.toast.error .toast-icon {
    color: #ef4444;
}

.toast.error .toast-progress {
    background: #ef4444;
}

.toast.info {
    border-left-color: #3b82f6;
}

.toast.info .toast-icon {
    color: #3b82f6;
}

.toast.info .toast-progress {
    background: #3b82f6;
}

.toast.warning {
    border-left-color: #f59e0b;
}

.toast.warning .toast-icon {
    color: #f59e0b;
}

.toast.warning .toast-progress {
    background: #f59e0b;
}

/* Confirmation dialog overlay */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.confirm-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.confirm-dialog {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.confirm-overlay.show .confirm-dialog {
    transform: scale(1) translateY(0);
}

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

.confirm-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.confirm-icon.warning {
    color: #f59e0b;
}

.confirm-icon.danger {
    color: #ef4444;
}

.confirm-icon.question {
    color: #3b82f6;
}

.confirm-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    flex: 1;
}

.confirm-message {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #666;
    margin-bottom: 24px;
    white-space: pre-line;
}

.confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.confirm-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 80px;
}

.confirm-btn.cancel {
    background: #f3f4f6;
    color: #666;
}

.confirm-btn.cancel:hover {
    background: #e5e7eb;
}

.confirm-btn.confirm {
    background: #3b82f6;
    color: white;
}

.confirm-btn.confirm:hover {
    background: #2563eb;
}

.confirm-btn.confirm.danger {
    background: #ef4444;
}

.confirm-btn.confirm.danger:hover {
    background: #dc2626;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .notification-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .toast {
        min-width: auto;
        width: 100%;
    }

    .confirm-dialog {
        width: 95%;
        padding: 20px;
    }

    .confirm-message {
        font-size: 0.9rem;
    }

    .confirm-btn {
        flex: 1;
    }
}

/* ===== KEYBOARD SHORTCUTS MODAL ===== */
.shortcuts-section {
    margin-bottom: 30px;
}

.shortcuts-section:last-of-type {
    margin-bottom: 20px;
}

.shortcuts-section h3 {
    font-size: 1.1rem;
    color: #2A9D8F;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.shortcuts-section h3 i {
    font-size: 1rem;
}

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

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

.shortcut-keys {
    display: flex;
    gap: 6px;
    align-items: center;
    font-weight: 600;
    min-width: 180px;
}

.shortcut-keys kbd {
    display: inline-block;
    padding: 4px 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    background: linear-gradient(to bottom, #f9f9f9, #e8e8e8);
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    white-space: nowrap;
}

.shortcut-description {
    flex: 1;
    color: #666;
    font-size: 0.95rem;
}

.shortcuts-tip {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 4px solid #2196f3;
    padding: 15px;
    border-radius: 8px;
    color: #1565c0;
    font-size: 0.9rem;
    line-height: 1.5;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.shortcuts-tip i {
    font-size: 1.2rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.shortcuts-tip strong {
    color: #0d47a1;
}

/* Enhanced selected place styling */
.place-item.selected {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%) !important;
    border-left: 4px solid #2196f3 !important;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2) !important;
    transform: translateX(4px);
}

.place-item.selected .place-name {
    color: #1565c0;
    font-weight: 600;
}

/* Mobile responsive for shortcuts */
@media (max-width: 768px) {
    .shortcut-keys {
        min-width: 140px;
        font-size: 0.85rem;
    }

    .shortcut-keys kbd {
        padding: 3px 8px;
        font-size: 0.75rem;
    }

    .shortcut-description {
        font-size: 0.85rem;
    }

    .shortcuts-tip {
        font-size: 0.85rem;
        padding: 12px;
    }
}

/* ============================================
   PLACE DETAILS SIDEBAR (Desktop only)
   ============================================ */

.place-details-sidebar {
    position: fixed;
    right: -450px;
    top: 0;
    width: 450px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 15px rgba(0,0,0,0.15);
    transition: right 0.3s ease;
    z-index: 1001;
    display: flex;
    flex-direction: column;
}

.place-details-sidebar.active {
    right: 0;
}

.place-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #2A9D8F, #3EBBA5);
    color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.place-details-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.place-details-header .close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.place-details-header .close-btn:hover {
    background: rgba(255,255,255,0.3);
}

.place-details-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.place-details-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    text-align: center;
}

.place-details-empty i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

.place-details-empty p {
    font-size: 1.1rem;
}

/* Hide sidebar on mobile */
@media (max-width: 768px) {
    .place-details-sidebar {
        display: none;
    }
}

/* ============================================
   MINIMAL LEAFLET POPUP (Desktop)
   ============================================ */

.map-popup-minimal {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 1rem;
}
.map-popup-minimal i {
    margin-right: 20px;
}
.place-number-badge {
    background: #2A9D8F;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    flex-shrink: 0;
}

.place-name-text {
    font-weight: 600;
    color: #2c3e50;
}

.non-route-mini {
    color: #6c757d;
    font-size: 1.2rem;
}

.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 3px 14px rgba(0,0,0,0.2);
}

.leaflet-popup-content {
    margin: 0;
    min-width: 150px;
}

/* ============================================
   ROUTING & ROUTE INFO PANEL
   ============================================ */

/* Hide Leaflet Routing Machine instruction panel */
.leaflet-routing-container {
    display: none !important;
}

/* Route Info Panel - Floating panel showing distance and duration */
.route-info-panel {
    position: absolute;
    top: 15px;
    right: 70px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 15px;
    z-index: 1000;
    min-width: 200px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(42, 157, 143, 0.2);
}

.route-info-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #2A9D8F;
    font-size: 0.95rem;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(42, 157, 143, 0.2);
}

.route-info-header i {
    font-size: 1rem;
}

.route-info-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.route-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #333;
}

.route-info-item i {
    width: 20px;
    text-align: center;
    color: #2A9D8F;
    font-size: 0.95rem;
}

.route-info-item span {
    font-weight: 600;
    color: #2c3e50;
}

/* Mobile adjustments for route info panel */
@media (max-width: 768px) {
    .route-info-panel {
        top: 15px;
        right: 70px;
        left: auto;
        min-width: 160px;
        padding: 12px;
        font-size: 0.85rem;
    }

    .route-info-header {
        font-size: 0.85rem;
        margin-bottom: 8px;
        padding-bottom: 8px;
    }

    .route-info-item {
        font-size: 0.8rem;
        gap: 8px;
    }

    .route-info-item i {
        width: 18px;
        font-size: 0.85rem;
    }
}

/* ============================================
   ROUTE SEGMENT POPUPS
   ============================================ */

/* Route segment hover cursor */
.route-segment {
    cursor: pointer;
}

/* Segment popup styling */
.route-segment-popup {
    min-width: 250px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.segment-popup-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 8px 8px 0 0;
    margin: -1px -1px 0 -1px;
}

.segment-popup-header i {
    font-size: 1rem;
}

.segment-popup-content {
    padding: 15px 0 5px 0;
}

.segment-places {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.segment-places i {
    color: #667eea;
    font-size: 0.9rem;
}

.segment-start,
.segment-end {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.segment-start {
    color: #667eea;
}

.segment-end {
    color: #764ba2;
}

.segment-stats {
    display: flex;
    gap: 15px;
    justify-content: space-around;
}

.segment-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    flex: 1;
}

.segment-stat i {
    color: #667eea;
    font-size: 0.95rem;
    width: 18px;
    text-align: center;
}

.segment-stat span {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .route-segment-popup {
        min-width: 200px;
    }

    .segment-popup-header {
        font-size: 0.85rem;
        padding: 8px 10px;
    }

    .segment-places {
        padding: 10px;
        gap: 8px;
    }

    .segment-start,
    .segment-end {
        font-size: 0.85rem;
    }

    .segment-stats {
        flex-direction: column;
        gap: 8px;
    }

    .segment-stat {
        padding: 6px 10px;
    }

    .segment-stat span {
        font-size: 0.85rem;
    }
}


/* Login Modal Error Message */
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
    margin-bottom: 15px;
    font-size: 14px;
}

