/* Custom Map Display Plugin Styles */

/* Map container base styles */
.am-map-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #f9f9f9;
}

/* Loading states */
.am-map-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #666;
}

/* Loading spinner animation */
@keyframes am-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.am-loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #ddd;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: am-spin 1s linear infinite;
    margin-right: 10px;
}

/* Error states */
.am-map-error {
    padding: 20px;
    text-align: center;
    background: #fff;
    border: 1px solid #e57373;
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    box-shadow: 0 2px 4px rgba(229, 115, 115, 0.1);
}

.am-map-error-icon {
    font-size: 24px;
    margin-bottom: 10px;
    color: #d32f2f;
}

.am-map-error-message {
    color: #d32f2f;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.4;
}

/* Retry button styles */
.am-retry-button {
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.am-retry-button:hover {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 124, 186, 0.3);
}

.am-retry-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 124, 186, 0.2);
}

/* Success states */
.am-map-success {
    border: 1px solid #4caf50;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.1);
}

/* Responsive design */
@media (max-width: 768px) {
    .am-map-container {
        margin: 10px 0;
    }
    
    .am-map-error {
        padding: 15px;
        font-size: 13px;
    }
    
    .am-retry-button {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Accessibility improvements */
.am-retry-button:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .am-map-error {
        border-width: 2px;
    }
    
    .am-retry-button {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .am-loading-spinner {
        animation: none;
    }
    
    .am-retry-button {
        transition: none;
    }
}

/* Print styles */
@media print {
    .am-retry-button {
        display: none;
    }
    
    .am-map-error::after {
        content: " (Map unavailable in print mode)";
        font-style: italic;
    }
}