/* RepStay Styles */

/* Base */
body {
    font-family: 'Inter', sans-serif;
    overflow: hidden;
}

#map {
    height: 100vh;
    width: 100%;
    z-index: 0;
}

/* Scrollbar */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Marker Cluster */
.marker-cluster-small { background-color: rgba(181, 226, 140, 0.6); }
.marker-cluster-small div { background-color: rgba(110, 204, 57, 0.6); }
.marker-cluster-medium { background-color: rgba(241, 211, 87, 0.6); }
.marker-cluster-medium div { background-color: rgba(240, 194, 12, 0.6); }
.marker-cluster-large { background-color: rgba(253, 156, 115, 0.6); }
.marker-cluster-large div { background-color: rgba(241, 128, 23, 0.6); }

/* Custom Popup */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.leaflet-popup-content {
    margin: 0;
    width: 280px !important;
}

/* Map background */
.leaflet-container { background-color: #d5e8eb !important; }

/* Transitions */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}
.translate-x-full {
    transform: translateX(100%);
}
.-translate-x-full {
    transform: translateX(-100%);
}
.hidden {
    display: none;
}
.rotate-180 {
    transform: rotate(180deg);
}

/* Panel transitions */
#detailPanel {
    transition: transform 500ms ease-out;
}

/* Loading spinner */
.loader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Favorite heart animation */
.heart-active {
    color: #ef4444 !important;
}
.heart-active svg {
    fill: #ef4444 !important;
}

/* Rating colors */
.rating-green { color: #22c55e; }
.rating-yellow { color: #eab308; }
.rating-blue { color: #3b82f6; }

/* Impressum floating */
#impressum {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 11px;
    color: #6b7280;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

#impressum a {
    color: #3b82f6;
    text-decoration: none;
}

#impressum a:hover {
    text-decoration: underline;
}

/* Gallery horizontal scroll */
[id^="gallery-"] {
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}

[id^="gallery-"] > div > div {
    scroll-snap-align: start;
}

/* Lightbox styles */
#lightboxModal {
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#lightboxImage {
    transition: transform 200ms ease;
    touch-action: pan-y;
}
.lightbox-dragging #lightboxImage {
    transition: none !important;
}

/* Mobile adjustments (max-width: 768px) */
@media (max-width: 768px) {
    /* Restore splash centered on mobile */
    #splashOverlay {
        align-items: center;
        padding-bottom: 0;
    }
    #splashOverlay > .pointer-events-none {
        width: 100%;
        max-width: 2xl;
        margin: 0 auto;
    }
    #splashOverlay .pointer-events-auto {
        border-radius: 24px;
        padding: 1.5rem;
    }

    /* Move header search visually toward lower third on mobile without touching splash */
    #appHeader {
        /* keep header container positioning but allow its content box to appear lower */
    }
    #appHeader > div.bg-white\/90 {
        max-width: 100%;
        pointer-events: auto;
        border-radius: 20px;
        position: relative;
        bottom: -50vh; /* move visually from bottom */
    }
	
    /* Ensure header search input stretches and moves visually down */
    #appHeader .relative {
        margin-bottom: 0.5rem;
    }
    /* Footer reposition and widen */
    #footerLinks {
        left: auto;
        right: 0.5rem;
        bottom: 12px;
        width: calc(100% - 1rem);
        max-width: 980px;
        transform: none;
        display: flex;
        justify-content: center;
        gap: 0;
        padding: 0.5rem 1rem;
        font-size: 12px;
        white-space: nowrap;
    }

    /* Ensure footer items stay on one line where possible */
    #footerLinks a, #footerLinks span {
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Backlog hidden everywhere */
    #backlogLink { display: none !important; }

    /* Move autozoom/reset controls above footer */
    .fixed.bottom-4.left-4 {
        bottom: 60px; /* place above footer */
        left: 0.75rem;
        right: auto;
    }

    /* Increase touch targets */
    #footerLinks a, #footerLinks span, .fixed.bottom-4.left-4 button {
        min-height: 20px;
        display: inline-flex;
        align-items: center;
        padding: 0 0.3rem;
    }
	
    /* Reduce splash text sizes for mobile */
    #splashOverlay h1 { font-size: 2.25rem; }
    #splashOverlay p { font-size: 0.95rem; }

    /* On mobile show map immediately (hide splash) */
    #appHeader { opacity: 1; }
    #splashOverlay { display: none; }
    #mapContainer { filter: none !important; }
}

