/**
 * IntelliRealty Amenity Map Styles
 * Styling for Google Maps amenity visualization
 */

/* Map Container */
.ir-amenity-map-container {
    width: 100%;
    height: 500px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

/* Map Controls */
.ir-map-controls {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    margin: 10px;
    padding: 14px 18px;
    font-family: inherit;
    max-width: 280px;
}

.ir-map-controls .control-header {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

.ir-map-controls .control-header strong {
    font-size: 15px;
    color: #1f2937;
    font-weight: 600;
}

.ir-map-controls .control-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ir-map-controls .control-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.ir-map-controls .control-item:hover {
    background-color: #f3f4f6;
}

.ir-map-controls .control-icon {
    font-size: 20px;
    width: 26px;
    text-align: center;
}

.ir-map-controls .control-label {
    font-size: 14px;
    color: #374151;
    flex: 1;
}

.ir-map-controls .amenity-toggle {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

/* Info Window Popups */
.ir-property-popup,
.ir-amenity-popup {
    font-family: inherit;
    padding: 8px;
    min-width: 200px;
}

.ir-property-popup strong,
.ir-amenity-popup strong {
    font-size: 15px;
    color: #1f2937;
    display: block;
    margin-bottom: 4px;
}

.ir-property-popup p {
    margin: 4px 0;
    color: #6b7280;
    font-size: 13px;
}

/* Amenity Popup Specific */
.ir-amenity-popup .amenity-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.ir-amenity-popup .amenity-icon {
    font-size: 20px;
}

.ir-amenity-popup .amenity-type {
    color: #6b7280;
    font-size: 12px;
    margin: 4px 0;
}

.ir-amenity-popup .amenity-distance {
    color: #1f2937;
    font-weight: 600;
    font-size: 13px;
    margin: 4px 0;
}

.ir-amenity-popup .seasonal {
    color: #f59e0b;
    font-size: 12px;
    margin: 6px 0 0 0;
    padding: 4px 8px;
    background: #fef3c7;
    border-radius: 4px;
    display: inline-block;
}

/* Loading State */
.ir-amenity-map-container.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
}

.ir-amenity-map-container.loading::after {
    content: "Loading map...";
    color: #6b7280;
    font-size: 14px;
}

/* Toggle Button for Mobile */
.ir-map-controls-toggle {
    display: none;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    margin: 10px;
    padding: 8px 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    color: #1f2937;
    border: none;
    transition: all 0.2s;
}

.ir-map-controls-toggle:hover {
    background-color: #f3f4f6;
}

.ir-map-controls-toggle:active {
    transform: scale(0.95);
}

/* Collapsed state */
.ir-map-controls.collapsed {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ir-amenity-map-container {
        height: 300px;
    }

    /* Show toggle button on mobile */
    .ir-map-controls-toggle {
        display: flex;
        align-items: center;
        gap: 8px;
        max-width: fit-content;
        padding: 10px 16px;
        font-size: 13px;
    }

    /* Make controls more compact and subtle */
    .ir-map-controls {
        max-width: 160px;
        font-size: 11px;
        margin: 5px;
        padding: 8px 10px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(8px);
    }

    .ir-map-controls .control-header {
        margin-bottom: 8px;
        padding-bottom: 6px;
    }

    .ir-map-controls .control-header strong {
        font-size: 12px;
    }

    .ir-map-controls .control-list {
        gap: 4px;
    }

    .ir-map-controls .control-item {
        padding: 4px 6px;
    }

    .ir-map-controls .control-icon {
        font-size: 14px;
        width: 18px;
    }

    .ir-map-controls .control-label {
        font-size: 10px;
    }

    .ir-map-controls .amenity-toggle {
        width: 14px;
        height: 14px;
    }

    /* Start collapsed on mobile */
    .ir-map-controls {
        display: none;
    }
}

@media (max-width: 480px) {
    .ir-amenity-map-container {
        height: 200px;
        border-radius: 4px;
    }

    .ir-map-controls-toggle {
        margin: 5px;
        padding: 10px 14px;
        font-size: 12px;
    }

    .ir-map-controls {
        max-width: 140px;
        margin: 5px;
        padding: 6px 8px;
    }

    .ir-map-controls .control-header strong {
        font-size: 11px;
    }

    .ir-map-controls .control-icon {
        font-size: 13px;
        width: 16px;
    }

    .ir-map-controls .control-label {
        font-size: 9px;
    }
}

/* Google Maps Info Window Custom Styling */
.gm-style .gm-style-iw-c {
    border-radius: 8px !important;
    padding: 0 !important;
}

.gm-style .gm-style-iw-d {
    overflow: auto !important;
}

.gm-style .gm-style-iw-t::after {
    background: white;
}

/* Circle Radius Labels */
.radius-label {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #3498db;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 12px;
    color: #1f2937;
    font-weight: 600;
}
