/* Platty Maps v3.0 - Frontend Styles */

/* Leaflet overrides */
.leaflet-container {
    background: #f0f0f0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.leaflet-tile-pane {
    filter: saturate(0.8);
}

/* Mapa container */
.platty-maps-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.platty-maps-map {
    width: 100%;
    height: 100%;
}

/* Controles do mapa */
.platty-maps-controls {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    z-index: 400;
    display: flex;
    gap: 10px;
    background: white;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.platty-maps-search {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 200px;
}

.platty-maps-search:focus {
    outline: none;
    border-color: #3B52CB;
    box-shadow: 0 0 0 3px rgba(59, 82, 203, 0.1);
}

.platty-maps-filter {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    min-width: 180px;
}

.platty-maps-filter:focus {
    outline: none;
    border-color: #3B52CB;
    box-shadow: 0 0 0 3px rgba(59, 82, 203, 0.1);
}

/* Marcadores customizados */
.platty-marker-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #3B52CB;
    color: white;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.platty-marker-icon.active {
    background: #F4D03F;
    color: #333;
    box-shadow: 0 0 0 4px rgba(59, 82, 203, 0.3);
}

/* Formato de marcador - Quadrado */
.platty-marker-square {
    border-radius: 4px;
}

/* Formato de marcador - Hexágono */
.platty-marker-hexagon {
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* Formato de marcador - Estrela */
.platty-marker-star {
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

/* Popup */
.platty-popup {
    background: white;
    border-radius: 6px;
    padding: 15px;
    max-width: 300px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.platty-popup-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
}

.platty-popup-content {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.platty-popup-button {
    background: #3B52CB;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.2s ease;
    display: inline-block;
}

.platty-popup-button:hover {
    background: #2d3e99;
}

/* Botão maximize */
.platty-maps-maximize {
    position: absolute;
    bottom: 15px;
    right: 15px;
    z-index: 400;
    background: white;
    border: 1px solid #ddd;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.platty-maps-maximize:hover {
    background: #f5f5f5;
    border-color: #3B52CB;
}

/* Maximize fullscreen */
.platty-maps-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    border-radius: 0;
}

.platty-maps-fullscreen .platty-maps-close {
    display: block;
}

.platty-maps-close {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10000;
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    padding: 0;
    transition: all 0.2s ease;
}

.platty-maps-close:hover {
    background: #f0f0f0;
}

/* Responsivo */
@media (max-width: 768px) {
    .platty-maps-controls {
        flex-direction: column;
        gap: 8px;
    }

    .platty-maps-search,
    .platty-maps-filter {
        min-width: auto;
        width: 100%;
    }

    .platty-marker-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .platty-popup {
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .platty-maps-controls {
        padding: 10px;
        gap: 6px;
    }

    .platty-maps-search,
    .platty-maps-filter {
        padding: 8px 10px;
        font-size: 13px;
    }

    .platty-marker-icon {
        width: 32px;
        height: 32px;
    }
}

/* Loading state */
.platty-maps-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 15px;
}

.platty-maps-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f0;
    border-top-color: #3B52CB;
    border-radius: 50%;
    animation: platty-spin 0.8s linear infinite;
}

@keyframes platty-spin {
    to { transform: rotate(360deg); }
}
