/* Mobile CSS for Matterport Hotel Booking Application
   This file contains styles specifically for mobile and tablet devices
   without modifying the desktop experience */

/* Global Mobile Menu Styles */
@media only screen and (max-width: 767px) {
    /* Hide desktop menu on mobile */
    .desktop-menu {
        display: none !important;
    }
    
    /* Show mobile menu */
    .mobile-menu {
        display: block !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 999999;
        background: rgba(75, 63, 58, 0.95);
        backdrop-filter: blur(10px);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .mobile-bottom-nav {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 15px 0;
        gap: 65px;
    }
    
    .mobile-menu-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
        text-decoration: none;
        color: #f7f1ed;
        font-size: 11px;
        transition: all 0.3s ease;
        min-width: 60px;
        text-align: center;
        height: 50px;
    }
    
    .mobile-menu-item:hover {
        color: #d4af37 !important;
        transform: translateY(-2px) !important;
    }
    
    .mobile-menu-item i {
        font-size: 20px;
        margin-bottom: 4px;
    }
    
    .mobile-menu-item span {
        font-weight: 400;
        letter-spacing: 0.5px;
    }
    
    .submenu-indicator {
        font-size: 12px !important;
        color: #f7f1ed !important;
        display: block !important;
        margin-bottom: 10px !important;
        height: 10px !important;
    }
    
    .indicator-space {
        height: 15px;
        margin-bottom: 10px;
    }
    
    /* Mobile Submenu */
    .mobile-submenu {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #4b3f3a;
        transform: translateY(100%);
        transition: transform 0.3s ease;
        z-index: 1000000;
        max-height: 70vh;
        overflow-y: auto;
    }
    
    .mobile-submenu.active {
        transform: translateY(0);
    }
    
    .submenu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px;
        background: rgba(0, 0, 0, 0.2);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .submenu-header h3 {
        color: #f7f1ed;
        margin: 0;
        font-size: 18px;
        font-weight: 500;
    }
    
    .close-submenu {
        background: none;
        border: none;
        color: #f7f1ed;
        font-size: 28px;
        cursor: pointer;
        padding: 10px;
        transition: all 0.3s ease;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
    }
    
    .close-submenu:hover {
        color: #d4af37;
        background: rgba(212, 175, 55, 0.1);
        transform: scale(1.1);
    }
    
    .submenu-content {
        padding: 10px;
    }
    
    .submenu-room {
        display: flex;
        align-items: center;
        padding: 15px;
        margin-bottom: 10px;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 8px;
        text-decoration: none;
        color: #f7f1ed;
        transition: all 0.3s ease;
    }
    
    .submenu-room:hover {
        background: rgba(212, 175, 55, 0.2);
        transform: translateX(5px);
    }
    
    .submenu-room-image {
        width: 60px;
        height: 60px;
        background-size: cover;
        background-position: center;
        border-radius: 6px;
        margin-right: 15px;
        flex-shrink: 0;
    }
    
    .submenu-room-info h4 {
        margin: 0 0 5px 0;
        font-size: 16px;
        font-weight: 500;
        color: #f7f1ed;
    }
    
    .submenu-room-info p {
        margin: 0;
        font-size: 12px;
        color: rgba(247, 241, 237, 0.7);
        line-height: 1.3;
    }
    
    /* Typography adjustments */
    body, html {
        font-size: 14px;
    }
    
    h1 {
        font-size: 24px !important;
    }
    
    h2 {
        font-size: 20px !important;
    }
    
    p {
        font-size: 14px !important;
    }
    
    /* Button adjustments */
    button, .room-button {
        width: 100%;
        padding: 12px !important;
        font-size: 14px !important;
    }
}

/* Hide mobile menu on desktop */
@media only screen and (min-width: 768px) {
    .mobile-menu {
        display: none !important;
    }
    
    .mobile-submenu {
        display: none !important;
    }
}

