#canvasContainer {
    position: relative; /* ensure absolute children are relative to this */
    flex: 1;
    width: 100%;
    display: flex;
    overflow: hidden;
    box-sizing: border-box;
    flex-direction: column;
    margin: 0;
    max-width: 100vw;
    width: 100vw; /* full viewport width minus margins */
    padding: 0;
    justify-content: center; /* Center horizontally */
    align-items: center;     /* Center vertically */
}
canvas {
    display: block;
    height: 100% !important;
    width: 100% !important;
    border: 0;
    padding: 0;
}

/* info */


/* style_odm.css */

#info {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-size: 14px;
    max-width: 300px;
    z-index: 10;
    transition: all 0.3s ease; /* Smooth transition for padding/size */
}

#telescopeInfo {
    font-size: 11px;
}
#telescopeInfo th, #telescopeInfo td {
    text-align: left;
}
#telescopeInfo caption {
    font-size: 14px;
    color: white;
}

#infoToggleButton { 
    display: block;
    width: 100%;
    background: #444;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-weight: bold;
    margin-bottom: 5px;
}

#infoContent {
    overflow: hidden;
    max-height: 500px; /* Large enough to fit content */
    transition: max-height 0.3s ease-out, opacity 0.3s ease;
    opacity: 1;
}

/* Collapsed State */
#info.collapsed {
    padding-bottom: 5px;
    background: rgba(0, 0, 0, 0.5);
}

#info.collapsed #infoContent {
    max-height: 0;
    opacity: 0;
    pointer-events: none; /* Prevent clicking hidden elements */
}


/* Allow pointer events on interactive elements inside #info */

#info .toggle-label,
#info .switch {
    pointer-events: auto;
}

#loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px 40px;
    border-radius: 10px;
    font-size: 18px;
    z-index: 1000;
}
.hidden {
    display: none;
}
#controls {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px;
    border-radius: 5px;
    font-size: 12px;
}
#click-label {
    position: absolute;
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 30;
    transform: translate(-50%, -120%);
    display: none;
    pointer-events: auto; /* was none */
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    user-select: none;
}

/* Toggle switch container */
.switch {
    position: relative;
    display: inline-block;
    width: 25px;
    height: 12px;
}

/* Hide default checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #1b1b1b;
    transition: .4s;
    border-radius: 12px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 9px;
    width: 9px;
    left: 1px;
    bottom: 1.5px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #cccccc;
}

input:focus + .slider {
    box-shadow: 0 0 1px #cccccc;
}

input:checked + .slider:before {
    transform: translateX(13px);
}

/* Coordinate labels */

#latitude, #longitude, #altitude {
    font-family: monospace;
    font-size: 11px;
    line-height: 1.2;
    padding-right: 20px;
}

#coordinateLabel {
    visibility: hidden;
    display: none;
    pointer-events: auto;
    position: absolute; 
    z-index: 2000;
    background: rgba(0, 0, 0, 0.75);
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    pointer-events: auto;
    color: white;
    transform: 'translate(-50%, 1%)';
}

#coordinateLabelCloseButton {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #444444;
    color: red;
    border: none;
    border-radius: 3px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    line-height: 18px;
    font-weight: bold;
    padding: 0;
}

/* Telescope characteristics */

#telescopeLabel {
    visibility: hidden;
    display: none;
    pointer-events: auto;
    position: absolute; 
    z-index: 2000;
    background: rgba(0, 0, 0, 0.75);
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    pointer-events: auto;
    color: white;
    transform: 'translate(-50%, 1%)';
}

#telescopeInfoCloseButton {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #444444;
    color: red;
    border: none;
    border-radius: 3px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    line-height: 18px;
    font-weight: bold;
    padding: 0;
}
