/* ==========================================================
   QANOON MARKAZ
   PDF & DOCUMENT TOOLS
   COMPLETE CSS
   ========================================================== */

.qm-pdf-tools-page {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 20px;
    color: #222;
}

.qm-pdf-tools-page *,
.qm-pdf-tools-page *::before,
.qm-pdf-tools-page *::after {
    box-sizing: border-box;
}

/* ==========================================================
   TOP ADVERTISEMENT
   ========================================================== */

.qm-pdf-tools-ad {
    width: 100%;
    min-height: 90px;
    margin: 0 0 25px;
    border: 1px dashed #b8b8b8;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #888;
    font-size: 14px;
}

.qm-pdf-tools-ad span {
    display: block;
}

/* ==========================================================
   HEADER
   ========================================================== */

.qm-pdf-tools-header {
    width: 100%;
    margin-bottom: 28px;
    text-align: center;
}

.qm-pdf-tools-header h1 {
    margin: 0 0 10px;
    color: #000e36;
    font-size: 32px;
    line-height: 1.25;
    font-weight: 700;
}

.qm-pdf-tools-header > p {
    max-width: 900px;
    margin: 0 auto 18px;
    color: #666;
    font-size: 15px;
    line-height: 1.7;
}

/* ==========================================================
   PRIVACY NOTICE
   ========================================================== */

.qm-pdf-tools-privacy {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 13px 18px;
    border-left: 4px solid #e0a800;
    border-radius: 5px;
    background: #fff9e8;
    color: #555;
    font-size: 14px;
    line-height: 1.7;
    text-align: left;
}

.qm-pdf-tools-privacy strong {
    color: #000e36;
}

/* ==========================================================
   TOOL GRID
   ========================================================== */

.qm-pdf-tools-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 30px;
}

/* ==========================================================
   TOOL CARD
   ========================================================== */

.qm-pdf-tool-card {
    width: 100%;
    min-width: 0;
    min-height: 220px;
    padding: 22px 16px;
    border: 1px solid #dedede;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.qm-pdf-tool-card:hover {
    transform: translateY(-3px);
    border-color: #e0a800;
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.10);
}

/* ==========================================================
   TOOL ICON
   ========================================================== */

.qm-pdf-tool-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 13px;

    border-radius: 50%;
    background: #000e36;
    color: #fff;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 27px;
    line-height: 1;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.qm-pdf-tool-card:hover .qm-pdf-tool-icon {
    background: #e0a800;
    color: #000e36;
}

/* ==========================================================
   TOOL CARD HEADING
   ========================================================== */

.qm-pdf-tool-card h2 {
    width: 100%;
    margin: 0 0 8px;

    color: #000e36;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 700;
}

/* ==========================================================
   TOOL CARD DESCRIPTION
   ========================================================== */

.qm-pdf-tool-card p {
    width: 100%;
    margin: 0 0 15px;

    color: #777;
    font-size: 13px;
    line-height: 1.55;
}

/* ==========================================================
   TOOL CARD BUTTON
   IMPORTANT: EXISTING PHP CLASS
   ========================================================== */

.qm-pdf-tool-button {
    min-height: 40px;
    padding: 9px 17px;

    border: 0;
    border-radius: 6px;

    background: #000e36;
    color: #fff;

    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.qm-pdf-tool-button:hover {
    background: #e0a800;
    color: #000e36;
}

.qm-pdf-tool-button:active {
    transform: scale(0.97);
}

/* ==========================================================
   WORKSPACE
   ========================================================== */

.qm-pdf-tool-workspace {
    width: 100%;
    margin: 30px 0;
    padding: 25px;

    border: 1px solid #dedede;
    border-radius: 12px;

    background: #fff;

    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.07);
}

#qm-pdf-tool-workspace {
    width: 100%;
}

/* ==========================================================
   WORKSPACE HEADER
   ========================================================== */

.qm-pdf-workspace-header {
    position: relative;
    width: 100%;
    margin-bottom: 22px;
    padding-bottom: 15px;

    border-bottom: 1px solid #e5e5e5;
}

#qm-pdf-workspace-title {
    margin: 0;
    padding-right: 50px;

    color: #000e36;
    font-size: 25px;
    line-height: 1.35;
    font-weight: 700;
}

/* ==========================================================
   WORKSPACE CLOSE BUTTON
   ========================================================== */

.qm-pdf-workspace-close,
#qm-pdf-workspace-close {
    position: absolute;
    top: 0;
    right: 0;

    width: 38px;
    height: 38px;

    padding: 0;

    border: 1px solid #d7d7d7;
    border-radius: 50%;

    background: #fff;
    color: #000e36;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 23px;
    line-height: 1;

    cursor: pointer;

    transition: 0.2s ease;
}

