/**
 * Google Maps CSS for Advanced Store WooCommerce Plugin
 */

/* Map Container */
.woo-google-map-container {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* Error Messages */
.woo-google-map-error {
    padding: 20px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    margin: 20px 0;
}

/* Info Window Styling */
.woo-google-map-info {
    padding: 10px;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    max-width: 250px;
}

.woo-google-map-info strong {
    display: block;
    margin-bottom: 5px;
    color: #2c3e50;
}

/* Loading State */
.woo-google-map-container.loading {
    background: #f9f9f9 url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 50 50"><path fill="%23ccc" d="M25 5A20 20 0 1 0 25 45A20 20 0 1 0 25 5M25 10A15 15 0 1 1 25 40A15 15 0 1 1 25 10"/><path fill="%23666" d="M25 5A20 20 0 0 1 45 25H40A15 15 0 0 0 25 10V5Z"><animateTransform attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="1s" repeatCount="indefinite"/></path></svg>') center center no-repeat;
    min-height: 200px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .woo-google-map-container {
        margin: 15px 0;
        border-radius: 2px;
    }
    
    .woo-google-map-info {
        font-size: 13px;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .woo-google-map-container {
        margin: 10px 0;
        border-radius: 0;
    }
    
    .woo-google-map-info {
        font-size: 12px;
        max-width: 180px;
        padding: 8px;
    }
}

/* Admin Settings Styles */
.woo-advanced-store-google-maps-admin .form-table th {
    width: 200px;
}

.woo-advanced-store-google-maps-admin .regular-text {
    width: 400px;
}

.woo-advanced-store-google-maps-admin .description {
    margin-top: 5px;
    font-style: italic;
}

/* Media Uploader Styles */
.woo-google-maps-marker-upload {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.woo-google-maps-marker-upload .button {
    margin-right: 10px;
    margin-bottom: 10px;
}

#marker_icon_preview {
    margin-top: 10px;
}

#marker_icon_preview img {
    display: block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.woo-google-maps-marker-upload .description {
    margin-top: 10px;
    max-width: 500px;
}

/* Shortcode Examples */
.woo-google-maps-shortcode-examples {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin: 20px 0;
}

.woo-google-maps-shortcode-examples h4 {
    margin-top: 0;
    color: #333;
}

.woo-google-maps-shortcode-examples code {
    background: #fff;
    padding: 2px 6px;
    border: 1px solid #ccc;
    border-radius: 2px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

/* Google Maps Controls Styling */
.woo-google-map-container .gm-style-iw {
    border-radius: 4px;
}

.woo-google-map-container .gm-style-iw-d {
    overflow: hidden !important;
}

/* Custom Map Themes Support */
.woo-google-map-container.theme-dark {
    filter: invert(90%) hue-rotate(180deg);
}

.woo-google-map-container.theme-dark .gm-style-iw {
    filter: invert(90%) hue-rotate(180deg);
}