/**
 * @package     Acme.Component.ReAddress
 * @subpackage  Site
 *
 * @copyright   (C) 2025 Acme. All rights reserved.
 * @license     GNU General Public License version 2 or later
 */

/* Main map container */
.readdress-map {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Radius search card */
.readdress-radius-search {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.readdress-radius-search .card-title {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #495057;
}

/* Sorting controls */
.readdress-sorting {
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    border-radius: 4px;
}

/* Standard Template - Default List Styles */
.readdress-list.template-standard .address-item {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.readdress-list.template-standard .address-content {
    flex: 1;
    min-width: 0;
}

.readdress-list.template-standard .address-title {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.readdress-list.template-standard .address-title a {
    color: #0066cc;
    text-decoration: none;
}

.readdress-list.template-standard .address-title a:hover {
    color: #004080;
    text-decoration: underline;
}

.readdress-list.template-standard .address-address {
    color: #666;
    font-size: 0.95em;
    margin-bottom: 10px;
}

.readdress-list.template-standard .address-description {
    color: #555;
    line-height: 1.5;
    margin-top: 10px;
}

.readdress-list.template-standard .address-actions {
    flex-shrink: 0;
}

/* Focus marker button */
.focus-marker {
    padding: 0.25rem 0.5rem;
}

.focus-marker:hover {
    background-color: #0d6efd;
    color: white;
}

/* Popup styles */
.address-popup {
    min-width: 200px;
    max-width: 300px;
}

.address-popup h5 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #212529;
    font-weight: 600;
}

.address-popup .address {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.address-popup .description {
    font-size: 0.875rem;
    color: #495057;
    border-top: 1px solid #dee2e6;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

.address-popup .popup-link a {
    color: #fff !important;
    text-decoration: none;
}

.address-popup .popup-link a:hover {
    color: #fff !important;
    text-decoration: none;
    opacity: 0.9;
}

/* Leaflet popup customization */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
}

.leaflet-popup-content {
    margin: 12px 16px;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .readdress-map {
        height: 300px !important;
    }

    .readdress-radius-search .row {
        gap: 0.5rem;
    }

    .readdress-radius-search .col-md-5,
    .readdress-radius-search .col-md-3,
    .readdress-radius-search .col-md-2 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .readdress-sorting .row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .readdress-sorting .col-auto {
        width: 100%;
    }

    .readdress-sorting select {
        width: 100%;
    }
}

/* No items message */
.com-readdress .alert-info {
    text-align: center;
    padding: 2rem;
}

/* Pagination */
.com-readdress .pagination {
    margin-top: 1.5rem;
    justify-content: center;
}

/* Loading state */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-overlay::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #dee2e6;
    border-top-color: #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* SVG Marker Icon Colors */
:root {
    --marker-red: #e74c3c;
    --marker-blue: #3498db;
    --marker-green: #27ae60;
    --marker-yellow: #f1c40f;
    --marker-orange: #e67e22;
    --marker-parking: #9b59b6;
}

/* Marker icon base styles */
.readdress-marker {
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.3));
}

.readdress-marker.marker-red { color: var(--marker-red); }
.readdress-marker.marker-blue { color: var(--marker-blue); }
.readdress-marker.marker-green { color: var(--marker-green); }
.readdress-marker.marker-yellow { color: var(--marker-yellow); }
.readdress-marker.marker-orange { color: var(--marker-orange); }
.readdress-marker.parking { color: var(--marker-parking); }

/* Detailseite Styles */
.com-readdress-parkplatz {
    max-width: 900px;
    margin: 0 auto;
}

.address-detail-header {
    margin-bottom: 2rem;
}

.address-detail-header h1 {
    margin-bottom: 0.5rem;
}

.address-detail-address {
    color: #6c757d;
    font-size: 1.1rem;
}

.address-detail-map {
    height: 350px;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid #dee2e6;
}

.address-detail-content {
    line-height: 1.7;
}

.address-back-link {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}
