/* salzburg-map-style.css */

/* Basic body and container styling */
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    background-color: #f8f9fa; /* Light grey background */
}
/* Base styling for body and app container */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    background-color: #f8f9fa; /* Light grey background */
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#app-container {
    display: flex;
    min-height: 100vh;
    flex-direction: column; /* Stack on small screens */
}

@media (min-width: 768px) {
    #app-container {
        flex-direction: row; /* Side-by-side on larger screens */
    }
}

/* Control Panel Styling */
#control-panel {
    width: 100%;
    max-width: 400px;
    background: #ffffff;
    padding: 20px;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 2;
}

@media (min-width: 768px) {
    #control-panel {
        width: 350px;
        min-width: 300px;
    }
}

#control-panel h1 {
    color: #005A9C;
    font-size: 2em;
    margin-bottom: 10px;
    font-weight: bold;
}

#control-panel p {
    color: #555;
    margin-bottom: 20px;
}

.search-box {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

#city-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.btn {
    padding: 10px 18px;
    background: #007BFF;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease, transform 0.1s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
}

.section-title {
    margin-top: 25px;
    margin-bottom: 15px;
    color: #005A9C;
    font-size: 1.2em;
    font-weight: 600;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 5px;
}

/* Slider for attractions */
#attractions-filter {
    background: #f0f8ff; /* Light blue background */
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #d0e8ff;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

#attractions-filter label {
    font-weight: 600;
    color: #005A9C;
    margin-bottom: 8px;
}

#attractions-range {
    -webkit-appearance: none; /* Override default look */
    appearance: none;
    height: 8px;
    background: #ddd;
    outline: none;
    border-radius: 5px;
    transition: opacity .2s;
    cursor: pointer;
}

#attractions-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007BFF;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border: 2px solid white;
}

#attractions-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007BFF;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border: 2px solid white;
}

#num-attractions-display {
    font-weight: bold;
    color: #007BFF;
    margin-left: 5px;
}


.attraction-item {
    background: white;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #eee;
}

.attraction-item:hover {
    background: #e9f5ff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.attraction-item .fa-plus,
.attraction-item .fa-check {
    color: #007BFF;
}

.attraction-item.selected {
    background-color: #d4edda;
    border-color: #28a745;
}

.attraction-item.selected .fa-plus,
.attraction-item.selected .fa-check {
    color: #28a745;
}

.attraction-icon {
    font-size: 20px;
    width: 30px;
    text-align: center;
    color: #005A9C;
}

.attraction-details {
    flex: 1;
}

.attraction-name {
    font-weight: 600;
    margin-bottom: 3px;
    color: #333;
}

.attraction-category {
    font-size: 0.85em;
    color: #7f8c8d;
}

.route-info {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    border: 1px solid #cce5ff;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.info-label {
    font-weight: 600;
    color: #005A9C;
}

#map-container {
    flex: 1;
    height: 100vh;
    position: relative;
}

#map {
    height: 100%;
    width: 100%;
    z-index: 1;
}

#loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.85);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    display: none;
    border-radius: 12px;
}

.spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #007BFF;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loading-text {
    color: #005A9C;
    font-size: 1.1em;
    font-weight: 500;
}

/* Custom Leaflet marker icons with Font Awesome */
.attraction-marker, .poi-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: bold;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.attraction-marker {
    width: 36px;
    height: 36px;
    font-size: 16px;
}

.poi-marker {
    width: 28px;
    height: 28px;
    font-size: 12px;
}

/* Animation for pulsing markers */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7); /* Blue pulse */
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 15px rgba(0, 123, 255, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

.attraction-marker.pulsing {
    animation: pulse 1.5s infinite ease-out;
}

.poi-marker.pulsing {
    animation: pulse 1.5s infinite ease-out;
}

/* Style for the animating red point on the route */
.animated-route-point {
    background-color: red;
    border-radius: 50%;
    width: 15px;
    height: 15px;
    border: 2px solid white;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
    z-index: 999; /* Ensure it's above the route line */
}

/* Custom Message Overlay Styling */
#message-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3); /* Semi-transparent background */
    z-index: 1001; /* Above loading overlay */
    display: flex;
    justify-content: center;
    align-items: center;
}

#message-box {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    position: relative;
    max-width: 300px;
    font-size: 1.1em;
    color: #333;
}

.message-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #777;
}

.message-close-btn:hover {
    color: #333;
}

/* Utility class to hide elements */
.hidden {
    display: none !important;
}

/* Custom Leaflet popup styling */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    padding: 15px;
    background-color: #ffffff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    border: none;
}

.leaflet-popup-content {
    font-size: 1rem;
    color: #333;
    line-height: 1.5;
}

.leaflet-popup-content b {
    color: #005A9C; /* Deep Blue for bold text in popups */
    font-size: 1.1em;
}

.leaflet-popup-tip {
    background: #ffffff; /* Match popup background */
}

/* Leaflet control (e.g., zoom controls, layer control) styling */
.leaflet-control-layers-toggle {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    width: 36px;
    height: 36px;
    line-height: 36px;
}

.leaflet-control-layers-expanded {
    padding: 10px;
    border-radius: 8px;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    color: #333;
}

/* Style for Leaflet Routing Machine itinerary */
.leaflet-routing-container {
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.leaflet-routing-alt {
    padding: 5px 0;
}

.leaflet-routing-alt h2 {
    font-size: 1.1em;
    color: #005A9C;
    margin: 5px 0;
}

.leaflet-routing-icon {
    vertical-align: middle;
    margin-right: 5px;
}



/* --- Legend Control Styling --- */
.legend-control {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    line-height: 1.5;
}

.legend-control h4 {
    margin-top: 0;
    margin-bottom: 8px;
    text-align: center;
    font-weight: bold;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.legend-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white; /* Icon color */
    border-radius: 3px;
    margin-right: 8px;
    font-size: 12px;
}

.legend-label {
    font-size: 14px;
}
