/**
 * Frontend Styles for Google Maps Block
 */

.cgmb-map-block {
    margin: 30px 0;
    width: 100%;
}

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

/* Info Window Customization */
.gm-style .gm-style-iw-c {
    border-radius: 12px !important;
    padding: 0 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
}

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

.gm-style .gm-style-iw-t::after {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
}

/* Close button styling */
.gm-style button[title="Close"] {
    top: 8px !important;
    right: 8px !important;
    width: 24px !important;
    height: 24px !important;
    opacity: 0.8 !important;
}

.gm-style button[title="Close"]:hover {
    opacity: 1 !important;
}

/* Custom Marker Styles */
.cgmb-custom-marker {
    cursor: pointer;
    transition: transform 0.2s;
}

.cgmb-custom-marker:hover {
    transform: scale(1.1);
}

/* Status Badge Styles */
.cgmb-status-for-sale {
    background: #d4edda;
    color: #155724;
}

.cgmb-status-sold-out {
    background: #f8d7da;
    color: #721c24;
}

.cgmb-status-coming-soon {
    background: #d1ecf1;
    color: #0c5460;
}

/* Map Controls */
.gm-style .gm-control-active {
    border-radius: 4px !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cgmb-map {
        border-radius: 8px;
    }
    
    .gm-style .gm-style-iw-c {
        max-width: 90vw !important;
    }
    
    .cgmb-map-block {
        margin: 20px 0;
    }
}

/* Fullscreen Mode */
.cgmb-map-block:-webkit-full-screen .cgmb-map {
    height: 100vh !important;
    border-radius: 0;
}

.cgmb-map-block:-moz-full-screen .cgmb-map {
    height: 100vh !important;
    border-radius: 0;
}

.cgmb-map-block:fullscreen .cgmb-map {
    height: 100vh !important;
    border-radius: 0;
}

/* Loading State */
.cgmb-map-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    color: #666;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
}

/* Accessibility */
.cgmb-map:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .cgmb-map {
        page-break-inside: avoid;
    }
    
    .cgmb-map-block {
        box-shadow: none;
    }
}

/* Dark Mode Support (if theme supports it) */
@media (prefers-color-scheme: dark) {
    .cgmb-map {
        box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
    }
}

/* Animation for map load */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cgmb-map-block {
    animation: fadeIn 0.3s ease-in;
}
