/**
 * Google Map Widget Styles
 * 
 * CSS styles for the Google Map widget
 * Preserves original template design while adding Elementor customization
 * 
 * @package YogaElementorWidgets
 * @since 1.0.0
 */

/* Google Map Section Styles */
.google-map {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.google-map .container-fluid {
    padding: 0;
}

.google-map .row {
    margin: 0;
}

.google-map .col-lg-12 {
    padding: 0;
}

/* Google Map IFrame Styles */
.google-map-iframe {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.google-map-iframe iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    position: relative;
    z-index: 1;
}

/* Map Placeholder for Editor */
.yoga-map-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    color: #6c757d;
    text-align: center;
    padding: 20px;
}

.yoga-map-placeholder i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #adb5bd;
}

.yoga-map-placeholder p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

/* Map Error State */
.yoga-map-error {
    padding: 20px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .google-map-iframe {
        height: 300px;
    }
    
    .yoga-map-placeholder {
        height: 300px;
    }
    
    .yoga-map-placeholder i {
        font-size: 36px;
    }
    
    .yoga-map-placeholder p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .google-map-iframe {
        height: 250px;
    }
    
    .yoga-map-placeholder {
        height: 250px;
    }
    
    .yoga-map-placeholder i {
        font-size: 32px;
    }
    
    .yoga-map-placeholder p {
        font-size: 13px;
    }
}

/* Elementor Editor Styles */
.elementor-editor .google-map-iframe iframe {
    pointer-events: none;
}

.elementor-editor .yoga-map-placeholder {
    background: #e9ecef;
    border-color: #ced4da;
}

/* Accessibility Improvements */
.google-map-iframe iframe:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Loading State */
.google-map-iframe iframe[loading="lazy"] {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.google-map-iframe iframe[loading="lazy"].loaded {
    opacity: 1;
}

/* Error and Placeholder Styles */
.yoga-map-error {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.yoga-map-error h4 {
    color: #856404;
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
}

.yoga-map-error p {
    color: #856404;
    margin: 0 0 15px 0;
    font-size: 14px;
    line-height: 1.5;
}

.yoga-map-error ol {
    text-align: left;
    display: inline-block;
    margin: 0 0 15px 0;
    color: #856404;
}

.yoga-map-error li {
    margin: 5px 0;
    font-size: 14px;
}

.yoga-map-error strong {
    font-weight: 600;
}

.yoga-map-placeholder {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 40px 20px;
    margin: 20px 0;
    text-align: center;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-placeholder-content h4 {
    color: #6c757d;
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
}

.map-placeholder-content p {
    color: #6c757d;
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .yoga-map-error {
        padding: 15px;
        margin: 15px 0;
    }
    
    .yoga-map-error h4 {
        font-size: 16px;
    }
    
    .yoga-map-error p,
    .yoga-map-error li {
        font-size: 13px;
    }
    
    .yoga-map-placeholder {
        padding: 30px 15px;
        min-height: 150px;
    }
    
    .map-placeholder-content h4 {
        font-size: 16px;
    }
    
    .map-placeholder-content p {
        font-size: 13px;
    }
}

/* Custom Map Controls */
.google-map-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: flex;
    gap: 5px;
}

.google-map-controls button {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.google-map-controls button:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Map Overlay Styles */
.google-map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.google-map:hover .google-map-overlay {
    opacity: 1;
}

/* Print Styles */
@media print {
    .google-map-iframe iframe {
        height: 300px !important;
    }
    
    .google-map-controls {
        display: none;
    }
}
