.jb-pdf-widget {
    display: flex;
}

.jb-pdf-widget-empty {
    padding: 14px 16px;
    border: 1px dashed #c7c7c7;
    border-radius: 10px;
    color: #666;
    background: #fafafa;
}

.jb-pdf-thumb-trigger,
.jb-pdf-thumb-trigger:hover,
.jb-pdf-thumb-trigger:focus,
.jb-pdf-thumb-trigger:active {
    position: relative;
    z-index: 2;
    display: block;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    outline: 0;
    background: transparent !important;
    box-shadow: none !important;
    cursor: pointer;
    text-align: inherit;
    line-height: 0;
    overflow: hidden;
    -webkit-appearance: none;
    appearance: none;
    touch-action: manipulation;
}

.jb-pdf-thumb-trigger::after {
    content: none !important;
    display: none !important;
}

.jb-pdf-thumb-media,
.jb-pdf-thumb-image,
.jb-pdf-thumb-fallback,
.jb-pdf-thumb-canvas {
    display: block;
    width: 100%;
    height: auto;
    background: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.jb-pdf-thumb-image {
    object-fit: contain;
}

.jb-pdf-thumb-fallback {
    position: relative;
    overflow: hidden;
}

.jb-pdf-thumb-canvas {
    background: #fff !important;
}

.jb-pdf-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(14, 14, 16, 0.68);
    z-index: 2147483646;
}

.jb-pdf-modal.is-open {
    display: flex;
}

.jb-pdf-dialog {
    width: min(96vw, 1180px);
    max-height: 94vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.32);
}

.jb-pdf-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-bottom: 1px solid #eceff3;
    background: #fff;
}

.jb-pdf-toolbar-left {
    min-width: 0;
    flex: 1 1 auto;
}

.jb-pdf-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.jb-pdf-modal-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jb-pdf-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #dde3ea;
    border-radius: 10px;
    background: #fff;
    color: #111827;
    box-shadow: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}

.jb-pdf-tool-btn:hover,
.jb-pdf-tool-btn:focus-visible {
    background: #f6f8fa;
    border-color: #cfd7df;
}

.jb-pdf-close {
    font-size: 28px;
}

.jb-pdf-zoom-level {
    min-width: 58px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.jb-pdf-viewer-shell {
    position: relative;
    overflow: auto;
    background: #f5f7fa;
    padding: 18px;
}

.jb-pdf-loading,
.jb-pdf-error {
    font-size: 14px;
    color: #374151;
    padding: 18px 8px;
}

.jb-pdf-error {
    color: #b91c1c;
}

.jb-pdf-viewer {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: center;
}

.jb-pdf-page {
    display: flex;
    justify-content: center;
    width: 100%;
}

.jb-pdf-page canvas {
    display: block;
    background: #fff;
    box-shadow: 0 3px 18px rgba(0, 0, 0, 0.08);
    max-width: 100%;
    height: auto;
    border: 0;
}

body.jb-pdf-lock {
    overflow: hidden;
}

@media (max-width: 767px) {
    .jb-pdf-modal {
        padding: 10px;
    }

    .jb-pdf-dialog {
        width: 100%;
        max-height: 96vh;
        border-radius: 12px;
    }

    .jb-pdf-toolbar {
        padding: 10px;
        gap: 10px;
        flex-wrap: wrap;
    }

    .jb-pdf-toolbar-left {
        flex: 1 1 100%;
        order: 2;
    }

    .jb-pdf-toolbar-right {
        width: 100%;
        justify-content: flex-end;
        order: 1;
    }

    .jb-pdf-tool-btn {
        width: 38px;
        height: 38px;
    }

    .jb-pdf-viewer-shell {
        padding: 10px;
    }
}
