/**
 * Seabim Immobilien - Map Styling
 * Styles für die Google Maps Übersichtskarte
 */

/* ===== ALLGEMEINE STYLES ===== */


.map {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* ===== HEADER ===== */
.map header {
  /*  background: linear-gradient(135deg, #0b89df 0%, #0967cd 100%);*/
    color: white;
 /*   padding: 20px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);*/
}

.map header h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
}

.map .info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.map .house-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* ===== KARTEN-CONTAINER ===== */
.map .map-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%;
}

/* ===== LOADING-OVERLAY ===== */
.map .loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.map .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.map .loading p {
    margin-top: 20px;
    font-size: 16px;
    color: #666;
}

/* ===== INFO-WINDOW (POPUP) ===== */
.map .info-window {
    width: 250px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.map .info-image {
    width: 100%;
    height: 150px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    background-color: #f0f0f0;
}

.map .info-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.map .info-content {
    padding: 15px;
}

.map .info-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.3;
}

.map .info-content .interne-nummer {
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 10px;
    font-weight: 500;
}

.map .info-content p {
    font-size: 13px;
    color: #555;
    margin: 6px 0;
    line-height: 1.4;
}

.map .info-content p strong {
    color: #2c3e50;
    font-weight: 600;
}

.map .info-content .adresse {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #7f8c8d;
}

/* Google Maps Info-Window Override */
.map .gm-style .gm-style-iw-c {
    padding: 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
}

.map .gm-style .gm-style-iw-d {
    overflow: auto !important;
    max-height: 400px !important;
}

.map .gm-style-iw-t::after {
    background: linear-gradient(45deg, white 50%, transparent 51%, transparent) !important;
}

/* Close-Button des Info-Windows */
.map .gm-ui-hover-effect {
    opacity: 0.7 !important;
    top: 8px !important;
    right: 8px !important;
}

.map .gm-ui-hover-effect:hover {
    opacity: 1 !important;
}

/* ===== FOOTER ===== */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 15px;
    font-size: 14px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media screen and (max-width: 768px) {
    .map header h1 {
        font-size: 22px;
    }
    
    .map .info-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .map .info-window {
        width: 220px;
    }
    
    .map .info-image {
        height: 130px;
    }
    
    .map .info-content h3 {
        font-size: 16px;
    }
}

@media screen and (max-width: 480px) {
    .map header {
        padding: 15px 20px;
    }
    
    .map header h1 {
        font-size: 18px;
    }
    
    .map .house-count {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .map .info-window {
        width: 200px;
    }
    
    .map .info-image {
        height: 120px;
    }
    
    .map .info-content {
        padding: 12px;
    }
    
    .map .info-content h3 {
        font-size: 15px;
    }
    
    .map .info-content p {
        font-size: 12px;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.map .info-window {
    animation: fadeIn 0.3s ease-out;
}
