﻿.photo-button img[src="assets/img/placeholder.jpg"] {
    background-color: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

/* Disable selection/drag only for logo and photo-button images */
.logo, .logo img, .photo-button img {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
}

body {
    background-color: #1a1a1a;
    color: white;
    overflow: hidden;
}

.container {
    display: flex;
    height: 100vh;
}

/* Left Panel Styles */
.left-panel {
    width: 200px;
    background-color: #222;
    height: 100vh;
    padding: 10px;
    overflow-y: auto;
    transition: transform 0.3s ease;
    position: relative;
}

.left-panel.collapsed {
    transform: translateX(-200px);
}

.logo {
    text-align: center;
    padding: 10px 0;
    border-bottom: 1px solid #444;
    margin-bottom: 15px;
}

.logo img {
    width: 80px;
    height: auto;
    margin-bottom: 5px;
}

.logo p {
    font-size: 12px;
    color: #ccc;
}

.photo-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.photo-button {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.photo-button:hover {
    box-shadow: 0 0 5px rgba(255,255,255,0.2);
}

.photo-button.active {
    box-shadow: 0 0 8px rgba(255,255,255,0.3);
}

.photo-button.selected {
    box-shadow: 0 0 8px rgba(224,105,0,0.7);
}

.photo-button.selected span {
    background-color: #003e7e;
}

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

.photo-button span {
    display: block;
    width: 100%;
    padding: 6px 5px;
    font-size: 10px;
    text-align: center;
    background-color: #333;
    color: white;
}

.panel-toggle {
    position: absolute;
    left: 200px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10001;
    transition: transform 0.3s ease;
}

.left-panel.collapsed + .panel-toggle {
    transform: translate(-200px, -50%);
}

.panel-toggle button {
    background-color: #444;
    color: white;
    border: 1px solid #666;
    border-left: none;
    width: 20px;
    height: 60px;
    cursor: pointer;
    box-shadow: 2px 0 5px rgba(0,0,0,0.3);
}

/* Main Content Area */
.main-content {
    flex: 1;
    padding: 20px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.page-title {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    z-index: 1000001;
}

.page-title h1 {
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 400;
    text-align: center;
    letter-spacing: 1px;
    color: #e0e0e0;
}

#webgl-container {
    background-color: #1a1a1a;
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}

/* Floating Windows */
.floating-window {
    position: absolute;
    background-color: rgba(0, 62, 126, 0.8); /* Set opacity to 0.8 as requested */
    border: 1px solid #0077cc;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    overflow: hidden;

}

.drillhole-info {
    bottom: calc(70px + 140px + 40px);
    left: 50px;
    width: 200px;
    height: auto;
    transform-origin: bottom left;
}

.legend-window {
    bottom: 70px;
    left: 50px;
    width: 200px;
    transform-origin: bottom left;
}

.layers-panel {
    bottom: 70px;
    right: 20px;
    width: 250px;
    max-height: 500px;
    overflow-y: auto;
    transform-origin: bottom right;
}

.window-header {
    background-color: #1d1d1d; /* Updated darker gray color */
    padding: 8px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: default;
    font-size: 12px;
    font-weight: bold;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 14px;
}

.window-content {
    padding: 14px;
    max-height: 500px;
    overflow-y: auto;
    font-size: 11px;
    color: #ddeeff; 
    background-color: rgba(0, 62, 126, 0.8); 

}

/* Drillhole Info Styles */
.window-content table {
    width: 100%;
    border-collapse: collapse;
}

.window-content table td {
    padding: 3px 0;
    font-size: 14px;
    vertical-align: top;
    white-space: nowrap;
}

.window-content table td:first-child {
    color: #66ccff;
    padding-right: 10px;
    width: 70px;
    text-align: right;
    white-space: nowrap;
}

.window-content table td:last-child {
    text-align: left;
    word-break: break-word;
}

.window-content table {
    width: 100%;
    table-layout: fixed;
}

.window-content table td:first-child {
    color: #66ccff;
    padding-right: 10px;
}

/* Legend Styles */
.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.color-box {
    width: 15px;
    height: 15px;
    margin-right: 12px;
    border-radius: 2px;
}

/* Layer Panel Styles */
.layer-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.layer-item {
    margin-bottom: 5px;
}

.layer-toggle {
    display: flex;
    align-items: center;
    padding: 3px 0;
    cursor: pointer;
    user-select: none;
    font-size: 11px;
    color: #e0e0e0;
}

.layer-toggle .eye {
    margin-right: 8px;
    font-size: 11px;
    opacity: 1;
    color: #00aaff;
}

.layer-toggle.inactive .eye {
    opacity: 0.3;
}

.layer-subitem {
    margin-left: 20px;
}

/* 3D Button Container */
.view3d-button-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
}

.view3d-button {
    background-color: white;
    color: #333;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.view3d-button img {
    width: 40px;
    height: 40px;
    object-fit: cover;
}

/* WebGL loading styles */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #121212;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: opacity 0.5s ease;
}

#logo {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #0067d1;
    letter-spacing: 2px;
}

#progress-container {
    width: 300px;
    height: 8px;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
}

#progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00ffc3, #0088ff);
    transition: width 0.2s ease;
}

/* WebGL container styles */
#webgl-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Changed from -1 to allow interaction */
    pointer-events: all;
}

#gameCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

#fullScreenButton {
    height: 40px;
    width: 40px;
    position: absolute;
    z-index: 1;
    bottom: 15px;
    right: 15px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Make sure other content appears above WebGL background */
.container {
    position: relative;
    z-index: 1;
    pointer-events: none; /* Allow clicks to pass through to WebGL */
}

/* But enable pointer events for interactive elements */
.left-panel, .panel-toggle, .floating-window, .view3d-button-container, .photo-button {
    pointer-events: auto;
}
.main-content {
    margin-left: 200px; 
}

.htmllightbox-content {
    background-color: rgba(20, 20, 20, 0.95) !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    padding: 24px !important;
    color: #f0f0f0 !important;
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

.layer-toggle .arrow {
    margin-left: -8px;
    margin-right: 2px;
    font-size: 10px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.layer-toggle.collapsed .arrow {
    transform: rotate(-90deg);
}

