.pdf-page-grid-instructions {
    display: none;
    width: 100%;
    text-align: center;
    font-size: 14px;
    color: var(--black);
    margin: 0 auto .5em;
}

.pdf-pages-to-remove-count {
    display: none;
    width: 100%;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    margin: .5em auto;
}

.pdf-page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1em;
    width: 100%;
    margin: 1em auto;
}

.pdf-page-card {
    position: relative;
    background-color: var(--white);
    border-radius: 5px;
    border: 2px solid transparent;
    padding: .5em;
    cursor: default;
}

.pdf-page-card:hover {
    border: 2px dotted var(--btn-link-blue);
    cursor: pointer;
}

.pdf-page-card canvas {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 3px;
}

.pdf-page-card-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1.3;
    background-color: var(--light-white);
    border-radius: 3px;
}

.pdf-page-number {
    text-align: center;
    font-size: 12px;
    margin-top: .25em;
}

/* selection (remove-pages / keep-pages tools) */
.pdf-page-select-toggle {
    position: absolute;
    top: .75em;
    right: .75em;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: var(--white);
    border: 2px solid var(--btn-link-blue);
    cursor: pointer;
    z-index: 1;
}

.pdf-page-card.pdf-page-selected {
    border: 2px solid var(--btn-link-blue);
}

.pdf-page-card.pdf-page-selected .pdf-page-select-toggle {
    background-color: var(--btn-link-blue);
}

.pdf-page-card.pdf-page-selected::after {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(31, 107, 255, .15);
    border-radius: 3px;
    pointer-events: none;
}

/* split points — overlaid on the card's right edge so it doesn't take its own grid cell */
.pdf-split-point-btn {
    position: absolute;
    top: 50%;
    right: -13px;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: var(--white);
    border: 1px solid var(--btn-link-blue);
    color: var(--btn-link-blue);
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.pdf-split-point-btn.pdf-split-point-active {
    background-color: var(--btn-link-blue);
    color: var(--white);
}

.pdf-split-summary {
    display: none;
    width: 100%;
    margin: 1em auto;
    font-size: 14px;
}

/* drag reorder */
.pdf-page-card.pdf-page-draggable {
    cursor: grab;
    transition: box-shadow .15s ease, opacity .15s ease;
}

.pdf-page-card.pdf-page-dragging {
    opacity: .5;
    cursor: grabbing;
}

/* insertion indicator — a line in the gap on the side the dragged page will land on, rather than an
   outline around the whole card, since dropping here inserts the page next to it instead of onto it */
.pdf-page-card.pdf-page-drag-over-before::before,
.pdf-page-card.pdf-page-drag-over-after::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 2px;
    background-color: var(--btn-link-blue);
    pointer-events: none;
}

.pdf-page-card.pdf-page-drag-over-before::before {
    left: -0.6em;
}

.pdf-page-card.pdf-page-drag-over-after::after {
    right: -0.6em;
}

.pdf-page-drag-handle {
    text-align: center;
    font-size: 12px;
    color: var(--btn-link-blue);
    margin-bottom: .25em;
    cursor: grab;
}

/* hover preview */
.pdf-page-preview {
    position: fixed;
    z-index: 1000;
    pointer-events: none;
    background-color: var(--white);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
    padding: .5em;
    opacity: 0;
    visibility: hidden;
    transform: scale(.96);
    transition: opacity .12s ease, transform .12s ease;
}

.pdf-page-preview.pdf-page-preview-visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.pdf-page-preview canvas {
    display: block;
    width: min(90vw, 700px);
    height: auto;
    max-height: 90vh;
    border-radius: 3px;
}

@media screen and (min-width: 968px) {
    .pdf-page-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1.5em;
    }
}

.pdf-blur-region-picker {
    margin: 2rem auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1em;
    width: 90%;
    max-width: 400px;
}

.pdf-blur-region-row {
    flex-basis: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1em;
}

.pdf-blur-region-label {
    flex-basis: 100%;
    text-align: left;
    font-size: 16px;
    font-weight: 600;
}