.qm-pdf-workspace-close:hover,
#qm-pdf-workspace-close:hover {
    border-color: #000e36;
    background: #000e36;
    color: #fff;
}

/* ==========================================================
   WORKSPACE CONTENT
   ========================================================== */

.qm-pdf-tool-workspace .qm-pdf-workspace-content,
#qm-pdf-workspace-content {
    width: 100%;
}

/* ==========================================================
   UPLOAD AREA
   ========================================================== */

.qm-pdf-upload-area {
    width: 100%;
    min-height: 220px;

    padding: 30px 20px;

    border: 2px dashed #c5c9d0;
    border-radius: 10px;

    background: #fafbfc;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;

    transition: 0.2s ease;
}

.qm-pdf-upload-area:hover,
.qm-pdf-upload-area.qm-drag-over,
.qm-pdf-upload-area.drag-over {
    border-color: #e0a800;
    background: #fffaf0;
}

.qm-pdf-upload-area h3 {
    margin: 0 0 8px;
    color: #000e36;
    font-size: 20px;
}

.qm-pdf-upload-area p {
    margin: 0 0 15px;
    color: #777;
    font-size: 14px;
    line-height: 1.6;
}

/* ==========================================================
   FILE INPUT
   ========================================================== */

#qm-pdf-file-input {
    display: none;
}

#qm-pdf-select-file {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;
    padding: 10px 22px;

    border: 0;
    border-radius: 6px;

    background: #000e36;
    color: #fff;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition: 0.2s ease;
}

#qm-pdf-select-file:hover {
    background: #e0a800;
    color: #000e36;
}

/* ==========================================================
   GENERAL BUTTONS
   ========================================================== */

.qm-pdf-button,
.qm-pdf-action-button {
    min-height: 42px;
    padding: 9px 18px;

    border: 0;
    border-radius: 6px;

    background: #000e36;
    color: #fff;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition: 0.2s ease;
}

.qm-pdf-button:hover,
.qm-pdf-action-button:hover {
    background: #e0a800;
    color: #000e36;
}

.qm-pdf-button-secondary {
    background: #f0f1f3;
    color: #000e36;
    border: 1px solid #d6d8dc;
}

.qm-pdf-button-secondary:hover {
    background: #000e36;
    color: #fff;
}

.qm-pdf-button-danger {
    background: #b42318;
    color: #fff;
}

.qm-pdf-button-danger:hover {
    background: #8d1b13;
    color: #fff;
}

.qm-pdf-button-gold {
    background: #e0a800;
    color: #000e36;
}

.qm-pdf-button-gold:hover {
    background: #000e36;
    color: #fff;
}

.qm-pdf-button {
    width: 100%;
    margin-top: 20px;

    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;

    gap: 10px;
}

/* ==========================================================
   FILE INFORMATION
   ========================================================== */

.qm-pdf-uploaded-file {
    width: 100%;
    margin-bottom: 20px;
    padding: 14px 16px;

    border: 1px solid #dedede;
    border-radius: 7px;

    background: #fafafa;
    color: #444;

    font-size: 14px;
    line-height: 1.6;
}

.qm-pdf-uploaded-file strong {
    color: #000e36;
}

.qm-pdf-file-name {
    word-break: break-word;
}

.qm-pdf-file-size {
    color: #777;
    font-size: 12px;
}

/* ==========================================================
   PREVIEW GRID
   ========================================================== */

.qm-pdf-preview-grid {
    width: 100%;

    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));

    gap: 15px;

    margin-top: 18px;
}

/* ==========================================================
   PREVIEW CARD
   ========================================================== */

