/* Sci-Fi HUD Loader Styles */
#progressDiv.active,
#progressDiv.visible,
#progressDiv.animating {
    background: transparent !important;
    backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    /* Tech font */
    padding: 0 !important;

    /* Compact Modal Positioning */
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 360px !important;
    height: 480px !important;
    margin: 0 !important;
    max-width: none !important;
    max-height: none !important;
    z-index: 9999 !important;
    overflow: visible !important;
}

#progressDiv,
#progressDiv .image.content {
    background: transparent !important;
    border: dark !important;
    /* Semantic UI Reset */
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

#progressDiv .image.content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* HUD Container - Scaled Down (~60%) */
.hud-container {
    position: relative;
    width: 240px;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}

/* Rotating Decorative Rings */
.hud-ring-outer {
    position: absolute;
    width: 230px;
    height: 230px;
    border: 2px dashed rgba(4, 166, 192, 0.2);
    border-radius: 50%;
    animation: rotateRight 20s linear infinite;
}

.hud-ring-inner {
    position: absolute;
    width: 160px;
    height: 160px;
    border: 1px solid rgba(242, 113, 28, 0.3);
    border-radius: 50%;
    border-left-color: transparent;
    border-right-color: transparent;
    animation: rotateLeft 10s linear infinite;
}

/* Central Progress Readout */
.hud-center-text {
    z-index: 10;
    text-align: center;
    color: #fff;
    text-shadow: 0 0 10px rgba(4, 166, 192, 0.8);
}

.hud-percent-large {
    font-size: 32px;
    font-weight: bold;
    color: #04a6c0;
    display: block;
}

.hud-status-text {
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #f2711c;
    margin-top: 5px;
}

/* Hidden Semantic UI Bars (Logic Keepers) */
.ui.indicating.progress {
    display: none !important;
}

/* Visual Progress Circles (SVG) */
.progress-ring-svg {
    transform: rotate(-90deg);
    position: absolute;
    width: 100%;
    height: 100%;
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.35s;
    transform-origin: 50% 50%;
    stroke-linecap: round;
    /* Neon Glow Effect */
    filter: drop-shadow(0 0 5px currentColor);
}

/* Specific Rings */
.ring-model {
    stroke: #04a6c0;
    opacity: 0.9;
    color: #04a6c0;
    /* For drop-shadow currentColor */
}

.ring-align {
    stroke: #f2711c;
    opacity: 0.9;
    color: #f2711c;
}

.ring-measure {
    stroke: #21ba45;
    opacity: 0.9;
    color: #21ba45;
}

/* Animations */
@keyframes rotateRight {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes rotateLeft {
    from {
        transform: rotate(360deg);
    }

    to {
        transform: rotate(0deg);
    }
}

/* Cancel Button */
/* Cancel Button - Minimalist Text Link */
#ID_BUTTON_cancel {
    position: absolute;
    bottom: 20px;
    background: transparent !important;
    border: none !important;
    color: rgba(255, 68, 68, 0.6);
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 10px;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: underline;
    text-underline-offset: 5px;
    box-shadow: none !important;
}

#ID_BUTTON_cancel:hover {
    color: #ff4444;
    text-shadow: 0 0 8px rgba(255, 68, 68, 0.4);
}



/* Step Indicators (small dots/text at bottom) */
.hud-steps {
    position: absolute;
    bottom: 80px;
    display: flex;
    gap: 15px;
}



.hud-step {
    font-size: 9px;
    color: #555;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 4px;
}

.hud-step.active {
    color: #04a6c0;
    text-shadow: 0 0 5px #04a6c0;
}

.hud-step-dot {
    width: 4px;
    height: 4px;
    background: #333;
    border-radius: 50%;
}

/* HUD Focus Mode - Isolation Logic */
body.hud-focus-mode #statusDiv,
body.hud-focus-mode #warningDiv,
body.hud-focus-mode .ui.fluid.orange.message,
body.hud-focus-mode #ID_DIV_rendering_msg {
    display: none !important;
}

body.hud-focus-mode #meshmixerSidebar,
body.hud-focus-mode .right-sidebar,
body.hud-focus-mode .sidebar-toggle-btn,
body.hud-focus-mode #ID_DIV_top_bar {
    opacity: 0.4 !important;
    filter: blur(1px);
    pointer-events: none !important;
    transition: all 0.5s ease;
}

/* Remove active highlights from buttons in Focus Mode to resolve competition */
body.hud-focus-mode .ui.button.active,
body.hud-focus-mode .ui.button:focus,
body.hud-focus-mode #meshmixerSidebar .sidebar-item button {
    background: transparent !important;
    box-shadow: none !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
}

/* Ensure the progress modal and its contents are NOT dimmed */
/* #progressDiv {
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 10000 !important;
} */