/* Fix for passive event listener warnings */
* {
    touch-action: pan-x pan-y;
}

/* TinyMCE specific fixes */
.tox-tinymce {
    touch-action: manipulation;
}

.tox-tinymce * {
    touch-action: manipulation;
}

/* Editor content area */
.tox-edit-area {
    touch-action: manipulation;
}

.tox-edit-area * {
    touch-action: manipulation;
}

/* Toolbar */
.tox-toolbar {
    touch-action: manipulation;
}

.tox-toolbar * {
    touch-action: manipulation;
}

/* Menu */
.tox-menu {
    touch-action: manipulation;
}

.tox-menu * {
    touch-action: manipulation;
}

/* Dialog */
.tox-dialog {
    touch-action: manipulation;
}

.tox-dialog * {
    touch-action: manipulation;
}

/* Prevent scroll blocking */
.tox-tinymce,
.tox-edit-area,
.tox-toolbar,
.tox-menu,
.tox-dialog {
    overscroll-behavior: contain;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Prevent horizontal scroll on mobile */
body {
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
    .tox-tinymce,
    .tox-edit-area,
    .tox-toolbar,
    .tox-menu,
    .tox-dialog {
        -webkit-user-select: none;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
    }
}

/* Fix for Android Chrome */
@media screen and (max-width: 768px) {
    .tox-tinymce,
    .tox-edit-area,
    .tox-toolbar,
    .tox-menu,
    .tox-dialog {
        touch-action: manipulation;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
    }
}