.qm-pdf-preview-card {
    position: relative;
    min-width: 0;

    padding: 10px;

    border: 1px solid #ddd;
    border-radius: 8px;

    background: #fff;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.qm-pdf-preview-card:hover {
    border-color: #e0a800;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.qm-pdf-preview-card img,
.qm-pdf-preview-card canvas {
    display: block;

    width: 100%;
    height: 180px;

    object-fit: contain;

    border: 1px solid #eee;
    border-radius: 5px;

    background: #f5f5f5;
}

/* ==========================================================
   PREVIEW INFORMATION
   ========================================================== */

.qm-pdf-preview-card-info {
    padding-top: 8px;
    text-align: center;
}

.qm-pdf-preview-card-title {
    display: block;

    color: #000e36;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;

    word-break: break-word;
}

.qm-pdf-preview-card-meta {
    display: block;

    margin-top: 3px;

    color: #777;
    font-size: 12px;
}

/* ==========================================================
   DRAG HANDLE
   ========================================================== */

.qm-pdf-drag-handle {
    width: 100%;
    min-height: 32px;

    margin-bottom: 8px;
    padding: 6px 8px;

    border: 1px dashed #c8ccd3;
    border-radius: 5px;

    background: #f7f8fa;
    color: #555;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 12px;
    font-weight: 600;

    cursor: grab;
    user-select: none;
}

.qm-pdf-drag-handle::before {
    content: "☷";
    margin-right: 7px;
    font-size: 18px;
}

.qm-pdf-drag-handle:active {
    cursor: grabbing;
}

.qm-pdf-preview-card[draggable="true"] {
    cursor: grab;
}

.qm-pdf-dragging,
.qm-pdf-dragging-source {
    opacity: 0.45;
    transform: scale(0.98);
}

.qm-pdf-drop-target {
    border: 2px dashed #e0a800 !important;
    background: #fffaf0 !important;
}

/* ==========================================================
   REMOVE PREVIEW
   ========================================================== */

.qm-pdf-remove-preview {
    position: absolute;
    top: 7px;
    right: 7px;
    z-index: 10;

    width: 29px;
    height: 29px;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: #b42318;
    color: #fff;

    font-size: 17px;
    line-height: 1;

    cursor: pointer;
}

.qm-pdf-remove-preview:hover {
    background: #7f1711;
}

/* ==========================================================
   PAGE SELECTOR
   ========================================================== */

.qm-pdf-page-selector {
    display: flex;
    align-items: center;
    gap: 7px;

    margin-top: 9px;

    color: #333;
    font-size: 13px;

    cursor: pointer;
}

.qm-pdf-page-selector input {
    width: 17px;
    height: 17px;
    margin: 0;

    accent-color: #000e36;
}

/* ==========================================================
   PAGE NUMBER
   ========================================================== */

.qm-pdf-page-number {
    display: block;

    margin-top: 7px;

    color: #000e36;

    font-size: 13px;
    font-weight: 700;

    text-align: center;
}

/* ==========================================================
   ADD PDF PAGE
   ========================================================== */

.qm-pdf-add-page-layout {
    width: 100%;

    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);

    gap: 22px;
    align-items: start;
}

.qm-pdf-add-main-column,
.qm-pdf-add-source-column {
    width: 100%;
    min-width: 0;
}

.qm-pdf-source-heading {
    margin: 0 0 12px;
    padding-bottom: 10px;

    border-bottom: 2px solid #e0a800;

    color: #000e36;

    font-size: 18px;
    line-height: 1.4;
    font-weight: 700;
}

.qm-pdf-source-card {
    width: 100%;

    padding: 15px;

    border: 1px solid #ddd;
    border-radius: 8px;

    background: #fafafa;
}

.qm-pdf-source-card h4 {
    margin: 0 0 7px;

    color: #000e36;
    font-size: 15px;
}

.qm-pdf-source-card p {
    margin: 0 0 12px;

    color: #777;
    font-size: 13px;
    line-height: 1.6;
}

.qm-pdf-added-source-card {
    position: relative;

    width: 100%;
    margin-bottom: 12px;
    padding: 10px;

    border: 1px solid #ddd;
    border-radius: 7px;

    background: #fff;
}

.qm-pdf-added-source-card img,
.qm-pdf-added-source-card canvas {
    display: block;

    width: 100%;
    height: 170px;

    object-fit: contain;

    border: 1px solid #eee;
    border-radius: 5px;

    background: #f5f5f5;
}

/* ==========================================================
   ADD PAGE PREVIEW GRID
   ========================================================== */

.qm-pdf-add-page-layout .qm-pdf-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}



/* ==========================================================
   ADD PAGE DROP TARGET
   ========================================================== */

.qm-pdf-add-page-drop-zone {
    width: 100%;
    min-height: 100px;

    margin-top: 15px;
    padding: 20px;

    border: 2px dashed #c8ccd3;
    border-radius: 8px;

    background: #fafafa;
    color: #666;

    display: flex;
    align-items: center;
    justify-content: center;

    text-align: center;

    font-size: 14px;
}

.qm-pdf-add-page-drop-zone.qm-pdf-drop-target {
    border-color: #e0a800;
    background: #fffaf0;
    color: #000e36;
}

/* ==========================================================
   ROTATE CONTROLS
   ========================================================== */

