/* ── View Picture Popup (ENG-5918) ─────────────────────────────────────── */

/* Angular Material dialog container override */
.md-dialog-container .vpp-overlay,
.vpp-overlay {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 80vw;
    max-width: 1200px;
    height: 85vh;
    background: #1a1a1a;
    border-radius: 4px;
    overflow: hidden;
    outline: none;
}

/* ── Close button ──────────────────────────────────────────────────────── */
.vpp-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    font-size: 16px;
    transition: background 0.2s;
}

.vpp-close:hover,
.vpp-close:focus {
    background: rgba(255, 255, 255, 0.3);
    outline: 2px solid #fff;
}

/* ── Image area ────────────────────────────────────────────────────────── */
.vpp-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 48px 16px 8px;
}

.vpp-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: default;
    user-select: none;
}

/* fit-to-screen : CSS constraint, scale() inactive */
.vpp-image.vpp-fit {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
}

/* ── Error state ───────────────────────────────────────────────────────── */
.vpp-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 15px;
    text-align: center;
    padding: 24px;
}

.vpp-error .fas {
    font-size: 40px;
    color: #e57373;
}

/* ── Toolbar ───────────────────────────────────────────────────────────── */
.vpp-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.55);
    flex-shrink: 0;
}

.vpp-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
    padding: 0;
}

.vpp-btn:hover:not([disabled]),
.vpp-btn:focus:not([disabled]) {
    background: rgba(255, 255, 255, 0.15);
    outline: 2px solid rgba(255, 255, 255, 0.5);
}

.vpp-btn[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
}

/* separator between rotate and zoom */
.vpp-rotate {
    margin-right: 12px;
    border-right: 1px solid rgba(255, 255, 255, 0.25);
    padding-right: 16px;
    width: auto;
    gap: 0;
}

/* ── Zoom bar ──────────────────────────────────────────────────────────── */
.vpp-zoom-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vpp-slider {
    width: 160px;
    accent-color: #4db6e8;
    cursor: pointer;
}

.vpp-pct {
    display: flex;
    align-items: center;
    gap: 2px;
    color: #fff;
    font-size: 13px;
}

.vpp-pct input[type="number"] {
    width: 52px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: #fff;
    text-align: center;
    font-size: 13px;
    padding: 3px 4px;
    -moz-appearance: textfield;
}

.vpp-pct input[type="number"]::-webkit-outer-spin-button,
.vpp-pct input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.vpp-pct input[type="number"]:focus {
    outline: 2px solid #4db6e8;
    background: rgba(255, 255, 255, 0.2);
}
