/**
 * Custom Page Builder Styles
 * Comprehensive formatting, table management, rich link picker, and responsive design.
 */

/* ==========================================================================
   Quill Editor Dark/Light Theme Integration
   ========================================================================== */
.page-builder-container {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 0.5rem;
}

/* Quill Toolbar Overrides */
.ql-toolbar.ql-snow {
    background: var(--surface);
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 0.65rem 0.75rem !important;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.4rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.ql-container.ql-snow {
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid var(--border) !important;
    border-top: none !important;
    border-radius: 0 0 var(--radius) var(--radius);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1rem;
    min-height: 420px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.15);
}

body.theme-light .ql-container.ql-snow {
    background: #ffffff;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Toolbar Formats & Buttons */
.ql-snow .ql-stroke {
    stroke: var(--text) !important;
    stroke-width: 1.8 !important;
}

.ql-snow .ql-fill {
    fill: var(--text) !important;
}

.ql-snow .ql-picker {
    color: var(--text) !important;
    font-size: 0.85rem;
    font-weight: 500;
}

.ql-snow .ql-picker-label {
    border-radius: 4px;
    padding-left: 6px;
    padding-right: 18px;
    border: 1px solid transparent;
}

.ql-snow .ql-picker-label:hover {
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.05);
}

.ql-snow .ql-picker-options {
    background-color: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    padding: 0.5rem 0 !important;
    z-index: 1000 !important;
}

.ql-snow .ql-picker-item {
    color: var(--text) !important;
    padding: 0.35rem 0.85rem !important;
}

.ql-snow .ql-picker-item:hover,
.ql-snow .ql-picker-item.ql-selected {
    color: var(--secondary) !important;
    background: rgba(255, 255, 255, 0.06) !important;
}

.ql-snow button {
    border-radius: 4px !important;
    width: 28px !important;
    height: 28px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 3px !important;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.ql-snow button:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

.ql-snow button.ql-active {
    background: rgba(59, 130, 246, 0.2) !important;
}

.ql-snow button.ql-active .ql-stroke {
    stroke: var(--secondary) !important;
}

.ql-snow button.ql-active .ql-fill {
    fill: var(--secondary) !important;
}

/* Custom FontAwesome buttons in Toolbar */
.ql-toolbar button.pb-btn-custom {
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
}

.ql-toolbar button.pb-btn-custom:hover {
    color: var(--secondary);
    background: rgba(255, 255, 255, 0.08);
}

/* Toolbar Separators */
.ql-formats {
    display: inline-flex;
    align-items: center;
    margin-right: 0.5rem !important;
    padding-right: 0.5rem;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.ql-formats:last-child {
    border-right: none;
    margin-right: 0 !important;
}

/* Editor Content Area */
.ql-editor {
    line-height: 1.7;
    padding: 1.25rem 1.5rem;
    min-height: 420px;
}

/* Placeholder styling for Dark and Light Modes (legible in dark mode) */
.ql-editor.ql-blank::before {
    color: var(--text-muted, #94a3b8) !important;
    font-style: italic;
    font-size: 0.95rem;
    left: 1.5rem !important;
    right: 1.5rem !important;
    opacity: 0.65;
}

body.theme-light .ql-editor.ql-blank::before,
html.theme-light .ql-editor.ql-blank::before {
    color: #64748b !important;
    opacity: 0.75;
}

.ql-editor p {
    margin-bottom: 0.85rem;
}

.ql-editor h1,
.ql-editor h2,
.ql-editor h3,
.ql-editor h4,
.ql-editor h5,
.ql-editor h6 {
    margin-top: 1.25rem;
    margin-bottom: 0.65rem;
    font-weight: 700;
    line-height: 1.3;
}

.ql-editor blockquote {
    border-left: 4px solid var(--secondary);
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.ql-editor pre.ql-syntax {
    background: #0d1117;
    color: #e6edf3;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    overflow-x: auto;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.9rem;
}

.ql-editor hr {
    border: 0;
    height: 1px;
    background: var(--border);
    margin: 1.5rem 0;
}

/* Checklists in Quill 2 */
.ql-editor ul[data-checked] {
    list-style-type: none;
    padding-left: 0;
}

.ql-editor li[data-checked="true"]>.ql-ui:before {
    content: "☑";
    color: var(--secondary);
    font-size: 1.1rem;
    margin-right: 0.5rem;
}

.ql-editor li[data-checked="false"]>.ql-ui:before {
    content: "☐";
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-right: 0.5rem;
}

/* ==========================================================================
   Table Styles in Editor and Page Content
   ========================================================================== */
.ql-editor table,
.page-content table,
.page-rich-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
    font-size: 0.92rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    table-layout: auto;
}

.ql-editor td,
.ql-editor th,
.page-content td,
.page-content th,
.page-rich-content td,
.page-rich-content th {
    border: 1px solid var(--border);
    padding: 0.65rem 0.85rem;
    min-width: 60px;
    vertical-align: top;
    line-height: 1.5;
}

.ql-editor th,
.page-content th,
.page-rich-content th {
    background: rgba(255, 255, 255, 0.06);
    font-weight: 600;
    color: var(--text);
    text-align: left;
}

.ql-editor tr:nth-child(even) td,
.page-content tr:nth-child(even) td,
.page-rich-content tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.015);
}

.ql-editor tr:hover td,
.page-content tr:hover td,
.page-rich-content tr:hover td {
    background: rgba(255, 255, 255, 0.035);
}

body.theme-light .ql-editor table,
body.theme-light .page-content table,
body.theme-light .page-rich-content table {
    background: #ffffff;
}

body.theme-light .ql-editor th,
body.theme-light .page-content th,
body.theme-light .page-rich-content th {
    background: #f1f5f9;
    color: #0f172a;
}

body.theme-light .ql-editor tr:nth-child(even) td,
body.theme-light .page-content tr:nth-child(even) td,
body.theme-light .page-rich-content tr:nth-child(even) td {
    background: #f8fafc;
}

/* Responsive Table Scroll Container */
.table-responsive-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.25rem 0;
    border-radius: var(--radius);
}