/* Menu page mobile styles */
@media only screen and (max-width: 767px) {
    .room-grid {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
        padding: 0 15px !important;
    }
    
    .room-card {
        max-width: 100% !important;
    }
    
    .room-image {
        height: 200px !important;
    }
    
    .room-info {
        padding: 20px !important;
    }
    
    .header {
        padding: 15px 0 !important;
        margin-bottom: 0 !important;
    }
    
    .hotel-logo {
        height: 70px !important;
    }
    
    .room-features {
        flex-wrap: wrap;
    }
    
    .room-feature {
        margin-bottom: 8px;
        margin-right: 15px;
        font-size: 11px !important;
    }
    
    footer {
        padding: 15px;
        font-size: 12px !important;
    }
}

/* Tablet styles */
@media only screen and (min-width: 768px) and (max-width: 1024px) {
    .room-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 25px !important;
    }
    
    .room-image {
        height: 220px !important;
    }
    
    .hotel-logo {
        height: 80px !important;
    }
}

/* Index page mobile styles */
@media only screen and (max-width: 767px) {
    .header h1 {
        font-size: 22px !important;
        line-height: 1.2 !important;
    }
    
    .header p {
        font-size: 14px !important;
    }
    
    .hotel-logo {
        height: 50px !important;
        margin-bottom: 10px !important;
    }
    
    /* Bottom menu adjustments */
    #bottom-menu {
        padding: 10px 0 !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        background-color: rgba(75, 63, 58, 0.9) !important; /* Brand color instead of grey */
        z-index: 1000 !important;
        max-height: 65px !important;
        backdrop-filter: blur(5px) !important;
    }
    
    .bottom-nav {
        justify-content: flex-start !important;
        padding: 0 10px !important;
        gap: 15px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important; /* Firefox */
        -ms-overflow-style: none !important; /* IE/Edge */
    }
    
    .bottom-nav::-webkit-scrollbar { 
        display: none !important; /* Chrome/Safari/Opera */
    }
    
    .menu-link {
        font-size: 12px !important;
        padding: 6px 8px !important;
        white-space: nowrap !important;
    }
    
    /* Mobile and tablet icon menu */
    @media (max-width: 768px) {
        #bottom-menu {
            padding: 8px 0 !important;
        }
        
        .bottom-nav {
            justify-content: space-around !important;
            padding: 0 !important;
            gap: 5px !important;
            width: 100% !important;
        }
        
        .menu-link {
            display: flex !important;
            flex-direction: column !important;
            align-items: center !important;
            justify-content: center !important;
            text-align: center !important;
            min-width: auto !important;
            flex: 1 !important;
            font-size: 0 !important; /* Hide text */
            touch-action: manipulation !important; /* Optimize for touch */
            -webkit-tap-highlight-color: rgba(255,255,255,0.2) !important;
            cursor: pointer !important;
            transition: all 0.3s ease !important;
        }
        
        /* Highlighted state for active/clicked menu items */
        .menu-link.active,
        .menu-link:active {
            background-color: rgba(255,255,255,0.15) !important;
            transform: translateY(-2px) !important;
            border-radius: 4px !important;
            box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
        }
        
        /* Main Menu button */
        /* Menu item - using specific target for form's menu-link */
        .bottom-nav > form .menu-link::before {
            content: '\f015' !important; /* Font Awesome home icon */
            font-family: 'Font Awesome 6 Free' !important;
            font-weight: 900 !important;
            font-size: 12px !important;
            margin-bottom: 2px !important;
            display: block !important;
        }
        
        .bottom-nav > form .menu-link::after {
            content: 'Menu' !important;
            font-size: 9px !important;
            display: block !important;
        }
        
        /* Mountain Side */
        /* Mountain Side - target the second menu-link that's directly in the nav */
        .bottom-nav > .menu-link:first-of-type::before {
            content: '\f6fc' !important; /* Font Awesome mountain icon */
            font-family: 'Font Awesome 6 Free' !important;
            font-weight: 900 !important;
            font-size: 12px !important;
            margin-bottom: 2px !important;
            display: block !important;
        }
        
        .bottom-nav > .menu-link:first-of-type::after {
            content: 'Mountain' !important;
            font-size: 9px !important;
            display: block !important;
        }
        
        /* Port Side 1 */
        .bottom-nav > .menu-link:nth-of-type(2)::before {
            content: '\f21a' !important; /* Font Awesome water icon */
            font-family: 'Font Awesome 6 Free' !important;
            font-weight: 900 !important;
            font-size: 12px !important;
            margin-bottom: 2px !important;
            display: block !important;
        }
        
        .bottom-nav > .menu-link:nth-of-type(2)::after {
            content: 'Port 1' !important;
            font-size: 9px !important;
            display: block !important;
        }
        
        /* Port Side 2 */
        .bottom-nav > .menu-link:nth-of-type(3)::before {
            content: '\f21a' !important; /* Font Awesome ship icon */
            font-family: 'Font Awesome 6 Free' !important;
            font-weight: 900 !important;
            font-size: 12px !important;
            margin-bottom: 2px !important;
            display: block !important;
        }
        
        .bottom-nav > .menu-link:nth-of-type(3)::after {
            content: 'Port 2' !important;
            font-size: 9px !important;
            display: block !important;
        }
        
        /* City Side */
        .bottom-nav > .menu-link:nth-of-type(4)::before {
            content: '\f1ad' !important; /* Font Awesome building icon */
            font-family: 'Font Awesome 6 Free' !important;
            font-weight: 900 !important;
            font-size: 12px !important;
            margin-bottom: 2px !important;
            display: block !important;
        }
        
        .bottom-nav > .menu-link:nth-of-type(4)::after {
            content: 'City' !important;
            font-size: 9px !important;
            display: block !important;
        }
        
        /* Restaurant */
        .bottom-nav > .menu-link:nth-of-type(5)::before {
            content: '\f6fc' !important; /* Font Awesome utensils icon */
            font-family: 'Font Awesome 6 Free' !important;
            font-weight: 900 !important;
            font-size: 12px !important;
            margin-bottom: 2px !important;
            display: block !important;
        }
        
        .bottom-nav > .menu-link:nth-of-type(5)::after {
            content: 'Mountain' !important;
            font-size: 9px !important;
            display: block !important;
        }
    }
    
    /* Room previews */
    .room-preview, .preview-div {
        width: 200px !important;
        bottom: 65px !important;
    }
    
    .preview-image, .preview-image-new {
        height: 100px !important;
    }
    
    .preview-info h3, .preview-info-new h3 {
        font-size: 14px !important;
    }
    
    .preview-info p, .preview-info-new p {
        font-size: 11px !important;
    }
}

