.onlineoffice-editor-frame {
    width: 100%;
    min-height: 85vh;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
}

.onlineoffice-config-preview {
    white-space: pre-wrap;
    padding: 12px;
    border: 1px solid #ddd;
    background: #fafafa;
    border-radius: 6px;
}

.onlineoffice-doceditor-container {
    width: 100%;
    min-height: 85vh;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
}

.inline-block {
    display: inline-block;
}


.onlineoffice-editor-dock {
    display: flex;
    align-items: center;
    gap: 20px;
}

.onlineoffice-editor-dock-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    min-height: 46px;
    font-size: 1.3em;
}

.onlineoffice-editor-dock-btn .fa,
.onlineoffice-editor-dock-btn .fas {
    font-size: 1.3em;
}

.onlineoffice-list-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
}

.onlineoffice-list-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.onlineoffice-list-actions a img,
.onlineoffice-list-actions a .fa,
.onlineoffice-list-actions a .fas {
    transform: scale(1.3);
    transform-origin: center;
}


.onlineoffice-share-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.onlineoffice-permission-help-box {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 14px;
    border: 1px solid #ddd;
    background: #fafafa;
    border-radius: 6px;
}

.onlineoffice-permission-help-row {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 12px;
    align-items: start;
}

/* Office Focus Mode is intentionally limited to small screens.
   Desktop keeps the normal Dolibarr editor frame even if a focus URL is opened. */
.onlineoffice-focus-toggle,
.onlineoffice-return-floating {
    display: none !important;
}

@media (max-width: 768px) {
    .onlineoffice-focus-toggle {
        display: inline-flex !important;
    }

    body.onlineoffice-focus-mode,
    body.onlineoffice-focus-mode #id-container,
    body.onlineoffice-focus-mode #id-right,
    body.onlineoffice-focus-mode .fiche,
    body.onlineoffice-focus-mode .fichecenter,
    .onlineoffice-editor-page.onlineoffice-focus-mode,
    .onlineoffice-editor-page.onlineoffice-focus-mode .onlineoffice-editor-shell {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: none !important;
    }

    body.onlineoffice-focus-mode {
        overflow: hidden !important;
    }

    body.onlineoffice-focus-mode #id-top,
    body.onlineoffice-focus-mode #id-left,
    body.onlineoffice-focus-mode .side-nav,
    body.onlineoffice-focus-mode .tmenu,
    body.onlineoffice-focus-mode .vmenu,
    body.onlineoffice-focus-mode .onlineoffice-editor-dock,
    .onlineoffice-editor-page.onlineoffice-focus-mode .onlineoffice-editor-title,
    .onlineoffice-editor-page.onlineoffice-focus-mode .margintitle,
    .onlineoffice-editor-page.onlineoffice-focus-mode .opacitymedium {
        display: none !important;
    }

    .onlineoffice-editor-page.onlineoffice-focus-mode .onlineoffice-editor-frame,
    .onlineoffice-editor-page.onlineoffice-focus-mode .onlineoffice-doceditor-container {
        width: 100% !important;
        height: 100dvh !important;
        min-height: 100dvh !important;
        border: 0 !important;
        border-radius: 0 !important;
    }

    .onlineoffice-return-floating {
        position: fixed;
        top: 8px;
        left: 8px;
        z-index: 99999;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.94);
        color: #222;
        border: 1px solid #ccc;
        border-radius: 18px;
        padding: 7px 12px;
        font-size: 13px;
        line-height: 1.2;
        text-decoration: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    }

    .onlineoffice-return-floating:hover,
    .onlineoffice-return-floating:focus {
        background: #fff;
        color: #222;
        text-decoration: none;
    }
}
