.viewport {
    width: 100%;
    height: 100%;
}

.viewport-wrapper {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 24px;
    width: 100%;
    height: 100%;
    background: #111;
    padding: 4px;
    border-radius: 4px;
}

/* Progress Overlay Styles */
.progress-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    pointer-events: none;
}

.progress-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(31, 35, 39, 0.95);
    border-radius: 8px;
    border: 1px solid rgba(185, 188, 192, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.progress-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top-color: #00c5a0;
    border-radius: 50%;
    animation: progress-spin 1s linear infinite;
}

@keyframes progress-spin {
    to {
        transform: rotate(360deg);
    }
}

.progress-text {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.progress-bar-container {
    width: 180px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00c5a0 0%, #9ed3c9 100%);
    border-radius: 3px;
    transition: width 0.3s ease-out;
    box-shadow: 0 0 8px rgba(74, 255, 219, 0.5);
}

/* Existing spinner - keep for initial loading */
.spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    width: 50px;
    height: 50px;
    border: 6px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: quantidos-spin 1s linear infinite;
    display: none;
}

@keyframes quantidos-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* for myelin, fat fraction and osteoporosis */
.quantidos-grid-2x1 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    width: 100%;
    height: 100%;
}

/* Container for a label + input pair */
.toolbar-input-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-right: 8px;
}

/* Compact label */
.toolbar-input-group label {
    font-size: 10px;
    margin: 0 0 2px 0;
    line-height: 1.1;
}

/* Compact number input */
.toolbar-input-group input {
    width: 40px;
    height: 24px;
    font-size: 12px;
    padding: 2px 4px;
    border-radius: 3px;
    border: 1px solid #b9bcc0;
    background-color: #1f2327;
    color: #b9bcc0;
}

/* for hemosiderosis */
.quantidos-grid-3x1 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    width: 100%;
    height: 100%;
}

/* μR module shown in the viewer area (.viewer-mode-panel, viewerMode.js) */
.quantidos-mode-content {
    flex: 1;
    min-height: 0;
    display: flex;
    background-color: black;
    overflow: hidden;
}

/* Image info toggle in the μR toolbar (quantidosToolbar.js) */
.quantidos-info-hidden .quantidos-mode-content .overlay-tl,
.quantidos-info-hidden .quantidos-mode-content .overlay-tr,
.quantidos-info-hidden .quantidos-mode-content .overlay-bl {
    display: none;
}

.quantidos-cell {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.modal-footer-left,
.modal-footer-right {
    display: flex;
}

.close-button {
    color: rgb(218, 218, 218);
}

/* Colorbar Container*/
.colorbar-container {
    position: relative;
    min-width: 20px;
}
