/* Right Panel (Viewer Operations) */
.right-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: 100%;
    background-color: var(--panel-bg-color);
    color: white;
    padding: 15px;
    
    overflow: hidden; /* Prevents scrolling of the entire right panel */
}

.right-panel-orbit-view {
    position: sticky; /* Keeps it fixed inside right panel */
    top: 0;
    width: 100%;
    background: var(--panel-bg-color);
    z-index: 10;
    padding-bottom: 10px;
}

/* Ensure Each Section is Centered */
#viewManagerDiv {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

/* Set Views Container */
#viewCubeDiv {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    /* Space between buttons */
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    /* Subtle background */
    border-radius: 8px;
}

/* Set Views Table */
#viewCubeDiv table {
    border-collapse: collapse;
}

/* Set Views Buttons */
#viewCubeDiv button {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 5px;
    transition: background 0.3s ease-in-out;
}

/* Set Views Button Icons */
#viewCubeDiv button img {
    width: 40px;
    /* Adjust icon size */
    height: 40px;
    transition: transform 0.2s ease-in-out, filter 0.2s ease-in-out;
}

/* Hover Effect for Buttons */
#viewCubeDiv button:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Hover Effect for Icons */
#viewCubeDiv button:hover img {
    transform: scale(1.1);
    filter: brightness(1.2);
}

#viewCubeDiv{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

/* Tooltip Container */
.tooltip-btn {
    position: relative;
    display: inline-block;
}

/* Tooltip Text - Subtle & Clean */
.tooltip-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    left: -130%; /* Adjusts position to the left */
    top: 50%;
    transform: translateY(-50%);
    background: rgba(30, 30, 30, 0.9); /* Soft black background */
    color: #e0e0e0; /* Muted white */
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Soft shadow */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
    pointer-events: none; /* Ensures tooltip does not interfere */
}

/* Tooltip Arrow - Smooth & Minimal */
.tooltip-btn::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: transparent rgba(30, 30, 30, 0.9) transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in-out;
}

/* Show Tooltip on Hover - Smooth Fade */
.tooltip-btn:hover::after,
.tooltip-btn:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(-5px);
}


/* Active Button State - Subtle but Visible */
.active-button {
    background-color: rgba(1, 165, 191, 0.4); /* More visible than before */
    box-shadow: 0px 0px 8px rgba(1, 165, 191, 0.6); /* Slight glow */
    border: 1px solid rgba(1, 165, 191, 0.9); /* More defined outline */
}

/* Ripple Effect */
.ripple {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: scale(0);
    animation: rippleEffect 0.6s linear;
    pointer-events: none;
}

/* Ripple Animation */
@keyframes rippleEffect {
    from {
        transform: scale(0);
        opacity: 1;
    }
    to {
        transform: scale(3);
        opacity: 0;
    }
}

/* Ensure Buttons Have Relative Position */
#buttonDrawer button {
    position: relative;
    overflow: hidden;
}

/* Disabled Button Style - Except Active Button */
#buttonDrawer button:disabled:not(.active-button) {
    opacity: 0.6; /* Reduce opacity */
    cursor: not-allowed; /* Change cursor */
    filter: grayscale(70%); /* Make it look inactive */
}

#buttonDrawer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;

    overflow-y: auto; /* Enables vertical scrolling */
    max-height: calc(100vh - 180px); /* Adjust based on available space */
    
    padding-right: 10px; /* Ensures content stays within boundaries */
    width: 100%; /* Ensures full width */
    scrollbar-gutter: stable; /* Keeps scrollbar space reserved */
}

/* Customizing Scrollbar */
#buttonDrawer::-webkit-scrollbar {
    width: 2px; /* Standard scrollbar width */
}

#buttonDrawer::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.4); /* Semi-transparent for better visibility */
    border-radius: 4px;
}

#buttonDrawer::-webkit-scrollbar-track {
    background: transparent; /* Blends with the right panel */
}



/* Style for Measurement Control Buttons */
#buttonDrawer button {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 5px;
    transition: background 0.3s ease-in-out;
}

/* Style for Measurement Control Buttons */
#buttonDrawer button {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    /* border-radius: 5px; */
    transition: background 0.3s ease-in-out;
    background-color: #111011;
    border-radius: 50%;
}

/* SVG Icons Inside Buttons - Change Color to #01a5bf */
#buttonDrawer button img {
    width: 23px;
    /* Adjust icon size */
    height: 23px;
    filter: invert(46%) sepia(90%) saturate(598%) hue-rotate(146deg) brightness(96%) contrast(99%);
    transition: filter 0.3s ease-in-out, transform 0.2s ease-in-out;
}

/* Hover Effect */
#buttonDrawer button:hover img {
    transform: scale(1.1);
    filter: invert(46%) sepia(90%) saturate(598%) hue-rotate(146deg) brightness(120%) contrast(99%);
}

/* Tooltip Container */
#buttonDrawer .tooltip-container {
    position: relative;
    display: inline-block;
}

/* Tooltip Text - Left Center */
#buttonDrawer .tooltip-text {
    visibility: hidden;
    background: rgba(30, 30, 30, 0.95);
    color: white;
    text-align: center;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 5px;
    white-space: nowrap;
    position: absolute;
    right: 110%; /* Position tooltip to the left */
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.2s ease;
}

/* Show Tooltip on Hover */
#buttonDrawer .tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
    transform: translateY(-50%) translateX(-5px);
}

