/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background-color: #2c3e50;
    color: white;
    padding: 15px 20px;
    border-radius: 5px 5px 0 0;
    margin-bottom: 0;
}

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

header h1 {
    margin: 0;
    font-size: 1.8rem;
}

.search-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

#address-search {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    width: 250px;
    outline: none;
    -webkit-appearance: none;
    -webkit-text-size-adjust: 100%;
}

.orientation-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s ease;
}

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

.orientation-btn.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

#location-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.9rem;
    margin-top: 10px;
}

#location-info p {
    margin: 5px 0;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 5px 10px;
    border-radius: 3px;
}

#map {
    height: 60vh;
    width: 100%;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* POI Info Panel */
.poi-info {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    max-width: 300px;
    z-index: 1000;
    transition: transform 0.3s ease;
    max-height: 70vh;
    overflow-y: auto;
}

.poi-info h3 {
    margin-bottom: 10px;
    color: #2c3e50;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.poi-info p {
    margin: 5px 0;
}

.poi-location-info {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.poi-location-info p {
    font-size: 0.9em;
    color: #666;
}

.poi-actions {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.navigate-btn {
    background: #4285f4;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s ease;
}

.navigate-btn:hover {
    background: #3367d6;
}

.navigate-btn:active {
    background: #2d5aa0;
}

.navigate-btn svg {
    flex-shrink: 0;
}

/* User Location Marker */
.user-location-icon {
    background: none !important;
    border: none !important;
    width: 20px !important;
    height: 20px !important;
    margin: -10px 0 0 -10px !important;
}

.user-location-icon div {
    animation: pulse 2s infinite;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    position: relative;
    z-index: 1000;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(66, 133, 244, 0.7);
    }
    70% {
        transform: scale(1.2);
        box-shadow: 0 0 0 10px rgba(66, 133, 244, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(66, 133, 244, 0);
    }
}

/* Custom Location Control */
.leaflet-control-custom {
    background: none;
    border: none;
    box-shadow: none;
}

.leaflet-control-custom .leaflet-bar-part {
    background: white;
    width: 30px;
    height: 30px;
    line-height: 28px;
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.4);
    transition: all 0.2s ease;
}

.leaflet-control-custom .leaflet-bar-part:hover {
    background: #f4f4f4;
    cursor: pointer;
}

/* Desktop hidden state */
.hidden {
    transform: translateX(120%);
}

/* Mobile hidden state is handled in media query */

#close-poi {
    position: absolute;
    top: 5px;
    right: 5px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #7f8c8d;
    padding: 0 5px;
}

/* Leaflet Customization */
.leaflet-popup-content-wrapper {
    border-radius: 4px;
}

.leaflet-popup-content {
    margin: 10px;
}

/* SVG Marker Styling */
.poi-marker-svg, 
.search-result-marker-svg {
    background: none !important;
    border: none !important;
}

.poi-marker-svg svg,
.search-result-marker-svg svg {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    transition: transform 0.2s ease;
}

.poi-marker-svg:hover svg,
.search-result-marker-svg:hover svg {
    transform: scale(1.1);
}

/* Legacy support for old marker classes */
.search-result-marker {
    background: none !important;
    border: none !important;
}

.search-pin {
    color: #1e88e5;
    font-size: 32px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    filter: drop-shadow(0 0 2px rgba(255,255,255,0.8));
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    header h1 {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .search-controls {
        justify-content: center;
    }
    
    #address-search {
        width: 100%;
        max-width: 300px;
    }
    
    #location-info {
        font-size: 0.8rem;
    }
    
    .poi-info {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-width: 100%;
        width: 100%;
        border-radius: 10px 10px 0 0;
        box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.3);
        max-height: 60vh;
        transform: translateY(0);
    }
    
    .poi-info.hidden {
        transform: translateY(100%);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 10px 15px;
    }
    
    #location-info {
        flex-direction: column;
        gap: 5px;
    }
    
    #map {
        height: 70vh;
    }
}