/**
 * AI-Edit PDF Suite — front-end styles.
 * Matches the AI Tools Hub theme (Cairo, indigo/violet, rounded cards).
 */

.aipdf-app {
    --aipdf-primary: var(--primary-color, #6366f1);
    --aipdf-secondary: var(--secondary-color, #a855f7);
    --aipdf-ink: #0f172a;
    --aipdf-muted: #64748b;
    --aipdf-line: #e2e8f0;
    --aipdf-soft: #f8fafc;
    --aipdf-danger: #dc2626;
    --aipdf-ok: #059669;
    --aipdf-radius: 14px;
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
    direction: rtl;
    color: var(--aipdf-ink);
    margin: 8px 0 24px;
}

.aipdf-app *,
.aipdf-app *::before,
.aipdf-app *::after {
    box-sizing: border-box;
}

/**
 * The `hidden` attribute must always win over the layout rules below
 * (display: flex/grid). Without this, overlays such as the signature modal
 * remain visible even when `element.hidden = true` and cannot be closed.
 */
.aipdf-app [hidden],
.aipdf-modal[hidden] {
    display: none !important;
}

.aipdf-tool-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--aipdf-line);
    border-radius: var(--aipdf-radius);
    padding: 16px 18px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.aipdf-tool-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(168, 85, 247, 0.12));
}

.aipdf-tool-headtext {
    flex: 1;
    min-width: 0;
}

.aipdf-desc {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.8;
    color: #334155;
}

.aipdf-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
}

.aipdf-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #e0e7ff;
}

