/**
 * CSS für DSGVO-konforme Google Maps Integration
 */

.map-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* Fallback für aspect-ratio 1:1 */
    aspect-ratio: 1/1; /* 1:1 quadratisches Format */
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

/* Unterstützung für aspect-ratio */
@supports (aspect-ratio: 1) {
    .map-container {
        height: auto;
        padding-bottom: 0;
    }
}

/* Placeholder Container vor JavaScript-Initialisierung */
.map-container-placeholder {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* 1:1 Ratio */
    aspect-ratio: 1/1;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    background-color: #f8f9fa;
}

.map-placeholder {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(3px);
    transition: filter 0.3s ease;
}

.map-placeholder.berlin {
    background-image: url('/images/company/map-placeholder-berlin.webp');
}

.map-placeholder.wiesbaden {
    background-image: url('/images/company/map-placeholder-wiesbaden.webp');
}

.map-gdpr-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
    z-index: 10;
}

.map-gdpr-content {
    background: white;
    padding: 25px;
    border-radius: 12px;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.map-gdpr-text {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    margin-bottom: 20px;
}

.map-consent-btn {
    background: rgba(var(--main-color), 1.0);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.map-consent-btn:hover {
    background: rgba(var(--main-color), 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--main-color), 0.3);
}

.map-consent-btn:active {
    transform: translateY(0);
}

.google-map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
    z-index: 1;
}

/* Responsive Design */
@media (max-width: 768px) {  
    .map-gdpr-content {
        padding: 20px;
        margin: 15px;
    }
    
    .map-gdpr-text {
        font-size: 13px;
    }
    
    .map-consent-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

@media (max-width: 576px) {    
    .map-gdpr-content {
        padding: 15px;
        margin: 10px;
    }
}

/* Animation für das Laden der Karte */
.map-loading {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.map-loaded {
    opacity: 1;
}

/* Styling für Info Windows */
.gm-style .gm-style-iw-c {
    border-radius: 8px;
}

.gm-style .gm-style-iw-d {
    overflow: hidden !important;
}

/* Cookie-Hinweis Link */
.privacy-link {
    color: rgba(var(--main-color), 1.0);
    text-decoration: underline;
}

.privacy-link:hover {
    color: rgba(var(--main-color), 0.8);
}
