/* VisaVerde Maps Plugin Styles */

.visaverde-property-map,
.visaverde-contact-map {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.visaverde-contact-map-container {
    margin-bottom: 20px;
}

.visaverde-properties-map-container {
    margin-bottom: 20px;
}

.map-directions-controls {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.directions-input {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.directions-input input[type="text"] {
    flex: 1;
    min-width: 250px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.directions-input input[type="text"]:focus {
    outline: none;
    border-color: #0D6429;
    box-shadow: 0 0 0 2px rgba(13, 100, 41, 0.1);
}

.directions-input .button {
    white-space: nowrap;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 14px;
}

.directions-input .button-primary {
    background-color: #0D6429;
    border-color: #0D6429;
}

.directions-input .button-primary:hover {
    background-color: #0a5423;
    border-color: #0a5423;
}

#directions-panel {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
    margin-top: 15px;
}

#directions-panel .adp-summary {
    font-weight: bold;
    margin-bottom: 10px;
    color: #0D6429;
}

#directions-panel .adp-step {
    margin-bottom: 8px;
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
}

#directions-panel .adp-step:last-child {
    border-bottom: none;
}

.properties-map-legend {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
}

.properties-map-legend h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.properties-map-legend .legend-items {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.properties-map-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.properties-map-legend .legend-icon {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.properties-map-legend .area-icon {
    background: #0D6429;
    border-radius: 50%;
    opacity: 0.3;
}

.properties-map-legend .exact-icon {
    background: #0D6429;
    border-radius: 2px;
}

.business-info-window {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.4;
}

.business-info-window h3 {
    color: #0D6429;
    margin: 0 0 10px 0;
    font-size: 18px;
}

.business-info-window p {
    margin: 0 0 10px 0;
    color: #333;
}

.business-info-window a {
    color: #0D6429;
    text-decoration: none;
}

.business-info-window a:hover {
    text-decoration: underline;
}

/* Property listing map info windows */
.gm-style-iw {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

.gm-style-iw h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.gm-style-iw h4 a {
    color: #0D6429;
    text-decoration: none;
}

.gm-style-iw h4 a:hover {
    text-decoration: underline;
}

.gm-style-iw img {
    border-radius: 4px;
}

/* Responsive design */
@media (max-width: 768px) {
    .directions-input {
        flex-direction: column;
        align-items: stretch;
    }

    .directions-input input[type="text"] {
        min-width: 100%;
        margin-bottom: 10px;
    }

    .directions-input .button {
        width: 100%;
        margin-bottom: 5px;
    }

    .properties-map-legend .legend-items {
        flex-direction: column;
        gap: 10px;
    }

    .visaverde-property-map,
    .visaverde-contact-map {
        height: 250px !important;
    }
}

/* Loading states */
.visaverde-map-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #f9f9f9;
    color: #666;
    font-size: 14px;
}

.visaverde-map-loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top: 2px solid #0D6429;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Admin styles */
.property-location-fields {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    margin: 10px 0;
}

.property-location-fields .description {
    background: #e7f3ff;
    padding: 10px;
    border-radius: 4px;
    border-left: 4px solid #0D6429;
    margin-bottom: 20px;
}

.map-controls {
    margin: 15px 0;
}

.map-controls .button {
    margin-right: 10px;
}

#property-location-map-container {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

/* Error states */
.visaverde-map-error {
    padding: 20px;
    text-align: center;
    background: #f9f2f4;
    border: 1px solid #d63638;
    border-radius: 4px;
    color: #d63638;
}

.visaverde-map-error a {
    color: #d63638;
    text-decoration: underline;
}