/* Protected PDF viewer: styled to sit in visually for the native browser
   toolbar it replaces, but with only view/zoom controls — no download,
   print, or "more options" affordance exists to style in the first place. */

.ppv-root {
    display: flex;
    flex-direction: column;
    background: #2b2b2f;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--glass-border, rgba(255,255,255,0.12));
    user-select: none;
    -webkit-user-select: none;
}

.ppv-mode-embed { height: 750px; }
.ppv-mode-full { height: 100vh; border-radius: 0; border: none; }

.ppv-toolbar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 1rem;
    background: #323236;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 0.85rem;
    color: #d4d4d8;
}

.ppv-title {
    font-weight: 600;
    color: #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ppv-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
}

.ppv-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.18);
    color: #e4e4e7;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color .15s ease, background .15s ease;
}

.ppv-btn:hover { border-color: #8b8b94; background: rgba(255,255,255,0.06); }

.ppv-zoom, .ppv-page {
    min-width: 42px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    color: #b8b8be;
}

.ppv-divider {
    width: 1px;
    height: 18px;
    background: rgba(255,255,255,0.15);
    margin: 0 0.25rem;
}

.ppv-viewport {
    flex: 1 1 auto;
    overflow: auto;
    background: #1c1c1f;
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ppv-pages {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.ppv-page {
    box-shadow: 0 8px 24px rgba(0,0,0,0.45);
    border-radius: 4px;
    overflow: hidden;
    line-height: 0;
}

.ppv-page canvas {
    display: block;
    pointer-events: none; /* belt-and-braces: no drag/save gesture reaches the canvas */
}

.ppv-error {
    color: #d4d4d8;
    padding: 3rem 1.5rem;
    text-align: center;
    font-size: 0.95rem;
}

@media print {
    .ppv-root::before {
        content: 'This document is view-only and cannot be printed from here.';
        display: block;
        padding: 3rem 1.5rem;
        text-align: center;
        color: #000;
        font-family: sans-serif;
    }
    .ppv-toolbar, .ppv-viewport { display: none !important; }
}

@media (max-width: 700px) {
    .ppv-mode-embed { height: 520px; }
}