/* Active Table Highlight in Editor */
.ql-editor td.pb-cell-active {
    background: rgba(59, 130, 246, 0.15) !important;
    outline: 2px solid var(--secondary);
    outline-offset: -2px;
}

/* ==========================================================================
   Table Dropdown & Grid Picker
   ========================================================================== */
.pb-table-dropdown {
    position: absolute;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
    padding: 1rem;
    z-index: 1005;
    min-width: 250px;
    display: none;
    flex-direction: column;
    gap: 0.75rem;
}

.pb-table-dropdown.show {
    display: flex;
}

.pb-grid-picker {
    display: grid;
    grid-template-columns: repeat(6, 20px);
    grid-template-rows: repeat(6, 20px);
    gap: 3px;
    padding: 4px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 4px;
    width: fit-content;
    cursor: pointer;
}

.pb-grid-cell {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    transition: all 0.1s ease;
}

.pb-grid-cell.highlight {
    background: var(--secondary) !important;
    border-color: var(--secondary) !important;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
}

.pb-grid-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-align: center;
}

.pb-custom-table-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.pb-custom-table-row input {
    width: 48px;
    padding: 0.3rem;
    text-align: center;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text);
    font-size: 0.85rem;
}

/* ==========================================================================
   Floating Contextual Table Action Bar
   ========================================================================== */
.pb-table-actionbar {
    position: absolute;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 30px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    padding: 0.35rem 0.65rem;
    display: none;
    align-items: center;
    gap: 0.35rem;
    z-index: 1002;
    animation: pbFadeIn 0.15s ease-out;
    flex-wrap: wrap;
    max-width: 95%;
}

.pb-table-actionbar.show {
    display: inline-flex;
}

.pb-tbl-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.55rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.pb-tbl-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border);
}

.pb-tbl-btn.pb-tbl-del:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
}

.pb-tbl-btn.pb-tbl-danger {
    color: #ef4444;
}

.pb-tbl-btn.pb-tbl-danger:hover {
    background: #ef4444;
    color: #ffffff;
}

.pb-actionbar-divider {
    width: 1px;
    height: 16px;
    background: var(--border);
    margin: 0 0.15rem;
}

/* ==========================================================================
   Full Screen Editor Mode (Window Fullscreen Overlay)
   ========================================================================== */
body.pb-is-fullscreen {
    overflow: hidden !important;
}

