/* Building Detail Page CSS - Matching iOS App Layout */

/* Masonry grid layout (like iOS app) */
.masonry-grid {
    display: flex;
    gap: 12px;
    padding: 16px;
}

.masonry-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.masonry-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .masonry-item:hover {
        transform: scale(1.02);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    }

    .masonry-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* Community badges */
.community-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.upload-date {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 10px;
    backdrop-filter: blur(10px);
}

/* Empty state styling */
.empty-state-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 200px;
    padding: 40px;
}

.empty-state {
    text-align: center;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

/* Gallery tabs */
.image-gallery-tabs {
    display: flex;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 16px;
    padding: 4px;
}

.gallery-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 12px 16px;
    border-radius: 6px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .gallery-tab.active {
        background-color: white;
        color: #292E32;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .gallery-tab:hover {
        color: #292E32;
    }

/* Upload button */
.upload-button {
    background: linear-gradient(135deg, #007AFF 0%, #0056CC 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .upload-button:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
    }

/* Gallery content sections */
.gallery-content {
    display: none;
}

    .gallery-content.active {
        display: block;
    }

/* Legacy image grid for fallback */
.image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 16px;
}

.image-item {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

    .image-item:hover {
        transform: scale(1.02);
    }

    .image-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* Responsive design */
@media (max-width: 768px) {
    .masonry-grid {
        padding: 12px;
        gap: 8px;
    }

    .masonry-column {
        gap: 8px;
    }

    .community-badge {
        font-size: 11px;
        padding: 3px 6px;
    }

    .upload-date {
        font-size: 9px;
        padding: 3px 6px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .community-badge,
    .upload-date {
        background-color: rgba(255, 255, 255, 0.9);
        color: #292E32;
    }
}

/* Overrides: make images in the Images tab square */
#images-content .masonry-item {
    border-radius: 0 !important;
}

    #images-content .masonry-item img {
        border-radius: 0 !important;
    }

/* Image Gallery Tab Styles (moved from view) */
.image-gallery-tabs {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 10px;
    margin-top: 5px;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 0.5rem;
    width: 100%;
}

.gallery-tab {
    padding: 6px 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'EDGE-Light', sans-serif;
    font-size: 13px;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

    .gallery-tab.active {
        color: #333;
        border-bottom-color: transparent;
        font-weight: 500;
    }

.image-gallery-tabs::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e0e0e0;
    margin-left: 1rem;
    align-self: flex-end;
    margin-bottom: 8px;
}

/* Video Player Styles */
.video-player-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: calc(100% - 2rem);
    max-width: 100%;
    position: relative;
}

#video-info {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.video-controls {
    position: absolute;
    bottom: 6rem;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
}

    /* Buttons inside video controls mimic scene buttons */
    .video-controls .video-select-btn {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        border: none;
        color: white;
        font-family: 'EDGE-Bold', sans-serif;
        font-size: 14px;
        cursor: pointer;
    }

    /* Fullscreen button spacing */
    .video-controls button:not(.video-select-btn) {
        padding: 5px 15px;
        border-radius: 15px;
        border: none;
        background: #AAAAAA;
        color: white;
        font-family: 'EDGE-Bold', sans-serif;
        font-size: 14px;
        cursor: pointer;
    }

/* 3D/Spinner Player Styles */
#threeD-content.active {
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.spinner-container h3 {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    color: white !important;
    background: rgba(255,255,255,0.1);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin: 0 !important;
    backdrop-filter: blur(10px);
    z-index: 1000;
    text-align: center;
}

/* Tab content styling */
.tab-content {
    background: transparent !important;
    overflow-x: hidden
}

    .tab-content:not(.active) {
        background: transparent !important;
        display: none !important;
    }

#panorama-content, #video-content, #threeD-content {
    background: transparent !important;
}

    #panorama-content.active, #video-content.active, #threeD-content.active {
        background: #000 !important;
    }

#video-content {
    height: 100%;
}
/* Iframe container */
.iframe-container {
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

    .iframe-container iframe {
        width: 100% !important;
        height: 100% !important;
        border: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

/* Fullscreen Image Modal */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Modal loading overlay */
.modal-loading {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.35);
    z-index: 3;
}

.modal-loading .spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255,255,255,0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.modal-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10001;
    transition: transform 0.3s ease, opacity 0.3s ease;
    user-select: none;
}

