.pdf-dialog {
    padding: 0;
    border: 0;
    border-radius: 2.5rem;
    background: var(--bg-white);
    color: var(--text);
    max-width: min(72rem, calc(100vw - 1.6rem));
    width: 100%;
    height: min(48rem, calc(100dvh - 1.6rem));
    max-height: calc(100dvh - 1.6rem);
    overflow: hidden;
    box-shadow: 0 20px 40px -15px rgba(10, 61, 36, 0.05);
}

.pdf-dialog[open] {
    display: flex;
    flex-direction: column;
}

.pdf-dialog__inner {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
}

.pdf-dialog__head {
    flex: none;
    gap: 0.8rem;
    padding: 1.8rem 1.8rem 0;
}


.pdf-dialog__download[hidden] {
    display: none !important;
}

.pdf-dialog__download:hover svg path {
    fill: var(--text) !important;
}

.pdf-dialog__close:focus{
    outline: none !important;
}

.pdf-dialog__close {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    line-height: 1;
    cursor: pointer;
    margin-left: auto;
}

.pdf-dialog__close:hover {
    color: var(--text);
}

.pdf-dialog__body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0 1rem 1rem;
    overflow: auto;
    overscroll-behavior: contain;
}

.pdf-dialog__body .dflip,
.pdf-dialog__body ._df_book,
.pdf-dialog__body .df-container,
.pdf-dialog__body iframe {
    width: 100%;
    max-width: 100%;
}

.pdf-dialog__loader {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.55);
}

.pdf-dialog.is-loading .pdf-dialog__loader {
    display: flex;
}

.pdf-dialog.is-loading .pdf-dialog__body {
    opacity: 0.15;
    filter: blur(2px);
    pointer-events: none;
}

.pdf-dialog__error {
    position: absolute;
    left: 1.2rem;
    right: 1.2rem;
    bottom: 1.2rem;
    margin: 0;
    padding: 0.8rem 1rem;
    border-radius: 1rem;
    background: var(--bg-white);
    color: var(--alert);
    font-size: 0.8rem;
}

.pdf-dialog__error[hidden] {
    display: none;
}

.pdf-dialog__body ._df_book {
    height: 100% !important;
}

.df-ui-btn.df-active,
.df-ui-btn:hover {
    color: var(--brand) !important;
    /* background-color: var(--bg-white) !important; */
}

.df-icon-print {
    display: none !important;
}

.pdf-dialog__body .df-ui-nav .df-ui-btn:before {
    filter: drop-shadow(0 0 3px rgb(0, 0, 0)) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.8rem;
    height: 1.8rem;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--bg-white);
    color: var(--brand);
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, opacity 0.3s ease;
    content: '' !important;
    background-position: center;
    background-repeat: no-repeat;
}

.df-icon-arrow-right1:before {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none"><path d="M10.0656 6.25H0V5.41667H10.0656L5.23875 0.589792L5.83333 0L11.6667 5.83333L5.83333 11.6667L5.23875 11.0769L10.0656 6.25Z" fill="%23111814"></path></svg>') !important;
}


.df-icon-arrow-left1:before {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none"><path d="M1.601 6.25H11.6666V5.41667H1.601L6.42788 0.589792L5.83329 0L-4.12464e-05 5.83333L5.83329 11.6667L6.42788 11.0769L1.601 6.25Z" fill="%23111814"></path></svg>') !important;}


@media (max-width: 768px) {
    dialog.pdf-dialog {
        width: 100%;
        max-width: 100%;
        margin: auto 0 0;
        border-radius: 2.5rem 2.5rem 0 0;
        height: min(92dvh, 100%);
        max-height: min(92dvh, 100%);
        will-change: transform, opacity;
    }

    .pdf-dialog__head {
        padding: var(--space-5) var(--space-5) 0;
    }

    .pdf-dialog__body {
        padding: 0 var(--space-5) var(--space-5);
    }
}