﻿.modal-context-menu {
    background: #010101
}

    .modal-context-menu button:hover {
        background: #f0f0f0;
        color: #010101
    }

.tiptap:focus-visible, input#linkUrlInput:focus-visible {
    outline: 0;
    box-shadow: none
}

.btn-danger {
    background: var(--mainRed);
    color: #fff;
    box-shadow: 0 4px 10px rgba(231,56,39,0.3)
}

    .btn-danger:hover {
        background: linear-gradient(to right,#e73827,#c12f20)
    }

.gbg-1 {
    background: linear-gradient(135deg,#00abff,#c806e2)
}

    .gbg-1:hover {
        background: linear-gradient(135deg,#c806e2,#00abff)
    }

.gbg-2 {
    background: linear-gradient(135deg,#0fc,#3a47d5)
}

.gbg-3 {
    background: linear-gradient(135deg,#00d2ff,#3a47d5)
}

    .gbg-3:hover {
        background: linear-gradient(135deg,#3a47d5,#00d2ff)
    }

.gbg-10 {
    background: linear-gradient(135deg,#00abff,#c806e2)
}

.gbg-100 {
    background: linear-gradient(90deg,#8a00e6,#e66000)
}

    .gbg-100:hover {
        background: linear-gradient(90deg,#e66000,#8a00e6)
    }

.tiptap {
    color: var(--textColor) !important;
    background-color: var(--bodyBg);
    margin-top: 0;
    padding: 20px;
    height: 300px;
    overflow-y: auto;
    border-radius: 10px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    line-height: 1.6
}

    .tiptap.ProseMirror h3 {
        margin: 1rem 0
    }

    .tiptap.ProseMirror p {
        margin-bottom: 15px
    }

.tiptap-editor {
    text-align: left;
    background: rgb(32 38 54 / 90%);
    padding: 5px;
    border-radius: var(--bdrRadius);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0
}

#tableModal input, #imageModal input, .alignment-dropdown, input.modal-input {
    background-color: var(--bodyBg);
    color: var(--textColor) !important;
    border-radius: var(--bdrRadius);
    min-height: 45px;
    outline: 0;
    border: 0;
    padding-left: 15px
}

.table-check {
    appearance: auto !important
}

.preview-image {
    max-width: 100%;
    max-height: 350px;
    display: block
}

.image-preview-div {
    max-width: 100%;
    max-height: 350px;
    display: none
}

pre {
    background-color: #293138;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto
}

.tiptap.ProseMirror code {
    font-family: 'Courier New',monospace;
    background-color: transparent !important;
    padding: .2rem .4rem;
    border-radius: 3px
}

.toolbar button {
    color: black
}

.gradient-button {
    display: inline-block;
    color: #fff !important;
    background: linear-gradient(90deg,#8a00e6,#e66000);
    padding: .5rem 1rem;
    border-radius: 40px;
    text-decoration: none;
    transition: background .3s,transform .3s
}

    .gradient-button:hover {
        color: #fff !important;
        background: linear-gradient(90deg,#e66000,#8a00e6)
    }

.modal-content:not(.emotion-popup-wrapper) {
    background-color: var(--boxbg);
    padding: 20px;
    border-radius: 5px;
    height: auto;
    max-height: fit-content;
    max-width: 90%;
    width: 430px;
    margin-top: 65px
}

.image-upload-modal, .modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(0 0 0 / 70%);
    z-index: 1000;
    justify-content: center
}

.image-url-input {
    margin-bottom: 10px;
    width: 100%;
    padding: 8px;
    box-sizing: border-box
}

.tab-nav {
    display: flex;
    border-bottom: 1px solid #ddd
}

.tab-btn {
    padding: 8px 16px;
    background: 0;
    border: 0;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-right: 5px
}

    .tab-btn.active {
        border-bottom: 2px solid #4caf50;
        font-weight: bold
    }

.tab-content {
    display: none
}

    .tab-content.active {
        display: block
    }

.ProseMirror ul, .ProseMirror ol {
    padding-left: 1.5rem;
    margin: .75rem 0
}

.ProseMirror ul {
    list-style-type: disc
}

.ProseMirror ol {
    list-style-type: decimal
}

.ProseMirror li {
    margin: .25rem 0
}

.ProseMirror a {
    color: #06c;
    text-decoration: underline;
    cursor: pointer
}

    .ProseMirror a:hover {
        color: #049
    }

#linkUrlInput {
    width: 100%;
    padding: 8px;
    margin: 10px 0;
    box-sizing: border-box
}

.close {
    float: right;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    position: relative;
    top: -9px
}

.toolbar button {
    padding: 6px 10px;
    margin: 2px;
    border: 0;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center
}

    .toolbar button:hover, .toolbar .active-heading {
        background-color: #31394a;
    }

    .toolbar button svg {
        pointer-events: none
    }

.tiptap-svg-fill, .tiptap-svg-fill path {
    width: 1.5rem;
    height: 1.5rem;
    fill: white
}

.tiptap-svg-stroke {
    color: white
}

.input-group {
    margin-bottom: 12px;
    display: flex;
    align-items: center
}

    .input-group label {
        width: 100px;
        margin-right: 10px
    }

.button-group {
    display: flex;
    gap: 8px;
    margin-bottom: 8px
}

.editor-table {
    border-collapse: collapse;
    margin: 1rem 0;
    width: 100%;
    table-layout: fixed
}

    .editor-table td, .editor-table th {
        border: 1px solid #ddd;
        padding: 8px;
        min-width: 100px;
        height: 30px
    }

    .editor-table th {
        background-color: #f5f5f5;
        font-weight: bold
    }

.ProseMirror table {
    border-collapse: collapse;
    margin: 0;
    overflow: hidden;
    table-layout: fixed;
    width: 100%
}

.ProseMirror td, th {
    border: 1px solid #ddd;
    box-sizing: border-box;
    min-width: 1em;
    padding: 8px;
    position: relative;
    vertical-align: top
}

.table-modal .modal-content {
    height: auto
}

.ProseMirror pre {
    white-space: pre-wrap;
    padding: 15px;
    border-radius: 4px;
    font-family: monospace;
    margin: 0;
    color: white
}

.ProseMirror textarea {
    width: 100%;
    min-height: 300px;
    font-family: 'Courier New',monospace;
    padding: 10px;
    border: 1px solid #ddd
}

.size-controls {
    display: flex;
    gap: 10px;
    margin: 10px 0 0 0
}

    .size-controls > div {
        flex: 1
    }

.modal-input {
    width: 100%;
    padding: 8px;
    box-sizing: border-box
}

[data-youtube] {
    max-width: 100%
}

    [data-youtube] iframe {
        border: 0;
        display: block
    }

.ProseMirror blockquote {
    border-left: 5px solid #007acc;
    background: #f0f8ff;
    padding: .75em 1.25em;
    margin: 1em 0;
    font-style: italic;
    color: #333;
    position: relative
}

    .ProseMirror blockquote::before {
        content: "\201C";
        font-size: 2em;
        color: #007acc;
        position: absolute;
        left: 0;
        top: 0
    }

.modal-content > div:first-of-type {
    display: flex;
    justify-content: space-between
}

.table-modal input[type='checkbox'] {
    margin-right: 10px !important
}

.table-modal-section h4 {
    margin-bottom: 20px;
    font-size: 1.2em;
    color: #333
}

.modal-buttons {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 10px
}

.ProseMirror img {
    display: block;
    max-width: 100%;
    height: auto
}

.preview-container {
    border: 1px dashed #ddd;
    padding: 15px;
    border-radius: 4px;
    background-color: var(--bodyBg);
    min-height: 418px;
    max-height: fit-content;
    display: flex;
    margin-bottom: 15px;
    align-items: center;
    justify-content: center
}

.image-preview-container {
    margin-top: 15px;
    width: 80%;
    display: none
}

.alignment-btn.active {
    filter: brightness(1.1);
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    transform: scale(1.05);
    border: 2px solid #fff
}

.tiptap-modal .form-group {
    margin-bottom: 15px
}

    .tiptap-modal .form-group label {
        display: block;
        margin-bottom: 5px;
        font-weight: 500;
        text-align: left
    }

.alignment-dropdown:hover {
    border-color: #bbb
}

.alignment-dropdown:focus {
    outline: 0;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25)
}

.image-upload-modal.active {
    display: flex
}

.image-preview {
    display: flex;
    align-items: center;
    gap: 15px
}

.image-upload-modal .modal-content {
    width: 700px;
    max-width: 90vw;
    position: relative
}

.image-upload-modal h3 {
    margin: 0 0 10px
}

.image-upload-modal .close {
    position: absolute;
    top: 5px;
    right: 20px;
    font-size: 28px
}

.alignment-buttons {
    display: flex;
    gap: 8px;
    flex-direction: column
}

.ProseMirror p.is-empty:first-child::before {
    content: attr(data-placeholder);
    float: left;
    color: #666;
    pointer-events: none;
    height: 0
}

.tiptap.is-empty .is-editor-empty:first-child[data-placeholder]::before {
    content: attr(data-placeholder);
    display: block !important;
    opacity: .5;
    pointer-events: none;
    position: absolute
}

.tiptap:not(.is-empty) [data-placeholder]::before {
    display: none !important
}

.youtube-error-message {
    color: #f44;
    margin-bottom: 10px;
    text-align: left
}

.modal-context-menu {
    border: 1px solid #ccc;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    padding: 5px;
    border-radius: 4px
}

    .modal-context-menu button {
        display: block;
        width: 100%;
        text-align: left;
        background: 0;
        border: 0;
        padding: 8px 12px;
        cursor: pointer;
        white-space: nowrap
    }

.ProseMirror table.resizable {
    position: relative
}

    .ProseMirror table.resizable > * {
        position: relative
    }

.ProseMirror .column-resize-handle {
    position: absolute;
    right: -2px;
    top: 0;
    bottom: 0;
    width: 4px;
    cursor: col-resize;
    border-right: 1px solid #ccc
}

.alignment-buttons .btn {
    min-width: 87px
}

.tiptap img.is-selected {
    outline: 2px solid #222;
    outline-offset: 2px
}
