/* osmstyles.css - Hybrid Mode (Desktop Embedded + Mobile Overlay) */

/* =============================================================================
   GRUNDLAGEN & RESET
============================================================================= */
/** {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #1a1a2e;
    color: #ffffff;
    min-height: 100vh;
}*/

/* =============================================================================
   HINTERGRUND-SEITE (Lorem Ipsum Inhalt)
============================================================================= */
.page-content {
    min-height: 100vh;
    padding-bottom: 100px;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    border-bottom: 1px solid rgba(233, 205, 117, 0.2);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    color: #e9cd75;
    font-size: 32px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
}

.logo-ai {
    color: #e9cd75;
}

.site-nav {
    display: flex;
    gap: 30px;
}

.site-nav a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.site-nav a:hover {
    background: rgba(233, 205, 117, 0.2);
    color: #e9cd75;
}

.main-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.hero {
    text-align: center;
    padding: 60px 20px;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 42px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero .highlight {
    color: #e9cd75;
}

.hero .subtitle {
    font-size: 18px;
    color: #a0a0a0;
    max-width: 700px;
    margin: 0 auto;
}

.content-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
}

.content-section h2 {
    color: #e9cd75;
    margin-top: 0;
    margin-bottom: 20px;
}

.content-section p {
    color: #c0c0c0;
    line-height: 1.8;
    margin-bottom: 15px;
}

