/* Layout: shown in the viewer area (.viewer-mode-panel, viewerMode.js) */
#petct-content {
    flex: 1;
    min-height: 0;
    display: flex;
    background-color: black;
    position: relative;
    overflow: hidden;
}

#petct-series-prompt {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 600;
    padding: 12px 20px;
    background: rgba(43, 43, 45, 0.92);
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
    pointer-events: none;
}


/* Series names in the top left of the axial viewports. The dark background
   keeps them readable on the white PET background.
   :where() keeps the specificity low so .petct-vp-collapsed's absolute wins. */
:where(#petct-content) .vp-element {
    position: relative;
}

.petct-series-label {
    position: absolute;
    top: 5px;
    left: 5px;
    max-width: calc(100% - 10px);
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 12px;
    line-height: 1.45;
    pointer-events: none;
    z-index: 110;
    box-sizing: border-box;
}

.petct-series-label:empty {
    display: none;
}

.petct-series-label > div {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.petct-loading-overlay {
    z-index: 600;
}


.petct-pet-pill {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: rgba(43, 43, 45, 0.92);
    color: #00C5A0;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.04em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

.petct-pet-pill::before {
    content: '';
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(0, 197, 160, 0.25);
    border-top-color: #00C5A0;
    animation: vp-cache-spin 0.75s linear infinite;
}

.modal-footer-left {
    display: flex;
}

.modal-footer-right {
    display: flex;
}


/* Print styles - remove black backgrounds to save ink */
@media print {
    #petct-content {
        background-color: white !important;
    }
}

/* Single viewport mode (double-click a viewport), as in MPR.
   !important overrides the inline grid placement set in petCtFusion.js. */
.petct-single-viewport {
    grid-template-columns: 100% !important;
    grid-template-rows: 100% !important;
    position: relative;
}

.petct-single-viewport > .petct-vp-focused,
.petct-single-viewport > .petct-vp-collapsed {
    grid-column: 1 / -1 !important;
    grid-row: 1 / -1 !important;
}

/* Kept rendered (crosshairs / sync stay live) but invisible and inert.
   The grid placement reset above matters: an absolutely positioned grid item
   uses its grid area as containing block, and the inline placement of the
   2nd-row viewports (row 2 of a now 1-row grid) gave them ZERO height, so
   their crosshair lines could not be computed in the focused viewport. */
.petct-single-viewport > .petct-vp-collapsed {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    pointer-events: none;
    z-index: -1;
}