.qm-pdf-rotate-controls {
    width: 100%;

    margin-top: 18px;
    padding: 14px;

    border: 1px solid #dedede;
    border-radius: 8px;

    background: #fafafa;

    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;

    gap: 8px;
}

.qm-pdf-rotate-controls button {
    min-height: 40px;

    padding: 8px 14px;

    border: 1px solid #d2d5da;
    border-radius: 5px;

    background: #fff;
    color: #000e36;

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;

    transition: 0.2s ease;
}

.qm-pdf-rotate-controls button:hover {
    border-color: #000e36;
    background: #000e36;
    color: #fff;
}

.qm-pdf-rotation-value {
    min-width: 75px;

    color: #000e36;

    font-size: 13px;
    font-weight: 700;

    text-align: center;
}

/* ==========================================================
   ACTION NOTE
   ========================================================== */

.qm-pdf-action-note {
    width: 100%;

    margin: 15px 0;
    padding: 12px 15px;

    border-radius: 6px;

    background: #f5f7fa;
    color: #555;

    font-size: 13px;
    line-height: 1.6;
}

/* ==========================================================
   SERVER CONVERSION
   ========================================================== */

.qm-pdf-server-conversion {
    width: 100%;

    margin-top: 20px;
    padding: 22px;

    border: 1px solid #ddd;
    border-radius: 8px;

    background: #fafafa;

    text-align: center;
}

.qm-pdf-server-conversion h3 {
    margin: 0 0 8px;

    color: #000e36;
    font-size: 19px;
}

.qm-pdf-server-conversion p {
    margin: 0 0 15px;

    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* ==========================================================
   ERROR / SUCCESS / LOADING
   ========================================================== */

.qm-pdf-error,
.qm-pdf-success,
.qm-pdf-loading {
    width: 100%;

    margin: 18px 0;
    padding: 14px 16px;

    border-radius: 7px;

    font-size: 14px;
    line-height: 1.6;
}

.qm-pdf-error {
    border: 1px solid #e2b4b1;
    background: #fff4f3;
    color: #9b1c14;
}

.qm-pdf-success {
    border: 1px solid #b8dcbf;
    background: #f1faf3;
    color: #176b2c;
}

.qm-pdf-loading {
    border: 1px solid #d7dce3;
    background: #f6f8fa;
    color: #000e36;

    text-align: center;
}

.qm-pdf-loading::before {
    content: "";

    display: inline-block;

    width: 18px;
    height: 18px;

    margin-right: 9px;

    vertical-align: -4px;

    border: 2px solid #cfd3da;
    border-top-color: #000e36;
    border-radius: 50%;

    animation: qmPdfSpin 0.8s linear infinite;
}

@keyframes qmPdfSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================
   DOWNLOAD AREA
   ========================================================== */

.qm-pdf-download-area {
    width: 100%;

    margin-top: 20px;
    padding: 20px;

    border: 1px solid #dfe3e8;
    border-radius: 8px;

    background: #fafafa;

    text-align: center;
}

.qm-pdf-download-area h3 {
    margin: 0 0 12px;

    color: #000e36;
    font-size: 19px;
}

.qm-pdf-download-area a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 43px;

    padding: 10px 20px;

    border-radius: 6px;

    background: #000e36;
    color: #fff;

    text-decoration: none;

    font-size: 14px;
    font-weight: 600;
}

.qm-pdf-download-area a:hover {
    background: #e0a800;
    color: #000e36;
}

/* ==========================================================
   SECURITY NOTICE
   ========================================================== */

.qm-pdf-security-notice {
    width: 100%;

    margin: 30px 0;

    padding: 20px;

    border: 1px solid #e1e1e1;
    border-radius: 8px;

    background: #fafafa;
}

.qm-pdf-security-notice h2 {
    margin: 0 0 10px;

    color: #000e36;
    font-size: 21px;
}

.qm-pdf-security-notice p {
    margin: 0 0 10px;

    color: #666;

    font-size: 14px;
    line-height: 1.75;
}

.qm-pdf-security-notice p:last-child {
    margin-bottom: 0;
}

/* ==========================================================
   INFORMATION / SEO
   ========================================================== */

.qm-pdf-tools-info {
    width: 100%;

    margin: 30px 0;
    padding: 25px 0;

    border-top: 1px solid #e5e5e5;
}

.qm-pdf-tools-info h2 {
    margin: 0 0 12px;

    color: #000e36;

    font-size: 25px;
    line-height: 1.35;
}

.qm-pdf-tools-info h3 {
    margin: 22px 0 8px;

    color: #000e36;
    font-size: 19px;
}

