.pdf-shortcode-library-single,
.pdf-shortcode-library-grid-wrap,
.pdf-shortcode-library-list-wrap {
    margin: 1.5em 0;
}

.pdf-shortcode-library-single-title,
.pdf-shortcode-library-grid-title {
    margin: 0 0 0.8em;
}

.pdf-shortcode-library-single-viewer {
    border: 1px solid #d8d8d8;
    border-radius: 12px;
    overflow: hidden;
    background: #f5f5f5;
}

.pdf-shortcode-library-grid {
    display: grid;
    gap: 18px;
}

.pdf-shortcode-library-card-front {
    border: 1px solid #d8d8d8;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.pdf-shortcode-library-card-preview {
    background: #f7f7f7;
    border-bottom: 1px solid #e3e3e3;
    padding: 12px;
}

.pdf-shortcode-library-card-content {
    padding: 10px 12px 12px;
}

.pdf-shortcode-library-card-content h4 {
    margin: 0 0 10px;
    line-height: 1.35;
    font-size: 16px;
}

.pdf-shortcode-library-card-number {
    font-size: 0.85em;
    opacity: 0.75;
    margin-bottom: 6px;
}

.pdf-shortcode-library-button {
    display: inline-block;
    text-decoration: none;
    border: 1px solid #111;
    padding: 8px 12px;
    border-radius: 10px;
    background: #fff;
    color: inherit;
    cursor: pointer;
    line-height: 1.2;
}

.pdf-shortcode-library-button-small {
    padding: 7px 10px;
    font-size: 14px;
}

.pdf-shortcode-library-single-actions {
    margin-top: 12px;
}

.pdf-shortcode-library-button-full {
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    border-radius: 10px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.pdf-shortcode-library-debug {
    padding: 12px 14px;
    border: 1px dashed #c4c4c4;
    border-radius: 10px;
    background: #fafafa;
    font-size: 14px;
}

.pdf-shortcode-library-front-form-wrap {
    margin: 1.5em 0;
    padding: 18px;
    border: 1px solid #d8d8d8;
    border-radius: 12px;
    background: #fff;
}

.pdf-shortcode-library-front-form-title {
    margin: 0 0 14px;
}

.pdf-shortcode-library-front-form label,
.pdf-shortcode-library-inline-edit-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.pdf-shortcode-library-front-form input[type="text"],
.pdf-shortcode-library-front-form input[type="number"],
.pdf-shortcode-library-front-form input[type="file"],
.pdf-shortcode-library-inline-edit-form input[type="text"],
.pdf-shortcode-library-inline-edit-form input[type="number"],
.pdf-shortcode-library-inline-edit-form input[type="file"] {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.pdf-shortcode-library-front-form small,
.pdf-shortcode-library-inline-edit-form small {
    display: block;
    margin-top: 6px;
    opacity: 0.75;
}

.pdf-shortcode-library-current-file a {
    margin-left: 6px;
}

.pdf-shortcode-library-front-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
}

.pdf-shortcode-library-button-secondary {
    border-color: #bdbdbd;
}

.pdf-shortcode-library-notice {
    margin: 1em 0;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #d8d8d8;
}

.pdf-shortcode-library-notice-success {
    background: #f4fbf4;
    border-color: #b8d7b8;
}

.pdf-shortcode-library-notice-error {
    background: #fff5f5;
    border-color: #e0b8b8;
}

.pdf-shortcode-library-list {
    border-top: 1px solid #e2e2e2;
}

.pdf-shortcode-library-list-item {
    border-bottom: 1px solid #e2e2e2;
    padding: 14px 0;
}

.pdf-shortcode-library-list-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.pdf-shortcode-library-list-main {
    min-width: 0;
    flex: 1 1 auto;
}

.pdf-shortcode-library-list-title {
    display: inline-block;
    text-decoration: none;
    font-weight: 600;
    line-height: 1.4;
}

.pdf-shortcode-library-list-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pdf-shortcode-library-list-shortcode-text {
    display: inline-block;
    max-width: 100%;
    padding: 6px 10px;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    background: #fafafa;
    font-size: 14px;
    line-height: 1.3;
    white-space: nowrap;
    cursor: text;
    user-select: all;
    -webkit-user-select: all;
    box-sizing: border-box;
}

.pdf-shortcode-library-list-actions {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-shrink: 0;
}

.pdf-shortcode-library-edit-details {
    display: block;
}

.pdf-shortcode-library-edit-details summary {
    list-style: none;
}

.pdf-shortcode-library-edit-details summary::-webkit-details-marker {
    display: none;
}

.pdf-shortcode-library-inline-delete-form {
    margin: 0;
}

.pdf-shortcode-library-inline-edit-wrap {
    margin-top: 12px;
    padding: 14px;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    background: #fafafa;
    min-width: min(640px, 90vw);
}

.pdf-shortcode-library-inline-edit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.pdfsl-viewer {
    width: 100%;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f3f3;
}

.pdfsl-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
    background: #ececec;
    border-bottom: 1px solid #d7d7d7;
    flex-wrap: wrap;
}

.pdfsl-tool-button {
    border: 1px solid #bdbdbd;
    background: #fff;
    border-radius: 6px;
    padding: 3px 8px;
    line-height: 1.2;
    cursor: pointer;
}

.pdfsl-tool-button[disabled] {
    opacity: 0.45;
    cursor: default;
}

.pdfsl-tool-separator {
    width: 1px;
    height: 20px;
    background: #cfcfcf;
    margin: 0 2px;
}

.pdfsl-page-display,
.pdfsl-zoom-display {
    min-width: 52px;
    text-align: center;
    font-size: 14px;
}

.pdfsl-canvas-shell {
    position: relative;
    background: #e9e9e9;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 12px;
    overflow: auto;
}

.pdfsl-canvas-shell-single {
    min-height: 420px;
}

.pdfsl-canvas-shell-grid {
    min-height: 220px;
}

.pdfsl-canvas {
    display: block;
    max-width: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    background: #fff;
}

.pdfsl-loading,
.pdfsl-error {
    font-size: 14px;
    padding: 12px;
}

.pdfsl-error {
    color: #9b1c1c;
}

@media (max-width: 782px) {
    .pdf-shortcode-library-list-row {
        flex-direction: column;
    }

    .pdf-shortcode-library-list-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .pdf-shortcode-library-inline-edit-wrap {
        min-width: 0;
    }

    .pdf-shortcode-library-inline-edit-grid {
        grid-template-columns: 1fr;
    }
}

.pdfsl-canvas-shell.pdfsl-has-page {
    min-height: 0 !important;
    height: auto !important;
}

.pdfsl-canvas-shell-single.pdfsl-has-page,
.pdfsl-canvas-shell-grid.pdfsl-has-page {
    min-height: 0 !important;
}


.pdfsl-viewer-frame {
    background: #f1f1f1;
    border: 1px solid #d9d9d9;
    border-radius: 10px;
    overflow: hidden;
}

.pdfsl-iframe {
    display: block;
    width: 100%;
    background: #fff;
}

.pdf-shortcode-library-card-preview .pdfsl-viewer-frame {
    border-radius: 8px;
}
