/* Platty Maps Frontend Styles v2.1 */

:root {
    --platty-primary: #3B52CB;
    --platty-accent: #F4D03F;
}

.platty-maps-wrapper {
    position: relative;
    width: 100%;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.platty-maps-expand-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
}

.platty-expand-toggle {
    padding: 10px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.platty-expand-toggle:hover {
    background: var(--platty-primary);
    color: white;
    border-color: var(--platty-primary);
}

.platty-expand-toggle.fullscreen {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.platty-maps-container {
    width: 100%;
    height: 500px;
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, #e8f0fe 0%, #f0f8ff 100%);
}

.platty-maps-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 9998;
    border-radius: 0;
}

/* Leaflet overrides */
.platty-maps-container .leaflet-container {
    background: linear-gradient(to bottom, #7cc9e8 0%, #c9e4f5 100%);
    font-family: inherit;
}

.platty-maps-container .leaflet-control {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.platty-maps-container .leaflet-control-zoom {
    border: 1px solid #e0e0e0;
}

.platty-maps-container .leaflet-control-zoom a {
    background: white;
    color: #333;
    border-bottom: 1px solid #e0e0e0;
    width: 36px;
    height: 36px;
    line-height: 36px;
    font-size: 18px;
    font-weight: bold;
}

.platty-maps-container .leaflet-control-zoom a:hover {
    background: var(--platty-primary);
    color: white;
}

/* Filter Section */
.platty-maps-filters {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    flex: 1;
    min-width: 200px;
    display: flex;
    gap: 8px;
}

.filter-select,
.filter-search {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.filter-select:focus,
.filter-search:focus {
    outline: none;
    border-color: var(--platty-primary);
    box-shadow: 0 0 0 3px rgba(59, 82, 203, 0.1);
}

/* Locations List */
.platty-maps-locations-list {
    max-height: 300px;
    overflow-y: auto;
    background: white;
    border-top: 1px solid #e0e0e0;
}

.locations-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.locations-list li {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    gap: 12px;
    align-items: center;
}

.locations-list li:hover {
    background: #f8f9fa;
    padding-left: 20px;
}

.locations-list li.active {
    background: #f0f4ff;
    border-left: 4px solid var(--platty-primary);
    padding-left: 12px;
}

.location-logo {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
    background: #e0e0e0;
}

.location-info {
    flex: 1;
}

.location-title {
    font-weight: 600;
    color: #333;
    margin: 0 0 4px 0;
    font-size: 14px;
}

.location-address {
    color: #666;
    font-size: 12px;
    margin: 0;
}

/* Marker Shapes */
.platty-maps-marker {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Circle Marker */
.platty-maps-marker-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--platty-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(59, 82, 203, 0.3);
    overflow: hidden;
}

/* Square Marker */
.platty-maps-marker-square {
    width: 48px;
    height: 48px;
    border-radius: 0;
    background: white;
    border: 3px solid var(--platty-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(59, 82, 203, 0.3);
    overflow: hidden;
}

/* Hexagon Marker */
.platty-maps-marker-hexagon {
    width: 48px;
    height: 56px;
    background: white;
    border: 3px solid var(--platty-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(59, 82, 203, 0.3);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    overflow: hidden;
}

/* Star Marker */
.platty-maps-marker-star {
    width: 48px;
    height: 48px;
    background: white;
    border: 3px solid var(--platty-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(59, 82, 203, 0.3);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    overflow: hidden;
}

/* Pin Marker */
.platty-maps-marker-pin {
    width: 40px;
    height: 50px;
    background: white;
    border: 3px solid var(--platty-primary);
    border-radius: 50% 50% 50% 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(59, 82, 203, 0.3);
    overflow: hidden;
    transform: rotate(-45deg);
}

.platty-maps-marker-pin img {
    transform: rotate(45deg);
}

/* Marker Image */
.platty-maps-marker-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Marker Hover/Active */
.platty-maps-marker:hover .platty-maps-marker-icon {
    box-shadow: 0 4px 12px rgba(59, 82, 203, 0.5);
    transform: scale(1.1);
}

.platty-maps-marker.active .platty-maps-marker-icon {
    background: var(--platty-accent);
    border-color: var(--platty-primary);
    box-shadow: 0 4px 12px rgba(244, 208, 63, 0.5);
}

/* Popup */
.platty-maps-popup {
    min-width: 250px;
}

.leaflet-popup-content {
    padding: 0 !important;
    border-radius: 4px;
    overflow: hidden;
}

.platty-maps-popup-content {
    padding: 16px;
    background: white;
}

.platty-popup-custom,
.platty-popup-default {
    font-family: inherit;
}

.platty-popup-custom h3,
.platty-popup-default h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.platty-popup-custom p,
.platty-popup-default p {
    margin: 8px 0;
    font-size: 14px;
    color: #666;
}

.popup-component-button {
    display: inline-block;
    margin-top: 8px;
}

.popup-section {
    margin-bottom: 12px;
}

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

/* Cluster */
.marker-cluster {
    background: var(--platty-primary) !important;
    border: 3px solid white !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(59, 82, 203, 0.3) !important;
}

.marker-cluster:hover {
    background: #2d3e99 !important;
    box-shadow: 0 4px 12px rgba(59, 82, 203, 0.5) !important;
}

.marker-cluster-small {
    width: 40px !important;
    height: 40px !important;
    line-height: 40px !important;
}

.marker-cluster-medium {
    width: 50px !important;
    height: 50px !important;
    line-height: 50px !important;
}

.marker-cluster-large {
    width: 60px !important;
    height: 60px !important;
    line-height: 60px !important;
    font-size: 16px !important;
}

/* Responsive */
@media (max-width: 768px) {
    .platty-maps-container {
        height: 400px;
    }
    
    .platty-maps-filters {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .locations-list li {
        padding: 10px 12px;
    }
    
    .platty-maps-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .platty-maps-container {
        height: 300px;
    }
    
    .platty-maps-marker-circle,
    .platty-maps-marker-square,
    .platty-maps-marker-hexagon {
        width: 40px;
        height: 40px;
    }
    
    .platty-maps-marker:hover .platty-maps-marker-icon {
        transform: scale(1.05);
    }
    
    .platty-maps-locations-list {
        max-height: 200px;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.platty-maps-marker {
    animation: fadeIn 0.3s ease;
}

/* Attribution */
.leaflet-attribution {
    background: rgba(255, 255, 255, 0.8) !important;
    font-size: 11px !important;
}

.leaflet-attribution a {
    color: var(--platty-primary) !important;
}