.modal-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 10003;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

    .modal-close:hover {
        background: rgba(0, 0, 0, 0.9);
        transform: scale(1.1);
    }

.modal-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10002;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s ease;
    border-radius: 50%;
    user-select: none;
    transition: background-color 0.3s ease;
}

    .modal-nav:hover {
        background: rgba(0, 0, 0, 0.8);
    }

.modal-nav-left {
    left: 20px;
}

.modal-nav-right {
    right: 20px;
}

.modal-image-container {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    overflow: hidden;
    border-radius: 8px;
}

    .modal-image-container img {
        max-width: 100%;
        max-height: 90vh;
        object-fit: contain;
        touch-action: pinch-zoom;
    }

.modal-info {
    margin-top: 20px;
    color: white;
    text-align: center;
    font-family: 'EDGE-Light', sans-serif;
}

    .modal-info h4 {
        font-family: 'EDGE-Bold', sans-serif;
        margin: 0 0 10px 0;
        font-size: 18px;
    }

    .modal-info p {
        margin: 0;
        opacity: 0.8;
        font-size: 14px;
    }

/* Content area definition for multimedia sections */
.multimedia-content {
    background: #000;
    margin: 0 -1.25rem;
    margin-top: -0.5rem;
    padding: 1rem;
    height: calc(100vh - 220px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 360° Panorama viewer */
#panorama-content.active {
    height: 100%);
    overflow: hidden;
}

.panorama-viewer-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 400px;
    width: 100%;
    max-width: 100%;
    position: relative;
}

.panorama-viewer {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

#main-panorama-scene {
    flex: 1 !important;
    min-height: 400px;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
}

    #main-panorama-scene canvas {
        width: 100% !important;
        height: 100% !important;
    }

a-scene {
    overflow: hidden !important;
}
/* Ensure A-Frame captures vertical touch drags (prevents browser scrolling) */
#main-panorama-scene, #main-panorama-scene canvas, a-scene {
    touch-action: auto;
}

a-scene {
    overflow: hidden !important;
}

.scene-selector {
    position: absolute;
    bottom: 6rem;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.scene-button {
    transition: all 0.3s ease;
}

    .scene-button:hover {
        transform: scale(1.1);
        opacity: 0.8;
    }

    .scene-button.active {
        background: #292E32 !important;
    }

#current-scene-info {
    margin: 10px 0 !important;
    flex-shrink: 0;
}

.panorama-controls {
    margin-top: 10px !important;
    flex-shrink: 0;
}

/* Keyframes */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateY(-50%) scale(0.8);
    }

    30% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }

    70% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-50%) scale(0.8);
    }
}

/* Header and layout tweaks */
.header {
    border: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    margin-bottom: 10px !important;
}

    .header h1 {
        margin-bottom: 0 !important;
    }

.bottom-navigation {
    box-shadow: none !important;
    border-top: none !important;
}

.main-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

#info-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body {
    overflow-x: hidden !important;
}

.app-container {
    overflow-x: hidden !important;
}

    /* Fix bottom navigation to viewport bottom and center within app container */
    .app-container .bottom-navigation {
        position: fixed;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        max-width: 480px;
        z-index: 1000;
    }

/* Ensure content isn't hidden behind fixed footer */
.main-content {
    padding-bottom: 90px; /* space for bottom nav */
}

/* Top Image Carousel */
.top-image-carousel {
    position: relative;
    width: calc(100% + 2.5rem);
    margin-left: -1.25rem;
    margin-right: -1.25rem;
    margin-bottom: 1.5rem;
    height: 250px;
    overflow: hidden;
    background: #f8f9fa;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
    cursor: grab;
}

    .carousel-track:active {
        cursor: grabbing;
    }

.carousel-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

    .carousel-image:hover {
        transform: scale(1.05);
    }

.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 100;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

    .carousel-dot.active {
        background: white;
        transform: scale(1.2);
    }

    .carousel-dot:hover {
        background: rgba(255, 255, 255, 0.8);
    }