/* Tablet styles for index page */
@media only screen and (min-width: 768px) and (max-width: 1024px) {
    .bottom-nav {
        justify-content: center !important;
    }
    
    .menu-link {
        padding: 8px 12px !important;
    }
    
    .hotel-logo {
        height: 55px !important;
    }
    
    .header h1 {
        font-size: 24px !important;
    }
}

/* Showcase page mobile styles */
@media only screen and (max-width: 767px) {
    #canvas-container {
        height: 100% !important;
        width: 100% !important;
    }
    
    /* Ensure Matterport controls are accessible */
    .mp-ui-container {
        transform: scale(1.2);
        transform-origin: bottom right;
    }
    
    /* Adjust loading screen */
    #loading-gui h1 {
        font-size: 20px !important;
    }
    
    #circleLoader {
        transform: scale(0.8);
    }
}

/* Fix for 3D overlay text on mobile */
@media only screen and (max-width: 767px) {
    .overlay-tooltip {
        transform: scale(0.75) !important;
        transform-origin: center bottom !important;
    }
    
    .tooltip-content {
        width: 220px !important;
        font-size: 14px !important;
    }
}

/* Page-specific scroll fixes */
/* For showcase.html and index.html we prevent scrolling */
body.mobile-showcase, body.mobile-index {
    overflow: hidden !important;
    width: 100% !important;
    height: 100% !important;
}

/* For menu.html we allow scrolling */
body.mobile-menu {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}
