/* Root styles */
:not(.tiptap-error) .tiptap {
    padding-left: 15px;
    padding-right: 15px;
    background-color: transparent;
    border-radius: 8px;
    border-style: solid;
    border-width: 1px;
    overflow: hidden;
    border-color: #e0e0e0;
    /* palette.neutral[200] */
    transition: border-color 0.3s, box-shadow 0.3s;
    /* Assuming muiTheme.transitions.create(["border-color", "box-shadow"]) translates to 0.3s for both */
}

.tiptap-error {
    background-color: transparent;
    border-radius: 8px;
    border-style: solid;
    border-width: 1px;
    overflow: hidden;
    /* palette.neutral[200] */
    transition: border-color 0.3s, box-shadow 0.3s;

    border-color: #F04438;
    /* palette.primary.main */
    box-shadow: #F04438 0 0 0 2px;
    /* palette.primary.main */
}

.tiptap:hover {
    background-color: #f5f5f5;
    /* palette.action.hover */
}

.tiptap::before {
    display: none;
}

.tiptap::after {
    display: none;
}

:not(.tiptap-error)>.tiptap:focus {
    background-color: transparent;
    border-color: #8dba00;
    /* palette.primary.main */
    box-shadow: #8dba00 0 0 0 2px;
    /* palette.primary.main */
}

.ProseMirror:focus {
    outline: none;
}

/* Basic editor styles */
.tiptap {
    :first-child {
        margin-top: 0;
    }

    /* Table-specific styling */
    table {
        border-collapse: collapse;
        margin: 0;
        overflow: hidden;
        table-layout: fixed;
        width: 100%;

        td,
        th {
            border: 1px solid #000000;
            box-sizing: border-box;
            min-width: 1em;
            padding: 6px 8px;
            position: relative;
            vertical-align: top;

            >* {
                margin-bottom: 0;
            }
        }

        th {
            background-color: #939393;
            font-weight: bold;
            text-align: left;
        }

        .selectedCell:after {
            background: rgba(180, 180, 180, 0.467);
            content: "";
            left: 0;
            right: 0;
            top: 0;
            bottom: 0;
            pointer-events: none;
            position: absolute;
            z-index: 2;
        }

        .column-resize-handle {
            background-color: #d000ff;
            bottom: -2px;
            pointer-events: none;
            position: absolute;
            right: -2px;
            top: 0;
            width: 4px;
        }
    }

    .tableWrapper {
        margin: 1.5rem 0;
        overflow-x: auto;
    }

    &.resize-cursor {
        cursor: ew-resize;
        cursor: col-resize;
    }
}

/* Input styles */
/* .tiptap-input {
    fontSize: 14px;
    font-weight: 500;
    line-height: 12px;
} */