/* Masonry Grid Layout */
.masonry-grid {
    display: flex;
    gap: 8px;
    padding: 0 8px;
    cursor: grab;
    user-select: none;
}

.masonry-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.masonry-item {
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s ease;
}

    .masonry-item:hover {
        transform: scale(1.02);
    }

.masonry-grid:active {
    cursor: grabbing;
}

.masonry-grid.dragging {
    cursor: grabbing;
}

    .masonry-grid.dragging .masonry-item {
        pointer-events: none;
    }

/* Mobile */
@media (max-width: 768px) {
    .top-image-carousel {
        width: calc(100% + 1.5rem);
        margin-left: -0.75rem;
        margin-right: -0.75rem;
        margin-bottom: 1rem;
        height: 200px;
    }

    .header {
        padding: 0.5rem 1rem;
        margin-bottom: 0.5rem !important;
    }

        .header h1 {
            font-size: 1.5rem !important;
            margin: 0 !important;
        }

    .main-content {
        width: 100%;
        max-width: none;
    }

    #info-content {
        padding: 0 !important;
        width: 100%;
    }

    .building-property {
        margin-bottom: 1rem;
        padding: 0 0.5rem;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem 1rem;
        align-items: start;
        width: 100%;
    }

    .property-item {
        margin-bottom: 0;
        text-align: left !important;
        display: flex;
        flex-direction: column;
    }

    .property-label {
        font-size: 0.8rem;
        margin-bottom: 0.25rem;
        color: #333;
        font-weight: 600;
    }

    .property-value {
        font-size: 0.9rem;
        color: #666;
        font-weight: 400;
        line-height: 1.4;
    }

    .tenants-section {
        grid-column: 1 / -1;
        margin-top: 0.25rem;
        text-align: left !important;
    }

        .tenants-section .property-label {
            margin-bottom: 0.4rem;
            font-size: 0.8rem;
            color: #333;
            font-weight: 600;
            text-align: left;
        }

        .tenants-section .property-value {
            font-size: 0.9rem;
            color: #666;
            font-weight: 400;
            line-height: 1.4;
            text-align: left;
        }

    .introduction-section {
        grid-column: 1 / -1;
        margin-top: 0.25rem;
        text-align: left !important;
    }

        .introduction-section .property-label {
            margin-bottom: 0.4rem;
            font-size: 0.8rem;
            color: #333;
            font-weight: 600;
            text-align: left;
        }

        .introduction-section .property-value {
            font-size: 0.9rem;
            color: #666;
            font-weight: 400;
            line-height: 1.4;
            text-align: left;
        }

    .building-description {
        margin: 1rem 0.5rem;
    }

        .building-description h3 {
            font-size: 1.1rem;
            margin-bottom: 0.5rem;
        }

        .building-description p {
            font-size: 0.9rem;
            line-height: 1.4;
        }

    .carousel-dots {
        bottom: 10px;
    }

    .carousel-dot {
        width: 6px;
        height: 6px;
        margin: 0 3px;
    }

    .bottom-navigation {
        padding: 0.75rem 1rem;
        gap: 1rem;
    }

    .main-content {
        padding-bottom: 90px;
    }

    .nav-button {
        min-height: 44px;
        padding: 0.5rem;
    }

        .nav-button svg {
            width: 28px !important;
            height: 28px !important;
        }

    .image-gallery-tabs {
        margin-top: 2px;
        margin-bottom: 8px;
        padding: 0 0.25rem;
    }

    .gallery-tab {
        padding: 4px 10px;
        font-size: 12px;
    }

    .masonry-grid {
        gap: 6px;
        padding: 0 6px;
    }

    .masonry-column {
        gap: 6px;
    }

    .panorama-viewer-container {
        height: 100%;
        min-height: 300px;
        width: 100%;
    }

    #main-panorama-scene {
        min-height: 300px;
    }

    .scene-selector {
        bottom: 5rem;
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }

    .video-player-container {
        width: calc(100% - 1.5rem);
        height: 100%;
    }

    .video-controls {
        bottom: 5rem;
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }

    .spinner-container h3 {
        top: 0.5rem;
        padding: 0.5rem 0.75rem;
        font-size: 1rem;
    }
}

