/**
 * Careiwo Radius Search Styles
 */

.careiwo-radius-search-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    font-family: Arial, sans-serif;
}

.careiwo-radius-search-form {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.careiwo-radius-search-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.careiwo-radius-search-form input[type="text"],
.careiwo-radius-search-form select {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.search-button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.search-button:hover {
    background-color: #45a049;
}

/* Karten- und Ergebnisbereich */
#careiwo-map-container {
    height: 500px;
    width: 100%;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.loading-spinner {
    display: none;
    text-align: center;
    margin: 20px 0;
}

.results-container {
    width: 100%;
    overflow-x: auto;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 13px;
}

.results-table th {
    background-color: #f2f2f2;
    padding: 8px;
    text-align: left;
    border: 1px solid #ddd;
    font-size: 14px;
}

.results-table td {
    padding: 6px 8px;
    border: 1px solid #ddd;
}

.results-table tr:hover {
    background-color: #e9f7e9;
}

.action-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.action-buttons button {
    padding: 4px 8px;
    font-size: 12px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    white-space: nowrap;
}

.btn-show-on-map {
    background-color: #4CAF50;
    color: white;
}

.btn-call {
    background-color: #2196F3;
    color: white;
}

.btn-email {
    background-color: #ff9800;
    color: white;
}

.btn-vehicles {
    background-color: #673ab7;
    color: white;
}

.results-count {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 18px;
}

.dealer-item {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #4CAF50;
    transition: all 0.3s ease;
}

.dealer-item:hover, .dealer-item.active {
    background-color: #e9f7e9;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: pointer;
}

.dealer-item h3 {
    margin-top: 0;
    color: #333;
}

.dealer-address, .dealer-phone, .dealer-email, .dealer-website, .dealer-distance {
    margin: 5px 0;
}

.no-results {
    padding: 15px;
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    margin-bottom: 20px;
}

/* Leaflet-spezifische Anpassungen */
.leaflet-popup-content {
    min-width: 200px;
}

.map-info-window h4 {
    margin: 0 0 10px 0;
    color: #333;
}

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

/* Responsive Design */
@media (min-width: 768px) {
    #careiwo-map-container {
        height: 500px;
    }
}

@media (max-width: 767px) {
    #careiwo-map-container {
        margin-bottom: 20px;
    }
}

/* Kartenanzeige Styles */
.map-container {
    height: 400px;
    width: 100%;
    margin-bottom: 20px;
    border-radius: 5px;
    border: 1px solid #ddd;
    overflow: hidden;
}

.loading-spinner {
    text-align: center;
    padding: 20px;
}

.loading-spinner:after {
    content: "";
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.results-container {
    margin-top: 20px;
}

.dealer-item {
    padding: 15px;
    margin-bottom: 15px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: background-color 0.3s;
}

.dealer-item:hover, .dealer-item.active {
    background-color: #f0f7ff;
}

.map-info-window, .marker-popup {
    max-width: 300px;
    padding: 10px;
}

.map-info-window h4, .marker-popup h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
}

/* Styling für Marker-Aktionsbuttons */
.marker-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.marker-action-btn {
    display: inline-block;
    padding: 5px 10px;
    background-color: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    font-size: 12px;
    text-align: center;
    flex: 1 0 auto;
    min-width: 70px;
    transition: background-color 0.3s;
}

.marker-action-btn:hover {
    background-color: #005177;
    color: white;
}

.marker-action-call {
    background-color: #4CAF50;
}

.marker-action-call:hover {
    background-color: #388E3C;
}

.marker-action-email {
    background-color: #2196F3;
}

.marker-action-email:hover {
    background-color: #1565C0;
}

.marker-action-website {
    background-color: #FF9800;
}

.marker-action-website:hover {
    background-color: #EF6C00;
}

.marker-action-route {
    background-color: #9C27B0;
}

.marker-action-route:hover {
    background-color: #7B1FA2;
}

.results-count {
    margin-bottom: 15px;
    font-weight: bold;
    font-size: 16px;
}

.careiwo-radius-search-results {
    margin-top: 20px;
}

.careiwo-radius-search-results .no-results {
    padding: 15px;
    background-color: #f2f2f2;
    border-left: 4px solid #ddd;
    margin-bottom: 20px;
}

.dealer-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.dealer-item:last-child {
    border-bottom: none;
}

.dealer-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.dealer-address {
    margin-bottom: 5px;
    color: #555;
}

.dealer-distance {
    color: #0073aa;
    font-weight: bold;
}

.dealer-contact {
    margin-top: 10px;
}

.dealer-contact a {
    color: #0073aa;
    text-decoration: none;
}

.dealer-contact a:hover {
    text-decoration: underline;
}