/* ===================================
   Walkley Lofts Map - Custom Styles
   =================================== */

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

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f6f6f4;
    color: #333333;
}

/* ===================================
   Page Layout
   =================================== */

.page-container {
    width: 100%;
    min-height: 100vh;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* ===================================
   Card Styling
   =================================== */

.map-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    width: 100%;
}

.card-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e8e8e8;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333333;
    margin-bottom: 0.25rem;
}

.card-subtitle {
    font-size: 0.9rem;
    color: #666666;
    font-weight: 400;
}

#map-container {
    width: 100%;
    height: 600px;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

.leaflet-container a {
    color: #ffffff;
}

/* No JavaScript Fallback */
.no-js-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-align: center;
    font-size: 1.1rem;
    color: #333333;
    max-width: 400px;
}

/* ===================================
   Custom Leaflet Popup Styling
   =================================== */

.leaflet-popup-content-wrapper {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    max-width: 380px;
    min-width: 320px;
}

.leaflet-popup-content {
    margin: 0;
    padding: 0;
    width: 100% !important;
}

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

/* Custom Popup Content */
.portfolio-popup {
    width: 100%;
}

.portfolio-popup-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    border-radius: 8px 8px 0 0;
}

.portfolio-popup-content {
    padding: 1.5rem;
}

.portfolio-popup-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333333;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.portfolio-popup-description {
    font-size: 0.9rem;
    color: #666666;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.portfolio-popup-button {
    display: inline-block;
    background-color: #333333;
    color:  #ffffff;
    padding: 0.65rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
}

.portfolio-popup-button:hover {
    background-color: #000000;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Simple Tooltip for Non-Clickable Markers */
.simple-tooltip {
    padding: 0.5rem 0.75rem;
}

.simple-tooltip-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333333;
    margin-bottom: 0.25rem;
}

.simple-tooltip-postcode {
    font-size: 0.85rem;
    color: #666666;
}

/* ===================================
   Custom Marker Icons
   =================================== */

.custom-marker-icon {
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

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

/* Clickable markers - darker */
.marker-clickable {
    background-color: #333333;
}

/* Non-clickable markers - lighter */
.marker-non-clickable {
    background-color: #999999;
}

/* Image markers with circular crop */
.custom-marker-icon.image-marker {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid white;
    background-color: #333333;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
    cursor: pointer;
}

.custom-marker-icon.image-marker img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.custom-marker-icon.image-marker.no-image {
    background-color: #333333;
}

.custom-marker-icon.image-marker:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 992px) {
    .page-container {
        padding: 1.5rem;
    }
    
    #map-container {
        height: 500px;
    }
}

@media (max-width: 768px) {
    .page-container {
        padding: 1rem;
    }
    
    .card-header {
        padding: 1.25rem 1.5rem;
    }
    
    .card-title {
        font-size: 1.3rem;
    }
    
    #map-container {
        height: 400px;
    }
    .leaflet-popup-content-wrapper {
        max-width: 280px;
    }
    
    .portfolio-popup-image {
        height: 160px;
    }
    
    .portfolio-popup-content {
        padding: 1rem;
    }
    
    .portfolio-popup-title {
        font-size: 1rem;
    }
    
    .portfolio-popup-description {
        font-size: 0.85rem;
    }
    
    .map-card {
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .page-container {
        padding: 0.75rem;
    }
    
    .card-header {
        padding: 1rem 1.25rem;
    }
    
    .card-title {
        font-size: 1.15rem;
    }
    
    .card-subtitle {
        font-size: 0.85rem;
    }
    
    #map-container {
        height: 350px;
    }
    
    .leaflet-popup-content-wrapper {
        max-width: 260px;
    }
    
    .portfolio-popup-image {
        height: 140px;
    }
}

/* ===================================
   Map Controls Customization
   =================================== */

.leaflet-control-zoom a {
    background-color: white;
    color: #333333;
    border: 2px solid #e0e0e0;
}

.leaflet-control-zoom a:hover {
    background-color: #f6f6f4;
    border-color: #333333;
}

.leaflet-bar {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border-radius: 6px;
}

/* Attribution styling */
.leaflet-control-attribution {
    background-color: rgba(255, 255, 255, 0.9);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}
