/* Minimal styles for the moving marker demo */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Login Form Styles */
.login-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #87CEEB 0%, #6BB6FF 50%, #90EE90 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 100%;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.site-title {
    font-size: 32px;
    color: #4682B4;
    margin-bottom: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding-bottom: 24px;
}

.login-box h1 {
    font-size: 28px;
    color: #1f2937;
    margin-bottom: 8px;
    font-weight: 700;
}

.login-subtitle {
    color: #4682B4;
    font-size: 14px;
    margin-bottom: 32px;
    font-weight: 500;
}

.login-box form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-box input {
    padding: 14px 16px;
    border: 2px solid #B0E0E6;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.9);
}

.login-box input:focus {
    outline: none;
    border-color: #6BB6FF;
    box-shadow: 0 0 0 3px rgba(107, 182, 255, 0.3);
}

.login-box button {
    padding: 14px 24px;
    background: linear-gradient(135deg, #6BB6FF 0%, #87CEEB 50%, #90EE90 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.login-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 182, 255, 0.6);
    background: linear-gradient(135deg, #4A9EFF 0%, #6BB6FF 70%, #90EE90 100%);
}

.login-box button:active {
    transform: translateY(0);
}

.login-box button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.error-message {
    margin-top: 16px;
    padding: 12px;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 8px;
    font-size: 14px;
}

/* Logout Button */
.logout-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    color: #1f2937;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    z-index: 2000;
    padding: 0;
}

.logout-btn:hover {
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.logout-btn:active {
    transform: scale(0.95);
}

.logout-btn svg {
    width: 24px;
    height: 24px;
}

/* Mobile styles for login */
@media (max-width: 768px) {
    .login-box {
        padding: 32px 24px;
    }
    
    .login-box h1 {
        font-size: 24px;
    }
    
    .logout-btn {
        width: 44px;
        height: 44px;
        top: 16px;
        right: 16px;
    }
    
    .logout-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* Invisible marker - ensure no visual appearance */
.invisible-marker {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    border: none !important;
    background: transparent !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    height: 100vh;
    overflow: hidden;
    background: #f5f7fb;
}

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

/* Video-player-style controls at bottom center */
.video-controls {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px 20px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    pointer-events: none;
}

.control-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    color: #1f2937;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    pointer-events: auto;
    padding: 0;
}

.control-btn:hover {
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.control-btn:active {
    transform: scale(0.95);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.control-btn svg {
    width: 28px;
    height: 28px;
}

.play-pause-btn {
    width: 72px;
    height: 72px;
    background: rgba(37, 99, 235, 0.95);
    color: #ffffff;
}

.play-pause-btn:hover {
    background: rgba(29, 78, 216, 0.95);
}

.play-pause-btn svg {
    width: 32px;
    height: 32px;
}


/* Mobile styles */
@media (max-width: 768px) {
    .video-controls {
        gap: 12px;
        padding: 12px 16px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }
    
    .control-btn {
        width: 56px;
        height: 56px;
    }
    
    .control-btn svg {
        width: 24px;
        height: 24px;
    }
    
    .play-pause-btn {
        width: 64px;
        height: 64px;
    }
    
    .play-pause-btn svg {
        width: 28px;
        height: 28px;
    }
}

/* Image thumbnail marker styles */
.image-thumbnail-marker {
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.image-thumbnail-marker:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
    z-index: 1000;
}

/* Popup styles - Images in popups */
.leaflet-popup-content img {
    max-width: 250px !important;
    max-height: 250px !important;
    width: auto !important;
    height: auto !important;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: block !important;
    margin: 0 auto 8px auto !important;
}

/* Popup content styling */
.leaflet-popup-content {
    text-align: center;
    min-width: 200px;
}

.leaflet-popup-content strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    color: #1f2937;
}

.leaflet-popup-content div {
    text-align: left;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
}

/* Thumbnail marker styles */
.thumbnail-icon {
    background: transparent;
    border: none;
}

.thumbnail-marker {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.thumbnail-marker:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

.thumbnail-marker img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Cluster thumbnail styles */
.cluster-thumbnail-icon {
    background: transparent;
    border: none;
}

.cluster-thumbnail {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    border: 3px solid #ffffff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.cluster-thumbnail:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.cluster-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Count badge on cluster */
.count-badge {
    position: absolute;
    bottom: -3px;
    right: -3px;
    background: #2563eb;
    color: #ffffff;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    min-width: 18px;
    text-align: center;
}

/* Cluster Gallery Popup Styles */
.cluster-gallery-popup .leaflet-popup-content-wrapper {
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
}

.cluster-gallery-popup .leaflet-popup-content {
    margin: 0 !important;
    min-width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    width: auto !important;
}

@media (min-width: 769px) {
    .cluster-gallery-popup .leaflet-popup-content {
        min-width: 400px;
        max-width: 480px;
    }
}

.cluster-gallery-container {
    display: flex;
    flex-direction: column;
    background: #ffffff;
}

.cluster-gallery-header {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px 12px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.cluster-gallery-count {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.cluster-gallery-close {
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s ease, color 0.2s ease;
}

.cluster-gallery-close:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.cluster-gallery-image-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: #ffffff;
    min-height: auto;
    width: 100%;
    box-sizing: border-box;
}

.cluster-gallery-image {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 0;
}

.cluster-gallery-image img {
    max-width: 100% !important;
    max-height: 60vh !important;
    width: auto !important;
    height: auto !important;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.2s ease;
}

@media (min-width: 769px) {
    .cluster-gallery-image img {
        max-width: 500px;
        max-height: 400px;
    }
}

.cluster-gallery-image img:hover {
    transform: scale(1.02);
}

.cluster-gallery-nav {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.cluster-gallery-nav:hover:not(:disabled) {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    transform: scale(1.1);
}

.cluster-gallery-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.cluster-gallery-prev {
    margin-right: 8px;
}

.cluster-gallery-next {
    margin-left: 8px;
}

.cluster-gallery-info {
    padding: 8px 12px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    font-size: 11px;
    color: #6b7280;
    line-height: 1.6;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    justify-items: center;
    justify-content: center;
}

.cluster-gallery-info strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    color: #1f2937;
}

.cluster-gallery-thumbnails-wrapper {
    position: relative;
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    padding: 12px 16px;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    width: 100%;
    box-sizing: border-box;
}

.cluster-gallery-thumbnails {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f3f4f6;
    scroll-behavior: smooth;
    padding: 0 4px;
    max-width: 100%;
    width: 100%;
    min-width: 0;
}

.cluster-gallery-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.cluster-gallery-thumbnails::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.cluster-gallery-thumbnails::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.cluster-gallery-thumbnails::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.cluster-gallery-thumb {
    width: 80px !important;
    height: 80px !important;
    min-width: 80px !important;
    min-height: 80px !important;
    max-width: 80px !important;
    max-height: 80px !important;
    object-fit: cover;
    border-radius: 4px;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    opacity: 0.7;
    display: block;
}

.cluster-gallery-thumb:hover {
    border-color: #2563eb;
    opacity: 1;
    transform: scale(1.05);
}

.cluster-gallery-thumb.active {
    border-color: #2563eb;
    border-width: 3px;
    opacity: 1;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.cluster-gallery-scroll-indicator {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    flex-shrink: 0;
    pointer-events: none;
    user-select: none;
}

.cluster-gallery-scroll-left {
    margin-right: 8px;
}

.cluster-gallery-scroll-right {
    margin-left: 8px;
}

.cluster-gallery-scroll-hint {
    padding: 8px 16px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    font-size: 11px;
    color: #6b7280;
    text-align: center;
    font-style: italic;
}

.cluster-gallery-info span {
    margin: 0 8px;
}

.cluster-gallery-info span:not(:last-child)::after {
    content: " • ";
    margin-left: 8px;
}

/* Single Image Popup Styles (similar to cluster gallery) */
.single-image-popup .leaflet-popup-content-wrapper {
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
}

.single-image-popup .leaflet-popup-content {
    margin: 0 !important;
    min-width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    width: auto !important;
}

@media (min-width: 769px) {
    .single-image-popup .leaflet-popup-content {
        min-width: 400px;
        max-width: 480px;
    }
}

.single-image-popup-container {
    display: flex;
    flex-direction: column;
    background: #ffffff;
}

.single-image-popup-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: #ffffff;
    min-height: auto;
    width: 100%;
    box-sizing: border-box;
}

.single-image-popup-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.single-image-popup-image img {
    max-width: 100% !important;
    max-height: 60vh !important;
    width: auto !important;
    height: auto !important;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.single-image-popup-image img:hover {
    transform: scale(1.02);
}

.single-image-popup-info {
    padding: 8px 12px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    font-size: 11px;
    color: #6b7280;
    line-height: 1.6;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.single-image-popup-info span {
    margin: 0 8px;
}

.single-image-popup-info span:not(:last-child)::after {
    content: " • ";
    margin-left: 8px;
}

/* Mobile popup improvements */
@media (max-width: 768px) {
    /* Hide navigation buttons on mobile - use swipe instead */
    .cluster-gallery-nav {
        display: none;
    }
}

