/**
 * Bottom Toolbar Styles - matching Wolfstorm's toolbar layout
 */

.toolbar-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(180deg, rgba(25, 31, 45, 0.95) 0%, rgba(20, 26, 38, 0.98) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    /* [2026-08-18] One centred cluster (dock-style): the Chat section and the button row
       sit together in the middle instead of Chat being pinned left. The mobile media
       queries below restore the left-anchored chat + burger layout. */
    justify-content: center;
    gap: 4px;
    padding: 0 10px;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
}

.chat-bar-section {
    display: flex;
    align-items: center;
    gap: 8px;
    /* Was flex: 1 / max-width: 400px — sized for the inline chat input that was removed
       2026-08-18; the section now holds only the Chat button and hugs its content so the
       whole toolbar can centre as one group. */
    flex: 0 0 auto;
}

.toolbar-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
    /* flex 0 1 auto: hug the buttons so the toolbar-bottom centring puts the whole
       cluster (Chat + buttons) in the middle; still shrinkable, so the row scrolls
       rather than overflows when the window is narrow. */
    flex: 0 1 auto;
    min-width: 0;
    justify-content: center;
    overflow-x: auto;
    overflow-y: hidden;
}

.toolbar-buttons::-webkit-scrollbar {
    height: 4px;
}

.toolbar-buttons::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.toolbar-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 50px;
    background: rgba(60, 60, 60, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px 8px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.toolbar-btn:hover {
    background: rgba(80, 80, 80, 0.8);
    border-color: rgba(100, 150, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.toolbar-btn:active {
    transform: translateY(0);
    background: rgba(50, 50, 50, 0.9);
}

.toolbar-btn .material-icons {
    font-size: 24px;
    margin-bottom: 2px;
}

.toolbar-btn .btn-label {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Active state for toggleable buttons */
.toolbar-btn.active {
    background: linear-gradient(135deg, rgba(60, 120, 200, 0.7) 0%, rgba(40, 80, 160, 0.8) 100%);
    border-color: rgba(100, 150, 255, 0.8);
}

/* VR button active state - green glow when in VR */
#vr-btn.vr-active {
    background: linear-gradient(135deg, rgba(40, 180, 80, 0.8) 0%, rgba(20, 140, 60, 0.9) 100%);
    border-color: rgba(80, 220, 120, 0.9);
    box-shadow: 0 0 10px rgba(40, 180, 80, 0.5);
    animation: vr-pulse 2s infinite;
}

@keyframes vr-pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(40, 180, 80, 0.5); }
    50% { box-shadow: 0 0 20px rgba(40, 180, 80, 0.8); }
}

/* Special styling for chat button */
#nearby-chat-btn {
    background: linear-gradient(135deg, rgba(80, 140, 220, 0.6) 0%, rgba(60, 100, 180, 0.7) 100%);
}

#nearby-chat-btn.unread {
    background: linear-gradient(135deg, rgba(220, 140, 80, 0.8) 0%, rgba(200, 100, 60, 0.9) 100%);
    border-color: #ff9900;
    animation: pulse-unread 1s infinite;
}

@keyframes pulse-unread {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(255, 150, 0, 0);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 10px rgba(255, 150, 0, 0.6);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(255, 150, 0, 0);
    }
}

#nearby-chat-btn:hover {
    background: linear-gradient(135deg, rgba(100, 160, 240, 0.7) 0%, rgba(80, 120, 200, 0.8) 100%);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .toolbar-btn {
        min-width: 50px;
        padding: 4px 6px;
    }

    .toolbar-btn .btn-label {
        font-size: 9px;
    }
}

@media (max-width: 900px) {
    .toolbar-btn .btn-label {
        display: none;
    }

    .toolbar-btn {
        min-width: 44px;
        height: 44px;
    }
    
    .toolbar-bottom {
        height: 54px;
    }
}

@media (max-width: 600px) {
    .toolbar-bottom {
        height: 48px;
        padding: 0 4px;
        overflow: hidden;
    }

    .toolbar-buttons {
        /* Ensure it takes remaining space */
        flex: 1;
        width: auto;
        overflow-x: scroll;
        justify-content: flex-start;
        padding-left: 4px;
        /* Hides scrollbar but allows scrolling (Chrome/Safari/Opera) */
        -ms-overflow-style: none;  /* IE and Edge */
        scrollbar-width: none;  /* Firefox */
    }
    
    .toolbar-buttons::-webkit-scrollbar {
        display: none;
    }

    .toolbar-btn {
        min-width: 36px;
        height: 40px;
        margin-right: 2px;
    }
    
    .toolbar-btn .material-icons {
        font-size: 20px;
        margin-bottom: 0;
    }
    
    /* Make chat button smaller in section */
    #nearby-chat-btn {
        min-width: 36px;
        padding: 2px;
    }
    
    #nearby-chat-btn .btn-label {
        display: none;
    }
}