/* Moved most styles to building-detail.css. Keeping only any page-specific overrides if needed. */
/* Image Gallery Tab Styles */
.image-gallery-tabs {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 10px;
    margin-top: 5px;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 0.5rem;
    width: 100%;
}

.gallery-tab {
    padding: 6px 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'EDGE-Light', sans-serif;
    font-size: 13px;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

    .gallery-tab.active {
        color: #333;
        border-bottom-color: transparent;
        font-weight: 500;
    }

    .gallery-tab:hover {
        color: #333;
    }

.image-gallery-tabs::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e0e0e0;
    margin-left: 1rem;
    align-self: flex-end;
    margin-bottom: 8px;
}


.video-player-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: calc(100% - 2rem);
    max-width: 100%;
    position: relative;
    width: 100%;
}

#video-info {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.video-controls {
    position: absolute;
    bottom: 6rem;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
}

/* 3D/Spinner Player Styles */
#threeD-content.active {
    height: calc(100vh - 220px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.spinner-container {
    height: 100%;
    width: 100%;
}

    .spinner-container h3 {
        position: absolute;
        top: 1rem;
        left: 50%;
        transform: translateX(-50%);
        color: white !important;
        background: rgba(255,255,255,0.1);
        padding: 0.75rem 1rem;
        border-radius: 8px;
        margin: 0 !important;
        backdrop-filter: blur(10px);
        z-index: 1000;
        text-align: center;
    }

/* Tab content styling - no grey background for inactive tabs */
.tab-content {
    background: transparent !important;
}

    .tab-content:not(.active) {
        background: transparent !important;
        display: none !important;
    }

/* Multimedia tabs should have black background only when active */
#panorama-content,
#video-content,
#threeD-content {
    background: transparent !important;
}

    #panorama-content.active,
    #video-content.active,
    #threeD-content.active {
        background: #000 !important;
    }

.iframe-container {
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

    .iframe-container iframe {
        width: 100% !important;
        height: 100% !important;
        border: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

/* Fullscreen Image Modal Styles */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.modal-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10001;
}

.modal-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 10003;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

    .modal-close:hover {
        background: rgba(0, 0, 0, 0.9);
        transform: scale(1.1);
    }

.modal-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10002;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s ease;
    border-radius: 50%;
    user-select: none;
    transition: background-color 0.3s ease;
}

    .modal-nav:hover {
        background: rgba(0, 0, 0, 0.8);
    }

.modal-nav-left {
    left: 20px;
}

.modal-nav-right {
    right: 20px;
}

/* Enhanced swipe/drag support */
.image-modal {
    cursor: grab;
}

    .image-modal:active {
        cursor: grabbing;
    }

.modal-content {
    transition: transform 0.3s ease, opacity 0.3s ease;
    user-select: none;
}

.modal-image-container img {
    pointer-events: none; /* Prevent image dragging interference */
}

.modal-image-container {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    overflow: hidden;
    border-radius: 8px;
}

    .modal-image-container img {
        max-width: 100%;
        max-height: 90vh;
        object-fit: contain;
        user-select: none;
        touch-action: pinch-zoom;
        transition: filter 0.3s ease, opacity 0.3s ease;
    }

.modal-info {
    margin-top: 20px;
    color: white;
    text-align: center;
    font-family: 'EDGE-Light', sans-serif;
}

    .modal-info h4 {
        font-family: 'EDGE-Bold', sans-serif;
        margin: 0 0 10px 0;
        font-size: 18px;
    }

    .modal-info p {
        margin: 0;
        opacity: 0.8;
        font-size: 14px;
    }

/* Content area definition for all multimedia sections */
.multimedia-content {
    background: #000;
    margin: 0 -1.25rem;
    margin-top: -0.5rem;
    padding: 1rem;
    height: calc(100vh - 220px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 360° Panorama viewer styles */
#panorama-content.active {
    height: calc(100vh - 220px);
    overflow: hidden;
}

.panorama-viewer-container {
    display: flex;
    flex-direction: column;
    position: relative;
}

.panorama-viewer {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

#main-panorama-scene {
    flex: 1 !important;
    min-height: 400px;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
}

    #main-panorama-scene canvas {
        width: 100% !important;
        height: 100% !important;
    }