.site-footer {
    text-align: center;
    padding: 30px;
    color: #666;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* =============================================================================
   DESKTOP: CHAT LAUNCHER BUTTON
============================================================================= */
.chat-launcher {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e9cd75 0%, #d4b960 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(233, 205, 117, 0.4);
    z-index: 1000000; /* Über dem Overlay */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chat-launcher:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(233, 205, 117, 0.6);
}

.chat-launcher i {
    font-size: 24px;
    color: #1a1a2e;
}

/* Launcher bleibt immer sichtbar - kein .hidden state mehr */

/* =============================================================================
   DESKTOP: CHAT OVERLAY CONTAINER
============================================================================= */

.chat-overlay {
    position: fixed;
   /* bottom: 20px;
    left: 50%;
    transform: translateX(-50%) scale(0.8) translateY(20px);*/
    width: 100%;
    max-width: 1500px;
    height: 700px;
    max-height: calc(100vh - 40px);
    background: #ffffff;
   /* border-radius: 16px;*/
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    
    
    opacity: 0;
    pointer-events: auto;
    transition: all 0.1s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.chat-overlay.visible {
   /* transform: translateX(-50%) scale(1) translateY(0);*/
    position: relative;
    opacity: 1;
    pointer-events: auto;
}


/*.chat-overlay {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) scale(0.8) translateY(20px);
    width: 80%;
    max-width: 1400px;
    height: 700px;
    max-height: calc(100vh - 40px);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    
    
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.chat-overlay.visible {
    transform: translateX(-50%) scale(1) translateY(0);
    opacity: 1;
    pointer-events: auto;
}
*/
/* Karte hat feste Breite, Chat nimmt den Rest */
.chat-overlay.with-map {
    /* Breite bleibt 80% - Karte ist fix, Chat flexibel */
}

/* =============================================================================
   DESKTOP: OVERLAY HEADER
============================================================================= */
.chat-overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #e9cd75 0%, #d4b960 100%);
    color: #1a1a2e;
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-icon {
	width: 32px;
	height: 32px;
	background: rgba(255, 255, 255, 1);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.header-icon i {
    font-size: 16px;
    color: #1a1a2e;
}

.header-title {
    font-size: 16px;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.header-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

.header-btn i {
    font-size: 14px;
    color: #1a1a2e;
}

/* =============================================================================
   DESKTOP: OVERLAY CONTENT (Karte + Chat nebeneinander)
============================================================================= */
/*.chat-overlay-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    gap: 8px; 
    padding: 8px;
    background: #f0f0f0; 
}*/

.chat-overlay-content {
	display: flex;
	flex: 1;
	overflow: hidden;
	gap: 0px; /* Abstand zwischen Karte und Chat */
	padding: 0;
	background: #ffffff; /* Hintergrund für den Gap sichtbar machen */
	border-radius: 0;
}

/* =============================================================================
   DESKTOP: KARTEN-BEREICH (links)
============================================================================= */
.map-section {
    width: 0;
    height: 100%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    flex-shrink: 0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.map-section.visible {
    width: 400px;
}

.map-section.minimized {
    /* Minimiert: nur Handle sichtbar */
}

.map-container {
    flex: 1;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
}

/* Desktop Map Handle - VERSTECKT */
.map-handle {
    display: none; /* Auf Desktop ausblenden */
}

/* =============================================================================
   DESKTOP: VOICEFLOW CONTAINER (rechts)
============================================================================= */
.voiceflow-container {
    flex: 1;
    height: 100%;
    min-width: 0;
    position: relative;
    background: #ffffff;
    border-radius: 0px;
    overflow: hidden;
    /*box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);*/
}

/* Voiceflow Embedded Styles anpassen */
.voiceflow-container #voiceflow-chat {
    width: 100% !important;
    height: 100% !important;
}

/* =============================================================================
   MOBILE: Verstecke Desktop-Elemente
============================================================================= */
@media (max-width: 767px) {
    .chat-overlay {
        display: none !important;
    }
    
    .chat-launcher {
        display: none !important;
    }
    
    /* Mobile Header anpassen */
    .site-header {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }
    
    .site-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .hero .subtitle {
        font-size: 16px;
    }
}

.vfrc-widget {
	position: fixed;
	top: 15px !important;
	right: 15px !important;
	bottom: 15px !important;
	left: 15px !important;
	pointer-events: none;
	z-index: 10000;
	border-radius: 15px !important;
	overflow: hidden !important;
}

/* =============================================================================
   MOBILE: KARTEN-OVERLAY (wie bisher)
============================================================================= */
.mobile-map-wrapper {
    display: none; /* Wird per JS aktiviert auf Mobile */
}

@media (max-width: 767px) {
    .mobile-map-wrapper {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 45vh;
        background: white;
        z-index: 999999;
        border-radius: 0 0 15px 15px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        transform: translateY(-100%);
        transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
        opacity: 0;
    }

    .mobile-map-wrapper.visible {
        transform: translateY(0);
        opacity: 1;
    }

    .mobile-map-wrapper.minimized {
        transform: translateY(calc(-100% + 40px));
        opacity: 1;
    }

    .mobile-map {
        height: calc(100% - 40px);
        width: 100%;
        border-radius: 0 0 0 0;
    }

    .mobile-map-handle {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 40px;
        background: #f8f9fa;
        border-radius: 0 0 15px 15px;
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        border-top: 1px solid #e9ecef;
        color: #868e96;
        font-size: 14px;
        font-weight: 500;
        transition: background 0.2s ease;
    }

    .mobile-map-handle:hover {
        background: #e9ecef;
    }

    .mobile-map-handle i {
        margin-right: 8px;
        font-size: 16px;
    }
}

/* Desktop: Mobile Map verstecken */
@media (min-width: 768px) {
    .mobile-map-wrapper {
        display: none !important;
    }
}

/* =============================================================================
   MARKER-STYLES
============================================================================= */

/* Custom Logo Icons */
.company-logo-icon {
    border-radius: 4px;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    background: white;
}

/* Text-Marker */
.text-marker-wrapper {
    background: transparent !important;
    border: none !important;
}

.text-marker {
    background: #e9cd75;
    border: 2px solid #d4b960;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #000000;
    white-space: nowrap;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.text-marker:hover {
    background: #f5d885;
    color: #000000;
    transform: scale(1.05);
}

/* =============================================================================
   MARKER CLUSTER STYLING
============================================================================= */

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    background-color: rgba(233, 205, 117, 0.6) !important;
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
    background-color: #e9cd75 !important;
    color: #000000 !important;
    font-weight: bold;
}

.marker-cluster:hover {
    opacity: 0.9;
}

/* =============================================================================
   SPIDERFY STYLING
============================================================================= */

.leaflet-cluster-spider-leg {
    stroke: #e9cd75 !important;
    stroke-width: 2px !important;
    stroke-opacity: 0.6 !important;
}

.leaflet-cluster-spider-leg:hover {
    stroke-opacity: 0.9 !important;
}

/* =============================================================================
   VOICEFLOW WIDGET (Mobile - Overlay Mode)
============================================================================= */
@media (max-width: 767px) {
    #voiceflow-chat {
        z-index: 999990 !important;
    }
}

/* =============================================================================
   LEAFLET FIXES
============================================================================= */
.leaflet-container {
    font-family: inherit;
}

.leaflet-control-attribution {
    font-size: 10px;
}

/* =============================================================================
   SCROLLBAR STYLING
============================================================================= */
.chat-overlay ::-webkit-scrollbar {
    width: 6px;
}

.chat-overlay ::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-overlay ::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.chat-overlay ::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* =============================================================================
   RESPONSIVE ANPASSUNGEN
============================================================================= */
@media (max-width: 1200px) and (min-width: 768px) {
    /* Tablet/kleinere Desktops */
    .chat-overlay {
        width: 100%;
        height: 600px;
    }
    
    .map-section.visible {
        width: 350px;
    }
}

@media (max-height: 750px) and (min-width: 768px) {
    /* Niedrige Bildschirme */
    .chat-overlay {
        height: calc(100vh - 40px);
        bottom: 20px;
    }
}