/**
 * Location/Status Bar - Wolfstorm style
 * Shows region name, coordinates, parcel info, balance, and SL time
 */
/* Override style.css #location-bar - this is the status bar with time */
#location-bar.location-bar {
    position: fixed !important;
    top: 28px !important; /* Below menu bar */
    left: 0 !important;
    right: 0 !important;
    height: 26px !important;
    background: linear-gradient(180deg, rgba(30, 40, 60, 0.98) 0%, rgba(20, 30, 45, 0.99) 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 12px !important;
    z-index: 10000 !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    font-size: 12px !important;
    color: #ffffff !important;
    backdrop-filter: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
}

#location-bar .location-left,
.location-bar .location-left {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    visibility: visible !important;
}

#location-bar .location-right,
.location-bar .location-right {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    flex-shrink: 0 !important;
    visibility: visible !important;
}

.region-name {
    color: #8cf;
    font-weight: 600;
    font-size: 13px;
}

.region-coords {
    color: #ddd;
    font-size: 12px;
}

.parcel-name {
    color: #9d9;
    font-size: 12px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.balance-display {
    color: #fc6;
    font-weight: 600;
    font-size: 13px;
}

#sl-time, .sl-time {
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    font-family: 'Consolas', 'Monaco', monospace !important;
    background: rgba(40, 60, 100, 0.8) !important;
    padding: 4px 12px !important;
    border-radius: 4px !important;
    border: 1px solid rgba(100, 150, 255, 0.5) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7) !important;
    display: inline-block !important;
    visibility: visible !important;
}

/* Hide location bar when not logged in */
.location-bar.hidden {
    display: none;
}

/* Responsive adjustments for location bar */
@media (max-width: 768px) {
    .location-bar {
        font-size: 11px;
        padding: 0 8px;
    }

    .parcel-name {
        display: none;
    }

    .location-right {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .location-bar {
        height: 22px;
        font-size: 10px;
    }

    .region-coords {
        display: none;
    }

    .balance-display {
        display: none;
    }
}

/**
 * Burger Menu Button - hidden by default, shown on mobile
 */
.burger-menu-btn {
    display: none !important;
}

@media (max-width: 600px) {
    /* Hide regular toolbar buttons on mobile */
    .toolbar-buttons {
        display: none !important;
    }

    /* Show burger menu button */
    .burger-menu-btn {
        display: flex !important;
        min-width: 44px;
        height: 44px;
        background: linear-gradient(135deg, rgba(80, 140, 220, 0.7) 0%, rgba(60, 100, 180, 0.8) 100%);
    }

    /* Expand chat section on mobile when burger is shown */
    .chat-bar-section {
        flex: 1;
        max-width: none;
    }
}

/**
 * Mobile Menu Popup Styles
 */
.mobile-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.mobile-menu-content {
    width: 100%;
    max-width: 100%;
    max-height: 70vh;
    background: linear-gradient(180deg, rgba(35, 45, 65, 0.98) 0%, rgba(25, 35, 50, 0.99) 100%);
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    border-top: 1px solid rgba(100, 150, 255, 0.3);
    overflow-y: auto;
    animation: slideUp 0.2s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.mobile-menu-close {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-close:hover {
    color: #ff6b6b;
}

.mobile-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 16px;
}

@media (max-width: 400px) {
    .mobile-menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.mobile-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background: rgba(60, 70, 90, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 4px;
}

.mobile-menu-item:hover,
.mobile-menu-item:active {
    background: rgba(80, 100, 140, 0.8);
    border-color: rgba(100, 150, 255, 0.5);
    transform: scale(1.02);
}

.mobile-menu-item .material-icons {
    font-size: 28px;
}

.mobile-menu-item span:last-child {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

/* Fullscreen button special styling */
#fullscreen-btn,
.mobile-menu-item[data-action="fullscreen"] {
    background: linear-gradient(135deg, rgba(100, 180, 100, 0.6) 0%, rgba(60, 140, 80, 0.7) 100%);
}

#fullscreen-btn:hover,
.mobile-menu-item[data-action="fullscreen"]:hover {
    background: linear-gradient(135deg, rgba(120, 200, 120, 0.7) 0%, rgba(80, 160, 100, 0.8) 100%);
}

/* Fullscreen active state */
#fullscreen-btn.fullscreen-active,
.mobile-menu-item[data-action="fullscreen"].fullscreen-active {
    background: linear-gradient(135deg, rgba(200, 100, 100, 0.7) 0%, rgba(160, 60, 60, 0.8) 100%);
}

#fullscreen-btn.fullscreen-active .material-icons,
.mobile-menu-item[data-action="fullscreen"].fullscreen-active .material-icons {
    /* Change icon to fullscreen_exit when active */
}