/* ===========================================
   assets/css/pages/pdf-viewer.css
   SENTAM THEME - PDF VIEWER PAGE
   =========================================== */

html,
body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Header bar ─────────────────────────────── */
.header_view {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 48px;
    z-index: 10;
    background: #1a3a5c;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}

.header_view a {
    color: #fff;
    text-decoration: none;
    flex-shrink: 0;
}

/* ── Back button ────────────────────────────── */
.header_view .return {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.12);
    border-right: 1px solid rgba(255,255,255,0.15);
    transition: background 0.15s;
    position: relative;
}

.header_view .return:hover,
.header_view .return:focus {
    background: rgba(255,255,255,0.25);
    outline: none;
}

/* CSS-only left-arrow chevron — no icon font needed */
.header_view .return::before {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    border-left: 2.5px solid #fff;
    border-bottom: 2.5px solid #fff;
    transform: rotate(45deg) translateX(2px);
    border-radius: 1px;
}

/* Hide screen-reader text visually but keep accessible */
.header_view .return .pkp_screen_reader {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
}

/* ── Article title ──────────────────────────── */
.header_view .title {
    flex: 1;
    min-width: 0;
    padding: 0 0.75rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: #e8edf2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 48px;
}

.header_view .title:hover,
.header_view .title:focus {
    color: #fff;
    text-decoration: underline;
    outline: none;
}

@media (min-width: 600px) {
    .header_view .title {
        font-size: 0.9rem;
    }
}

/* ── Download button ────────────────────────── */
.header_view .download {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    height: 48px;
    padding: 0 1rem;
    background: rgba(255,255,255,0.12);
    border-left: 1px solid rgba(255,255,255,0.15);
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    transition: background 0.15s;
}

.header_view .download:hover,
.header_view .download:focus {
    background: rgba(255,255,255,0.25);
    outline: none;
}

/* CSS-only download arrow icon */
.header_view .download::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border-left: 2.5px solid #fff;
    border-bottom: 2.5px solid #fff;
    transform: rotate(-45deg) translateY(-2px);
    border-radius: 1px;
    flex-shrink: 0;
}

/* On small screens hide the text label, keep just the icon */
.header_view .download .label {
    display: none;
}

.header_view .download .pkp_screen_reader {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
}

@media (min-width: 500px) {
    .header_view .download .label {
        display: inline;
    }

    .header_view .download .pkp_screen_reader {
        display: none;
    }
}

/* ── PDF canvas container ───────────────────── */
.galley_view {
    position: fixed;
    top: 48px;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.galley_view iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* With outdated-version notice bar (2× header height above top) */
.galley_view.galley_view_with_notice {
    top: calc(48px * 3);
}

.galley_view_notice {
    position: fixed;
    top: 48px;
    left: 0;
    right: 0;
    height: calc(48px * 2);
    background: #c0392b;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9;
}

.galley_view_notice_message {
    color: #fff;
    font-weight: bold;
    text-align: center;
    width: 100%;
    padding: 0 1rem;
}

.galley_view_notice_message a {
    color: #fff;
    text-decoration: underline;
}