/* Hide A-Frame scrollbars */
a-scene {
    overflow: hidden !important;
}

/* Scene selector positioning */
.scene-selector {
    position: absolute;
    bottom: 6rem;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.scene-button {
    transition: all 0.3s ease;
}

    .scene-button:hover {
        transform: scale(1.1);
        opacity: 0.8;
    }

    .scene-button.active {
        background: #292E32 !important;
    }

#current-scene-info {
    margin: 10px 0 !important;
    flex-shrink: 0;
}

.panorama-controls {
    margin-top: 10px !important;
    flex-shrink: 0;
}

/* Loading spinner animation */
@@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#panorama-loading {
    transition: opacity 0.5s ease;
}

/* Hide any A-Frame loading indicators */
.a-loader-title,
.a-loader,
#main-panorama-scene .a-loader-title,
#main-panorama-scene .a-loader {
    display: none !important;
}

/* Hide A-Frame enter VR button and other UI elements */
.a-enter-vr,
.a-orientation-modal {
    display: none !important;
}

/* Header styles - remove borders and reduce spacing */
.header {
    border: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    margin-bottom: 10px !important;
}

    .header h1 {
        margin-bottom: 0 !important;
    }

/* Bottom navigation - remove drop shadow */
.bottom-navigation {
    box-shadow: none !important;
    border-top: none !important;
}

/* Main content - reduce spacing */
.main-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
    overflow-y: auto;
    overflow-x: hidden;
}

#info-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Prevent horizontal scrollbars */
body {
    overflow-x: hidden !important;
}

.app-container {
    overflow-x: hidden !important;
}

/* Top Image Carousel Styles */
.top-image-carousel {
    position: relative;
    width: calc(100% + 2.5rem); /* Extend further to eliminate white edges */
    margin-left: -1.25rem; /* Extend further to left edge */
    margin-right: -1.25rem; /* Extend further to right edge */
    margin-bottom: 1.5rem; /* Add more vertical spacing after image */
    height: 250px;
    overflow: hidden;
    background: #f8f9fa;
}

