/* ============================================================
   PENCIL Download Button — pencil-download-button.css
   ============================================================ */

/* ── Unavailable message ─────────────────────────────────── */
.pencil-file-unavailable {
    font-size: 14px;
    color: #888;
    font-style: italic;
    margin: 8px 0;
}

/* ── Button ─────────────────────────────────────────────── */
.pencil-download-wrap {
    display: inline-block;
    margin: 12px 0;
}

.pencil-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: #467ff7;
    color: #ffffff;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: none;
}

.pencil-download-btn:hover,
.pencil-download-btn:focus-visible,
.pencil-download-btn:active {
    background-color: #467ff7;
    color: #ffffff;
}

/* ── Overlay ─────────────────────────────────────────────── */
.pencil-pdf-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    /* Animate in */
    animation: pencilFadeIn 0.2s ease;
}

.pencil-pdf-overlay[hidden] {
    display: none;
}

@keyframes pencilFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Modal shell ─────────────────────────────────────────── */
.pencil-pdf-modal {
    position: relative;
    width: 100%;
    max-width: 960px;
    height: 90vh;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
}

/* ── Close button ────────────────────────────────────────── */
.pencil-pdf-close {
    position: absolute;
    top: 10px;
    right: 14px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease;
}

.pencil-pdf-close:hover,
.pencil-pdf-close:focus-visible {
    background: rgba(0, 0, 0, 0.9);
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* ── iframe ──────────────────────────────────────────────── */
.pencil-pdf-iframe {
    flex: 1;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
    .pencil-pdf-modal {
        height: 95vh;
        border-radius: 4px;
    }

    .pencil-download-btn {
        width: 100%;
        justify-content: center;
    }
}