.aipdf-badge-green { background: #ecfdf5; color: #047857; border-color: #d1fae5; }
.aipdf-badge-amber { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.aipdf-badge-purple { background: #faf5ff; color: #7e22ce; border-color: #f3e8ff; }
.aipdf-badge-link { text-decoration: none; background: #f1f5f9; color: #334155; border-color: #e2e8f0; }
.aipdf-badge-link:hover { background: #e2e8f0; }

/* Dropzone */
.aipdf-dropzone {
    margin-top: 14px;
    border: 2px dashed #c7d2fe;
    background: linear-gradient(180deg, #ffffff, #f8faff);
    border-radius: var(--aipdf-radius);
    padding: 34px 18px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
    outline: none;
}

.aipdf-dropzone:hover,
.aipdf-dropzone:focus,
.aipdf-dropzone.is-drag {
    border-color: var(--aipdf-primary);
    background: #eef2ff;
}

.aipdf-dropzone.is-drag { transform: scale(1.005); }

.aipdf-drop-icon {
    color: var(--aipdf-primary);
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
}

.aipdf-drop-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

.aipdf-drop-hint {
    margin-top: 5px;
    font-size: 12.5px;
    color: var(--aipdf-muted);
}

/* File list */
.aipdf-filelist {
    margin-top: 12px;
    display: grid;
    gap: 8px;
}

.aipdf-fileitem {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid var(--aipdf-line);
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 13px;
}

.aipdf-fileitem .aipdf-filetype {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: #4338ca;
    font-weight: 800;
    font-size: 10px;
    flex: 0 0 34px;
}

.aipdf-fileitem .aipdf-filename {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.aipdf-fileitem .aipdf-filesize {
    color: var(--aipdf-muted);
    font-size: 12px;
}

.aipdf-fileitem .aipdf-fileremove {
    border: none;
    background: #fef2f2;
    color: #b91c1c;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

/* Options */
.aipdf-options {
    margin-top: 14px;
    background: #fff;
    border: 1px solid var(--aipdf-line);
    border-radius: var(--aipdf-radius);
    padding: 14px 16px;
}

.aipdf-options:empty { display: none; }

.aipdf-options-title {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.aipdf-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
}

.aipdf-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 12.5px;
    font-weight: 600;
    color: #475569;
    min-width: 0;
}

.aipdf-field input[type="text"],
.aipdf-field input[type="number"],
.aipdf-field input[type="password"],
.aipdf-field select,
.aipdf-field textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    font-family: inherit;
    font-size: 13px;
    background: #fff;
    color: var(--aipdf-ink);
    min-height: 38px;
}

.aipdf-field textarea { min-height: 78px; resize: vertical; }
.aipdf-field input:focus,
.aipdf-field select:focus,
.aipdf-field textarea:focus {
    outline: none;
    border-color: var(--aipdf-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.aipdf-field input[type="color"] {
    width: 100%;
    height: 38px;
    padding: 3px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
    cursor: pointer;
}

.aipdf-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.aipdf-check {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    padding-top: 22px;
}

.aipdf-check input { width: 16px; height: 16px; accent-color: var(--aipdf-primary); }

/* Buttons */
.aipdf-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.aipdf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 10px 18px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    line-height: 1.2;
}

.aipdf-btn:active { transform: translateY(1px); }
.aipdf-btn:disabled { opacity: .55; cursor: not-allowed; }

.aipdf-btn-primary {
    background: linear-gradient(135deg, var(--aipdf-primary), var(--aipdf-secondary));
    color: #fff;
    box-shadow: 0 8px 18px rgba(99, 102, 241, 0.25);
}

.aipdf-btn-primary:hover:not(:disabled) { box-shadow: 0 10px 24px rgba(99, 102, 241, 0.35); }

.aipdf-btn-ghost {
    background: #fff;
    border-color: #cbd5e1;
    color: #334155;
}

.aipdf-btn-ghost:hover { background: #f1f5f9; }

.aipdf-btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: 8px; }

.aipdf-privacy {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: var(--aipdf-muted);
    margin-right: auto;
}

/* Progress */
.aipdf-progress { margin-top: 14px; }
.aipdf-progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
}
.aipdf-progress-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--aipdf-primary), var(--aipdf-secondary));
    border-radius: 99px;
    transition: width .25s ease;
}
.aipdf-progress-text {
    margin-top: 7px;
    font-size: 12.5px;
    color: var(--aipdf-muted);
}

/* Result */
.aipdf-result {
    margin-top: 14px;
    background: #fff;
    border: 1px solid #d1fae5;
    border-radius: var(--aipdf-radius);
    padding: 16px;
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.07);
}

.aipdf-result-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.aipdf-result-check {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #ecfdf5;
    color: #059669;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
}

.aipdf-result-title { font-weight: 800; font-size: 15px; }
.aipdf-result-sub { font-size: 12px; color: var(--aipdf-muted); }

.aipdf-result-files { display: grid; gap: 8px; }

.aipdf-result-file {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--aipdf-line);
    border-radius: 10px;
    padding: 9px 12px;
    background: #f8fafc;
    font-size: 13px;
}

.aipdf-result-file .aipdf-result-name { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.aipdf-result-note {
    margin-top: 10px;
    font-size: 12px;
    color: var(--aipdf-muted);
    line-height: 1.7;
}

.aipdf-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    padding: 6px 11px;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}
.aipdf-download-btn:hover { background: #d1fae5; }

/* Limit */
.aipdf-limit { margin-top: 16px; }
.aipdf-limit-inner {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: var(--aipdf-radius);
    padding: 20px;
    text-align: center;
}
.aipdf-limit-inner strong { display: block; font-size: 16px; color: #9a3412; margin-bottom: 6px; }
.aipdf-limit-inner p { margin: 0 0 14px; color: #7c2d12; font-size: 13.5px; }
.aipdf-limit-inner .aipdf-btn { margin: 0 4px; }

/* Notices */
.aipdf-notice {
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.7;
}
.aipdf-notice-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* =========================================================
   Editor
   ========================================================= */

.aipdf-editor-app { margin: 0 0 24px; }

.aipdf-editor-start .aipdf-dropzone { padding: 48px 18px; }

.aipdf-editor-shell {
    background: #fff;
    border: 1px solid var(--aipdf-line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.aipdf-editor-top {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--aipdf-line);
    background: #fff;
    flex-wrap: wrap;
}

.aipdf-editor-file {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.aipdf-pdf-chip {
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    padding: 4px 7px;
    border-radius: 6px;
    flex: 0 0 auto;
}

.aipdf-editor-filename {
    font-weight: 700;
    font-size: 13.5px;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aipdf-editor-pagescount {
    font-size: 12px;
    color: var(--aipdf-muted);
    white-space: nowrap;
}

.aipdf-editor-topgroup {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f8fafc;
    border: 1px solid var(--aipdf-line);
    border-radius: 10px;
    padding: 3px 6px;
}

.aipdf-iconbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #475569;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.aipdf-iconbtn:hover { background: #e2e8f0; color: #0f172a; }
.aipdf-iconbtn:disabled { opacity: .35; cursor: default; }

.aipdf-vsep {
    width: 1px;
    height: 22px;
    background: #e2e8f0;
    margin: 0 4px;
    display: inline-block;
}

.aipdf-zoom-label {
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    min-width: 44px;
    text-align: center;
    direction: ltr;
}

.aipdf-editor-savegroup {
    display: flex;
    align-items: center;
    gap: 10px;
}

.aipdf-savehint { font-size: 11.5px; color: var(--aipdf-muted); }
.aipdf-editor-savegroup .aipdf-btn { padding: 8px 14px; font-size: 13px; }

/* Toolbar */
.aipdf-editor-toolbar {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 7px 12px;
    border-bottom: 1px solid var(--aipdf-line);
    background: #fbfdff;
    overflow-x: auto;
    scrollbar-width: thin;
}

.aipdf-toolbtn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid transparent;
    background: transparent;
    color: #475569;
    padding: 6px 9px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    transition: all .15s ease;
}

.aipdf-toolbtn svg { width: 17px; height: 17px; }
.aipdf-toolbtn:hover { background: #eef2ff; color: #4338ca; }
.aipdf-toolbtn.is-active {
    background: #eef2ff;
    color: #4338ca;
    border-color: #c7d2fe;
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, .08);
}

/* Body layout */
.aipdf-editor-body {
    display: grid;
    grid-template-columns: 168px minmax(0, 1fr) 238px;
    min-height: 560px;
    max-height: 74vh;
    background: #eef1f6;
}

.aipdf-editor-pages {
    background: #fff;
    border-left: 1px solid var(--aipdf-line);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.aipdf-pages-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 800;
    color: #334155;
    border-bottom: 1px solid var(--aipdf-line);
}

.aipdf-pages-count {
    background: #eef2ff;
    color: #4338ca;
    border-radius: 999px;
    padding: 1px 7px;
    font-size: 11px;
}

.aipdf-pages-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    scrollbar-width: thin;
}

.aipdf-thumb {
    position: relative;
    border: 2px solid transparent;
    border-radius: 8px;
    background: #f8fafc;
    padding: 4px;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.aipdf-thumb:hover { border-color: #c7d2fe; }
.aipdf-thumb.is-active { border-color: var(--aipdf-primary); background: #eef2ff; }
.aipdf-thumb.is-deleted { opacity: .4; }

.aipdf-thumb canvas,
.aipdf-thumb img {
    width: 100%;
    display: block;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .12);
}

.aipdf-thumb-num {
    position: absolute;
    bottom: 7px;
    right: 7px;
    background: rgba(15, 23, 42, .78);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 4px;
    padding: 1px 5px;
    direction: ltr;
}

.aipdf-thumb-tools {
    position: absolute;
    top: 5px;
    left: 5px;
    display: flex;
    gap: 3px;
    opacity: 0;
    transition: opacity .15s ease;
}
.aipdf-thumb:hover .aipdf-thumb-tools { opacity: 1; }

.aipdf-thumb-tools button {
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 4px;
    background: rgba(255, 255, 255, .95);
    color: #334155;
    cursor: pointer;
    font-size: 11px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.aipdf-thumb-tools button:hover { background: #eef2ff; color: #4338ca; }
.aipdf-thumb-tools button.aipdf-danger:hover { background: #fef2f2; color: #b91c1c; }

.aipdf-pages-actions {
    padding: 9px;
    border-top: 1px solid var(--aipdf-line);
}
.aipdf-pages-actions .aipdf-btn { width: 100%; }

/* Stage */
.aipdf-editor-stage {
    position: relative;
    overflow: auto;
    padding: 22px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 0;
}

.aipdf-editor-stageinner {
    margin: auto;
}

.aipdf-editor-page {
    position: relative;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .18);
    border-radius: 2px;
    overflow: hidden;
    line-height: 0;
}

.aipdf-editor-page canvas {
    display: block;
}

#aipdf-page-canvas { position: relative; z-index: 1; }

.aipdf-editor-page .canvas-container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 2;
}

.aipdf-editor-loading {
    position: absolute;
    inset: 0;
    background: rgba(238, 241, 246, .82);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 13px;
    color: #475569;
    z-index: 10;
    backdrop-filter: blur(2px);
}

.aipdf-spinner {
    width: 34px;
    height: 34px;
    border: 3px solid #c7d2fe;
    border-top-color: var(--aipdf-primary);
    border-radius: 50%;
    animation: aipdf-spin .8s linear infinite;
}

@keyframes aipdf-spin { to { transform: rotate(360deg); } }

/* Props */
.aipdf-editor-props {
    background: #fff;
    border-right: 1px solid var(--aipdf-line);
    padding: 12px;
    overflow-y: auto;
    min-height: 0;
    scrollbar-width: thin;
}

.aipdf-props-title {
    font-size: 12px;
    font-weight: 800;
    color: #334155;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.aipdf-props-subtitle { margin-top: 4px; }

.aipdf-prop-group {
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.aipdf-prop-group:last-child { border-bottom: none; }

.aipdf-prop-hint {
    font-size: 12px;
    line-height: 1.8;
    color: var(--aipdf-muted);
    margin: 0;
}

.aipdf-prop-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.aipdf-minibtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
}
.aipdf-minibtn:hover { background: #eef2ff; border-color: #c7d2fe; color: #4338ca; }
.aipdf-minibtn.is-active { background: #eef2ff; border-color: #a5b4fc; color: #4338ca; }
.aipdf-minibtn.aipdf-danger:hover { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }

.aipdf-field input[type="range"] {
    width: 100%;
    accent-color: var(--aipdf-primary);
}

/* Modal */
.aipdf-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(15, 23, 42, .68);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.aipdf-modal-box {
    background: #fff;
    border-radius: 16px;
    padding: 18px;
    width: min(680px, 96vw);
    box-shadow: 0 30px 80px rgba(15, 23, 42, .35);
}

.aipdf-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.aipdf-modal-head h3 { margin: 0; font-size: 16px; }

#aipdf-signature-pad {
    width: 100%;
    height: auto;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    background: #fff;
    cursor: crosshair;
    touch-action: none;
}

.aipdf-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

/* Toast */
.aipdf-editor-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #fff;
    padding: 11px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    z-index: 100001;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .3);
    max-width: 90vw;
    text-align: center;
}
.aipdf-editor-toast.is-error { background: #991b1b; }
.aipdf-editor-toast.is-ok { background: #065f46; }

/* Responsive */
@media (max-width: 1100px) {
    .aipdf-editor-body { grid-template-columns: 130px minmax(0, 1fr) 210px; }
    .aipdf-toolbtn span { display: none; }
    .aipdf-toolbtn { padding: 7px; }
}

@media (max-width: 820px) {
    .aipdf-editor-body {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
        max-height: none;
    }
    .aipdf-editor-pages {
        border-left: none;
        border-bottom: 1px solid var(--aipdf-line);
    }
    .aipdf-pages-list {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        max-height: 120px;
    }
    .aipdf-thumb { flex: 0 0 76px; }
    .aipdf-editor-props {
        border-right: none;
        border-top: 1px solid var(--aipdf-line);
        max-height: 220px;
    }
    .aipdf-editor-stage { min-height: 380px; padding: 12px; }
    .aipdf-savehint { display: none; }
    .aipdf-editor-top { gap: 8px; }
    .aipdf-editor-filename { max-width: 130px; }
    .aipdf-toolbtn span { display: none; }
}

@media (max-width: 520px) {
    .aipdf-tool-head { padding: 13px; }
    .aipdf-tool-icon { width: 40px; height: 40px; flex-basis: 40px; font-size: 20px; }
    .aipdf-actions .aipdf-btn { flex: 1; }
    .aipdf-privacy { flex-basis: 100%; margin-right: 0; }
    .aipdf-field-row { grid-template-columns: 1fr; }
    .aipdf-editor-topgroup { order: 3; }
    .aipdf-editor-savegroup { order: 2; margin-right: auto; }
}