.page-builder-container.page-builder-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    background: var(--background, #0f172a) !important;
    padding: 1rem 1.5rem !important;
    display: flex !important;
    flex-direction: column !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

body.theme-light .page-builder-container.page-builder-fullscreen {
    background: var(--background, #f1f5f9) !important;
}

.page-builder-container.page-builder-fullscreen .ql-toolbar {
    border-radius: var(--radius) var(--radius) 0 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
    background: var(--surface, #1e293b);
    position: sticky;
    top: 0;
    z-index: 100;
}

.page-builder-container.page-builder-fullscreen .ql-container {
    flex: 1 1 0% !important;
    height: calc(100vh - 120px) !important;
    min-height: 0 !important;
    border-radius: 0 0 var(--radius) var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.page-builder-container.page-builder-fullscreen .ql-editor {
    flex: 1 1 0% !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    padding: 1.5rem 2.5rem !important;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.ql-toolbar button.ql-fullscreen.pb-active {
    background: rgba(16, 185, 129, 0.2) !important;
    color: var(--secondary, #10b981) !important;
    border: 1px solid var(--secondary, #10b981) !important;
}

/* ==========================================================================
   Modal Dialogs (Link Picker & HTML Source Editor)
   ========================================================================== */
.pb-modal {
    position: fixed;
    inset: 0;
    z-index: 10000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* Ensure MediaManager modals (library picker & cropper) always render on top of Fullscreen Page Builder & Link Picker */
.mm-modal {
    z-index: 10000050 !important;
}

#mm-cropper-modal {
    z-index: 10000060 !important;
}

.pb-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.pb-modal-dialog {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: pbModalScale 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.pb-html-dialog {
    max-width: 800px;
}

.pb-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.pb-modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
}

.pb-modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.25rem;
    transition: color 0.15s ease;
}

.pb-modal-close:hover {
    color: var(--text);
}

.pb-modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pb-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.25rem;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

/* Form inputs inside modals */
.pb-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.pb-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pb-help {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.pb-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text);
    font-size: 0.9rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pb-input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.pb-select {
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 0.85rem;
}

/* Tabs */
.pb-tab-bar {
    display: flex;
    gap: 0.4rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.pb-tab {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 0.45rem 0.85rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.pb-tab:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.pb-tab.active {
    color: #ffffff;
    background: var(--primary);
    border-color: var(--primary);
}

.pb-tab-pane {
    display: none;
    flex-direction: column;
    gap: 0.75rem;
}

.pb-tab-pane.active {
    display: flex;
}

/* Search Box with Icon */
.pb-search-wrap {
    position: relative;
    width: 100%;
}

.pb-search-wrap i {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.pb-search-input {
    padding-left: 2.25rem !important;
}

/* Pages Selection List */
.pb-pages-list,
.pb-media-list {
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.pb-list-category {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.4rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    color: var(--secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.pb-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: background 0.12s ease;
    gap: 0.5rem;
}

.pb-list-item:last-child {
    border-bottom: none;
}

.pb-list-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.pb-list-item.selected {
    background: rgba(16, 185, 129, 0.15);
    border-left: 3px solid var(--secondary);
}

.pb-item-info {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.pb-item-icon {
    font-size: 0.95rem;
    color: var(--text-muted);
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.pb-item-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pb-item-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pb-item-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
}

.pb-item-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Media Item Grid Card inside Link Modal */
.pb-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.5rem;
    padding: 0.5rem;
}

.pb-media-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
}

.pb-media-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--secondary);
}

.pb-media-card.selected {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--secondary);
}

.pb-media-card-thumb {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    object-fit: cover;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-muted);
}

.pb-media-card-name {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text);
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Protocol Quick Chips */
.pb-quick-protocols {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.35rem;
}

.pb-proto-chip {
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.12s ease;
    font-family: monospace;
}

.pb-proto-chip:hover {
    color: var(--secondary);
    border-color: var(--secondary);
    background: rgba(16, 185, 129, 0.1);
}

/* Options Box */
.pb-link-options-box {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.85rem;
}

.pb-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text);
    cursor: pointer;
}

.pb-checkbox-label input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--secondary);
}

/* Code Editor Textarea */
.pb-code-editor {
    width: 100%;
    height: 380px;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.88rem;
    line-height: 1.5;
    background: #0d1117;
    color: #e6edf3;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    resize: vertical;
    white-space: pre;
}

.pb-code-editor:focus {
    outline: none;
    border-color: var(--secondary);
}

/* Animations */
@keyframes pbModalScale {
    from {
        opacity: 0;
        transform: scale(0.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pbFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Adjustments (Strict Zero Horizontal Scrolling) */
@media (max-width: 640px) {
    .ql-toolbar.ql-snow {
        padding: 0.4rem 0.5rem !important;
        gap: 0.2rem;
    }

    .ql-formats {
        margin-right: 0.25rem !important;
        padding-right: 0.25rem;
    }

    .ql-editor {
        padding: 0.85rem;
    }

    .pb-modal-dialog {
        max-height: 95vh;
    }

    .pb-modal-body {
        padding: 0.85rem;
    }

    .page-builder-container.page-builder-fullscreen {
        padding: 0.4rem !important;
    }

    .page-builder-container.page-builder-fullscreen .ql-editor {
        padding: 0.75rem !important;
    }

    .pb-table-actionbar {
        position: fixed !important;
        bottom: 1rem !important;
        left: 50% !important;
        top: auto !important;
        transform: translateX(-50%) !important;
        width: calc(100vw - 2rem) !important;
        max-width: 480px !important;
        justify-content: center;
    }
}