/* Map Container */
.wmp-map-container {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

#wmp-map {
    width: 100%;
    height: 600px;
    background-color: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
}

/* Loading Spinner */
.wmp-loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Custom Map Controls */
.custom-map-control-button {
    background-color: #fff;
    border: 0;
    border-radius: 2px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    margin: 10px;
    padding: 8px 16px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.custom-map-control-button:hover {
    background-color: #f4f4f4;
}

/* Info Windows */
.wmp-info-window {
    padding: 15px;
    max-width: 300px;
}

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

.wmp-info-window .address {
    margin-bottom: 15px;
    color: #666;
}

.wmp-info-window .contact-info {
    margin-bottom: 15px;
}

.wmp-info-window .contact-info p {
    margin: 5px 0;
}

.wmp-info-window .contact-info a {
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wmp-info-window .contact-info a:hover {
    color: #007bff;
}

.wmp-info-window .social-media {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.wmp-info-window .social-icon {
    color: #333;
    text-decoration: none;
    font-size: 20px;
}

.wmp-info-window .social-icon:hover {
    color: #007bff;
}

.wmp-info-window .additional-info {
    border-top: 1px solid #eee;
    padding-top: 10px;
    color: #666;
}

.wmp-info-window p {
    margin: 5px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

/* Error Messages */
.wmp-error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

/* Debug Information */
.wmp-debug-info {
    margin-top: 20px;
    padding: 15px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.wmp-debug-info pre {
    margin: 0;
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 12px;
}

/* Location Submission Form */
.wmp-location-form-container {
    max-width: 800px;
    margin: 2em auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wmp-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wmp-form-row {
    margin-bottom: 10px;
}

.wmp-form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.wmp-form-row input[type="text"],
.wmp-form-row textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.wmp-form-row input[type="text"]:focus,
.wmp-form-row textarea:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

.wmp-map-container {
    margin: 15px 0;
}

#location-preview-map {
    width: 100%;
    height: 400px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.wmp-form-message {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.wmp-form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.wmp-form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.description {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

/* Google Places Autocomplete customization */
.pac-container {
    border-radius: 4px;
    margin-top: 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
}

.pac-item {
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
}

.pac-item:hover {
    background-color: #f8f9fa;
}

.pac-item-selected {
    background-color: #e9ecef;
}

/* Map Display Styles */
.wmp-map-display-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

#wmp-main-map {
    width: 100%;
    height: 600px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.wmp-location-info {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wmp-location-form-container {
        margin: 1em;
        padding: 15px;
    }

    #location-preview-map {
        height: 300px;
    }
}

/* Responsive Design */
@media screen and (max-width: 782px) {
    #wmp-map {
        height: 400px;
    }

    .custom-map-control-button {
        padding: 10px 16px;
        font-size: 16px;
    }

    .wmp-info-window {
        max-width: 250px;
    }
}

@media screen and (max-width: 480px) {
    #wmp-map {
        height: 300px;
    }

    .wmp-info-window {
        max-width: 200px;
    }
}

@media (max-width: 768px) {
    .wmp-map-display-container {
        padding: 10px;
    }

    #wmp-main-map {
        height: 400px;
    }

    .wmp-info-window {
        max-width: 250px;
    }
}

/* Admin styles */
.wmp-location-meta-box {
    padding: 12px;
}

.wmp-field-row {
    margin-bottom: 15px;
}

.wmp-field-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.wmp-field-row .description {
    display: block;
    color: #666;
    font-size: 12px;
    font-weight: normal;
    margin-top: 2px;
}

.wmp-field-row input[type="text"],
.wmp-field-row input[type="tel"],
.wmp-field-row input[type="email"],
.wmp-field-row input[type="url"],
.wmp-field-row textarea,
.wmp-field-row select {
    width: 100%;
    max-width: 400px;
}

.wmp-field-row textarea {
    min-height: 100px;
}

h3 {
    margin: 1em 0 0.5em;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}