/* Mobile responsive adjustments */
@@media (max-width: 768px) {
    .top-image-carousel {
        width: calc(100% + 1.5rem);
        margin-left: -0.75rem;
        margin-right: -0.75rem;
        margin-bottom: 1rem;
        height: 200px; /* Smaller height on mobile */
    }

    .header {
        padding: 0.5rem 1rem;
        margin-bottom: 0.5rem !important;
    }

        .header h1 {
            font-size: 1.5rem !important;
            margin: 0 !important;
        }

    .main-content {
        width: 100%;
        max-width: none;
    }

    #info-content {
        padding: 0 !important;
        width: 100%;
    }
    /* Mobile property layout - 2 column grid */
    .building-property {
        margin-bottom: 1rem;
        padding: 0 0.5rem;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem 1rem;
        align-items: start;
        width: 100%;
    }

    .property-item {
        margin-bottom: 0;
        text-align: left !important;
        display: flex;
        flex-direction: column;
    }

    .property-label {
        font-size: 0.8rem;
        margin-bottom: 0.25rem;
        color: #333;
        font-weight: 600;
    }

    .property-value {
        font-size: 0.9rem;
        color: #666;
        font-weight: 400;
        line-height: 1.4;
    }
    /* Special handling for tenants section */
    .tenants-section {
        grid-column: 1 / -1; /* Full width */
        margin-top: 0.25rem;
        text-align: left !important;
    }

        .tenants-section .property-label {
            margin-bottom: 0.4rem;
            font-size: 0.8rem;
            color: #333;
            font-weight: 600;
            text-align: left;
        }

        .tenants-section .property-value {
            font-size: 0.9rem;
            color: #666;
            font-weight: 400;
            line-height: 1.4;
            text-align: left;
        }
    /* Special handling for introduction section */
    .introduction-section {
        grid-column: 1 / -1; /* Full width */
        margin-top: 0.25rem;
        text-align: left !important;
    }

        .introduction-section .property-label {
            margin-bottom: 0.4rem;
            font-size: 0.8rem;
            color: #333;
            font-weight: 600;
            text-align: left;
        }

        .introduction-section .property-value {
            font-size: 0.9rem;
            color: #666;
            font-weight: 400;
            line-height: 1.4;
            text-align: left;
        }
    /* Handle single items in a row */
    .building-property:has(.property-item:only-child) .property-item {
        grid-column: 1 / -1;
        justify-self: center;
    }
    /* Mobile building description */
    .building-description {
        margin: 1rem 0.5rem;
    }

        .building-description h3 {
            font-size: 1.1rem;
            margin-bottom: 0.5rem;
        }

        .building-description p {
            font-size: 0.9rem;
            line-height: 1.4;
        }
    /* Carousel dots mobile adjustment */
    .carousel-dots {
        bottom: 10px;
    }

    .carousel-dot {
        width: 6px;
        height: 6px;
        margin: 0 3px;
    }
    /* Mobile full-width sections */
    .tenants-section,
    .introduction-section {
        width: 100% !important;
        max-width: none !important;
        grid-column: 1 / -1 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        text-align: left !important;
    }

        .tenants-section .property-label,
        .introduction-section .property-label {
            text-align: left !important;
            width: 100%;
        }

        .tenants-section .property-value,
        .introduction-section .property-value {
            text-align: left !important;
            width: 100%;
        }
    /* Mobile bottom navigation */
    .bottom-navigation {
        padding: 0.75rem 1rem;
        gap: 1rem;
    }

    .nav-button {
        min-height: 44px; /* Touch-friendly size */
        padding: 0.5rem;
    }

        .nav-button svg {
            width: 28px !important;
            height: 28px !important;
        }
    /* Mobile gallery adjustments */
    .image-gallery-tabs {
        margin-top: 2px;
        margin-bottom: 8px;
        padding: 0 0.25rem;
    }

    .gallery-tab {
        padding: 4px 10px;
        font-size: 12px;
    }

    .masonry-grid {
        gap: 6px;
        padding: 0 6px;
    }

    .masonry-column {
        gap: 6px;
    }
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
    cursor: grab;
}

    .carousel-track:active {
        cursor: grabbing;
    }

.carousel-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

    .carousel-image:hover {
        transform: scale(1.05);
    }

.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 100;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

    .carousel-dot.active {
        background: white;
        transform: scale(1.2);
    }

    .carousel-dot:hover {
        background: rgba(255, 255, 255, 0.8);
    }

/* Masonry Grid Layout */
.masonry-grid {
    display: flex;
    gap: 8px;
    padding: 0 8px;
    cursor: grab;
    user-select: none;
}

.masonry-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.masonry-item {
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s ease;
}

/* Keep images square in Images tab */
#images-content .masonry-item img {
    border-radius: 0 !important;
}

.masonry-item:hover {
    transform: scale(1.02);
}

.masonry-grid:active {
    cursor: grabbing;
}

.masonry-grid.dragging {
    cursor: grabbing;
}

    .masonry-grid.dragging .masonry-item {
        pointer-events: none;
    }

/* Mobile responsive modal */
@@media (max-width: 768px) {
    .modal-close {
        top: 15px;
        right: 15px;
        font-size: 24px;
        width: 45px;
        height: 45px;
    }

    .modal-image-container img {
        max-height: 85vh;
    }

    .modal-info {
        margin-top: 15px;
    }
    /* Mobile multimedia content areas */
    #panorama-content,
    #video-content,
    #threeD-content {
        height: calc(100vh - 200px);
        overflow: hidden;
    }

    .panorama-viewer-container {
        height: calc(100% - 1.5rem);
        min-height: 300px;
        width: calc(100% - 1.5rem);
    }

    #main-panorama-scene {
        min-height: 300px;
    }

    .scene-selector {
        bottom: 5rem;
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }

    .video-player-container {
        width: calc(100% - 1.5rem);
    }

    .video-controls {
        bottom: 5rem;
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }

    .spinner-container h3 {
        top: 0.5rem;
        padding: 0.5rem 0.75rem;
        font-size: 1rem;
    }
}

.gyro-toggle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: #292E32;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin-left: 8px;
}

    .gyro-toggle.inactive {
        background: #AAAAAA;
    }