

.pdf-kiosk-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 28px 22px;
    margin: 0;
    justify-content: flex-start;
    width: 100%;
}

.pdf-kiosk-item {
    text-decoration: none;
    color: #111;
    display: block;
    flex: 0 1 calc((100% - ((var(--pdf-kiosk-columns, 4) - 1) * 22px)) / var(--pdf-kiosk-columns, 4));
    max-width: calc((100% - ((var(--pdf-kiosk-columns, 4) - 1) * 22px)) / var(--pdf-kiosk-columns, 4));
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
}

.pdf-kiosk-cover {
    width: 100%;
    max-width: 240px;
    height: clamp(220px, 24vw, 300px);
    border: 1px solid #d8d8d8;
    border-radius: 6px;
    overflow: hidden;
    background: #f4f4f4;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    margin-left: auto;
    margin-right: auto;
}

.pdf-kiosk-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdf-kiosk-title {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 600;
    color: #111;
    text-align: center;
}

.pdf-kiosk-empty {
    width: 100%;
    margin: 0;
}

.pdf-kiosk-wrap.is-editor-preview .pdf-kiosk-item {
    pointer-events: none;
    cursor: default;
}

.pdf-kiosk-wrap.is-editor-preview .pdf-kiosk-grid {
    display: flex;
    gap: 1em;
}

.pdf-kiosk-wrap.is-editor-preview .pdf-kiosk-item {
    flex: 0 1 calc((100% - ((var(--pdf-kiosk-columns, 4) - 1) * 1em)) / var(--pdf-kiosk-columns, 4));
    max-width: calc((100% - ((var(--pdf-kiosk-columns, 4) - 1) * 1em)) / var(--pdf-kiosk-columns, 4));
    width: auto;
    margin: 0;
}

.pdf-kiosk-wrap.is-editor-preview .pdf-kiosk-cover {
    max-width: 100%;
    /* height: clamp(150px, 16vw, 220px); */
    height: auto;
}

.pdf-kiosk-fallback-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #f2f2f2, #d6d6d6);
    color: #1e1e1e;
    font-weight: 700;
    text-align: center;
    padding: 16px;
    box-sizing: border-box;
}

.pdf-single-viewer-wrap {
    margin: 0;
    display: flex;
    justify-content: center;
}

.pdf-single-viewer-iframe {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    height: 100vh;
    border: 0;
    border-radius: 0;
    display: block;
    background: #fff;
}

.wp-block-pdf-viewer-single.alignwide .pdf-single-viewer-iframe,
.wp-block-pdf-viewer-single.alignfull .pdf-single-viewer-iframe {
    width: 100%;
}

.pdf-single-editor-preview {
    width: 100%;
}

.pdf-single-editor-preview .pdf-single-viewer-wrap {
    margin: 0;
}

.pdf-single-editor-preview .pdf-single-viewer-iframe {
    aspect-ratio: 4 / 3;
    width: 100%;
    height: auto;
    min-height: 620px;
    max-height: 80vh;
}

.pdf-single-editor-preview-standard {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.pdf-single-editor-preview-wide {
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
}

.pdf-single-editor-preview-full {
    max-width: none;
}

.pdf-single-viewer-iframe.is-editor-preview {
    pointer-events: none;
}

.pdf-single-empty {
    margin: 0;
    padding: 12px 14px;
    border: 1px dashed #b9b9b9;
    border-radius: 6px;
}

@media (max-width: 980px) {
    .pdf-kiosk-grid {
        gap: 24px 16px;
    }

    .pdf-kiosk-item {
        flex-basis: calc((100% - (2 * 16px)) / 3);
        max-width: calc((100% - (2 * 16px)) / 3);
    }
}

@media (max-width: 781px) {
    .pdf-kiosk-grid {
        gap: 20px 14px;
    }

    .pdf-kiosk-item {
        flex-basis: calc((100% - 14px) / 2);
        max-width: calc((100% - 14px) / 2);
    }

    .pdf-single-viewer-iframe {
        min-height: 100vh;
    }
}
