/* Styles für die interaktive Moscheen-Karte */
.map-main {
    display: flex;
    min-height: 600px;
    border-radius: 28px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.sidebar {
    width: 360px;
    min-width: 320px;
    max-width: 400px;
    overflow-y: auto;
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
}

.mosque-card {
    padding: 16px;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    margin-bottom: 8px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.mosque-card:hover, .mosque-card.active {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    transform: translateX(4px);
}

.mosque-card h3 {
    font-size: 1rem;
    color: #1a237e;
    margin-bottom: 6px;
    font-weight: 600;
}

.mosque-card .location {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 8px;
}

.mosque-card .distance {
    font-size: 0.8rem;
    color: #2196f3;
    font-weight: bold;
    float: right;
    background: #e3f2fd;
    padding: 2px 8px;
    border-radius: 12px;
}

.mosque-card .language {
    display: inline-block;
    background: #4caf50;
    color: white;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    margin-top: 6px;
    font-weight: 500;
}

#map {
    flex: 1;
    position: relative;
    min-height: 320px;
}

.map-top-card #map {
    height: clamp(320px, 52vh, 560px);
    min-height: 320px;
}

.map-top-card {
    position: relative;
    z-index: 1;
}

.mobile-list-wrap .sidebar {
    width: 100%;
    min-width: 0;
    max-width: none;
    border-right: 0;
    background: #fff;
}

.ol-popup {
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 280px;
    font-size: 0.9rem;
    max-width: 320px;
    z-index: 1000;
}

.ol-popup h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    color: #1a237e;
    font-weight: 600;
}

.ol-popup a {
    color: #2196f3;
    text-decoration: none;
    font-weight: 500;
    pointer-events: auto;
    touch-action: manipulation;
}

.popup-detail-link {
    position: relative;
    z-index: 2;
}

.ol-popup .features {
    margin: 10px 0;
    padding: 8px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.mosque-card .card-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.mosque-card .card-phone {
    font-size: 0.82rem;
    color: #475569;
    margin: 4px 0;
}

.mosque-card .card-phone a {
    color: #0284c7;
    text-decoration: none;
}

.mosque-card .card-phone a:hover {
    text-decoration: underline;
}

.mosque-card .card-actions {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}

.mosque-card .card-detail-link {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #0284c7;
    text-decoration: none;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid #bae6fd;
    background: #f0f9ff;
    transition: background 0.15s, border-color 0.15s;
}

.mosque-card .card-detail-link:hover {
    background: #e0f2fe;
    border-color: #7dd3fc;
}

.mosque-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 0 16px 18px;
    background: #fff;
}

.pagination-btn {
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.pagination-btn:hover:not(:disabled) {
    background: #e0f2fe;
    border-color: #7dd3fc;
}

.pagination-btn.active {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
}

.pagination-btn:disabled {
    opacity: 0.45;
    cursor: default;
}


.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

@media (max-width: 768px) {
    .map-main {
        flex-direction: column;
        min-height: 0;
    }
    .sidebar {
        order: 2;
        width: 100%;
        min-width: 0;
        max-width: none;
        height: auto;
        max-height: none;
        border-right: 0;
        border-top: 1px solid #e9ecef;
    }
    .toolbar-item-full {
        width: 100%;
    }
    .toolbar-item-auto {
        width: calc(50% - 6px);
    }
    #map {
        order: 1;
        width: 100%;
        height: clamp(320px, 50vh, 520px);
        min-height: 320px;
    }
}

@media (max-width: 480px) {
    .toolbar-item-auto {
        width: 100%;
    }
}