.qm-pdf-tools-info p {
    margin: 0 0 14px;

    color: #555;

    font-size: 14px;
    line-height: 1.8;
}

.qm-pdf-tools-info p:last-child {
    margin-bottom: 0;
}

/* ==========================================================
   UTILITY CLASSES
   ========================================================== */

.qm-pdf-hidden {
    display: none !important;
}

.qm-pdf-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.qm-pdf-text-center {
    text-align: center;
}

/* ==========================================================
   TABLET
   ========================================================== */

@media (max-width: 1200px) {

    .qm-pdf-tools-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .qm-pdf-preview-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .qm-pdf-tool-card {
        min-height: 215px;
    }

    .qm-pdf-add-page-layout {
        grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr);
    }
}

/* ==========================================================
   SMALL TABLET
   ========================================================== */

@media (max-width: 900px) {

    .qm-pdf-tools-page {
        padding: 15px;
    }

    .qm-pdf-tools-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .qm-pdf-preview-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .qm-pdf-add-page-layout {
        grid-template-columns: 1fr;
    }

    .qm-pdf-add-page-layout .qm-pdf-preview-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .qm-pdf-tool-workspace {
        padding: 20px;
    }
}

/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 650px) {

    .qm-pdf-tools-page {
        padding: 10px;
    }

    .qm-pdf-tools-header h1 {
        font-size: 27px;
    }

    .qm-pdf-tools-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .qm-pdf-tool-card {
        min-height: 185px;
        padding: 16px 10px;
    }

    .qm-pdf-tool-icon {
        width: 50px;
        height: 50px;
        font-size: 23px;
    }

    .qm-pdf-tool-card h2 {
        font-size: 15px;
    }

    .qm-pdf-tool-card p {
        font-size: 12px;
    }

    .qm-pdf-tool-button {
        width: 100%;
        padding-left: 8px;
        padding-right: 8px;
        font-size: 12px;
    }

    .qm-pdf-tool-workspace,
    #qm-pdf-tool-workspace {
        padding: 15px;
        border-radius: 8px;
    }

    #qm-pdf-workspace-title {
        font-size: 21px;
    }

    .qm-pdf-upload-area {
        min-height: 190px;
        padding: 25px 15px;
    }

    .qm-pdf-preview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .qm-pdf-add-page-layout .qm-pdf-preview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .qm-pdf-preview-card img,
    .qm-pdf-preview-card canvas {
        height: 150px;
    }

    .qm-pdf-button {
        flex-direction: column;
        align-items: stretch;
    }

    .qm-pdf-button button,
    .qm-pdf-button .qm-pdf-btn,
    .qm-pdf-button .qm-pdf-action-button {
        width: 100%;
    }

    .qm-pdf-rotate-controls {
        flex-direction: column;
    }

    .qm-pdf-rotate-controls button {
        width: 100%;
    }

    .qm-pdf-security-notice {
        padding: 16px;
    }

    .qm-pdf-tools-info {
        padding: 20px 0;
    }
}

/* ==========================================================
   VERY SMALL MOBILE
   ========================================================== */

@media (max-width: 420px) {

    .qm-pdf-tools-header h1 {
        font-size: 24px;
    }

    .qm-pdf-tools-grid {
        gap: 8px;
    }

    .qm-pdf-tool-card {
        min-height: 170px;
        padding: 13px 8px;
    }

    .qm-pdf-tool-icon {
        width: 44px;
        height: 44px;
        margin-bottom: 8px;
        font-size: 20px;
    }

    .qm-pdf-tool-card h2 {
        font-size: 14px;
    }

    .qm-pdf-tool-card p {
        font-size: 11px;
        margin-bottom: 10px;
    }

    .qm-pdf-preview-grid,
    .qm-pdf-add-page-layout .qm-pdf-preview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .qm-pdf-preview-card img,
    .qm-pdf-preview-card canvas {
        height: 125px;
    }

    .qm-pdf-drag-handle {
        min-height: 29px;
        font-size: 10px;
    }

    #qm-pdf-workspace-title {
        font-size: 19px;
    }
}
.qm-pdf-rotate-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.qm-pdf-rotate-controls button {
    width: 38px;
    height: 38px;
    border: 1px solid #d7d7d7;
    border-radius: 50%;
    background: #fff;
    color: #000e36;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qm-pdf-rotation-label {
    min-width: 48px;
    text-align: center;
    font-weight: 600;
    color: #000e36;
    font-size: 14px;
}

.qm-pdf-page-card .qm-pdf-preview-image {
    overflow: visible;
}

.qm-pdf-page-card .qm-pdf-preview-image img {
    transform-origin: center center;
}