@import '@/../node_modules/@radix-ui/themes/styles.css';
@import '@/../node_modules/@radix-ui/colors/black-alpha.css';
@import '@/../node_modules/@radix-ui/colors/mauve.css';
@import '@/../node_modules/@radix-ui/colors/violet.css';

@import "@/../node_modules/tailwindcss/base";
@import "@/../node_modules/tailwindcss/components";
@import "@/../node_modules/tailwindcss/utilities";
@import "@/../node_modules/tailwindcss/screens";

@tailwind base;
@tailwind components;
@tailwind utilities;
@tailwind screens;

.tiptap {
    font-size: 1.1em;
}

/* Basic editor styles */
.tiptap > * + * {
    margin-top: 0.75em;
}

.tiptap {
    h1, h2, h3, h4, h5, h6 {
        line-height: 1.1;
        font-weight: 300;
        margin: 1rem 0;
    }

    h1 {
        font-size: 2.0rem;
        line-height: 1.2;
    }

    h2 {
        font-size: 1.8rem;
        line-height: 1.25;
    }

    h3 {
        font-size: 1.6rem;
        line-height: 1.3;
    }

    h4 {
        font-size: 1.4rem;
        line-height: 1.35;
    }

    h5 {
        font-size: 1.2rem;
        line-height: 1.5;
    }

    h6 {
        font-size: 1.6rem;
        line-height: 1.4;
    }

    a {
        color: #1abc9c;
        text-decoration: none;
    }

    a:focus, a:hover {
        color: #23B7F3;
    }

    dl,
    ol,
    ul {
        list-style: none;
        margin-top: 0;
        padding-left: 0;
    }


    dl dl,
    dl ol,
    dl ul,
    ol dl,
    ol ol,
    ol ul,
    ul dl,
    ul ol,
    ul ul {
        font-size: 90%;
        margin: 1.5rem 0 1.5rem 3.0rem;
    }

    ol {
        list-style: decimal;
        padding: 0.3rem;
        margin-left: 1rem;
    }

    ul {
        list-style: circle;
        padding: 0.3rem;
        margin-left: 1rem;
    }

    li {
        color: #384452;
    }

    .button,
    button,
    dd,
    dt {
        margin-bottom: 1.0rem;
    }

    fieldset,
    input,
    select,
    textarea {
        margin-bottom: 1.5rem;
    }

    blockquote,
    dl,
    figure,
    form,
    pre,
    table {
        margin-bottom: 1rem;
    }

    table {
        border-spacing: 0;
        width: 100%;
    }

    table thead th,
    thead th {
        border-top: 0.1rem solid #d1d8df;
        background: #fdfdfd;
    }

    tbody tr:nth-child(even) {
        background: #fdfdfd;
    }

    tbody tr:nth-child(odd) {
        background: #eef1f5;
    }

    td,
    th {
        border-bottom: 0.1rem solid #d1d8df;
        padding: 1.2rem 1.5rem;
        text-align: left;
    }

    u {
        text-decoration: none;
        border-bottom: 1px dashed;
    }

    a {
        text-decoration: none;
    }

    u {
        background: #ffff3a;
    }

    b,
    strong {
        font-weight: bold;
    }

    p {
        margin: 0.3em 0;
    }

    code {
        font-size: 0.8em;
        background-color: #011c32;
        padding: 0.2em 0.5em;
        border-radius: 4px;
        color: #e6e6e6;
    }

    pre {
        background: #011c32;
        color: #fff;
        font-family: 'JetBrainsMono', monospace;
        padding: 0.75rem 1rem;
        border-radius: 0.5rem;
    }

    pre code {
        color: inherit;
        padding: 0;
        background: none;
        font-size: 0.8rem;
    }

    img {
        max-width: 100%;
        height: auto;
    }

    blockquote {
        padding-left: 1rem;
        border-left: 2px solid rgba(13, 13, 13, 0.1);
    }

    hr {
        border: none;
        border-top: 2px solid rgba(13, 13, 13, 0.1);
        margin: 2rem 0;
    }

    button {
        all: unset;
    }
}

.node-inline-completion {
    display: inline-block;
    background: var(--violet-3);
    padding: 0 8px;
    border-radius: 4px;
}

.node-inline-completion svg {
    display: inline-block;
}

.toolbar-menu {
    box-shadow: 0 2px 2px var(--black-a7);
}


.b3-color-deep-blue {
    color: #011c32;
}

.b3-color-blue {
    color: #03467d;
}

.b3-color-light-blue {
    color: #63c3fd;
}

.b3-color-red {
    color: #da4167;
}

.b3-color-bg-red {
    background-image: linear-gradient(
            74deg,
            rgb(66, 133, 244) 0px,
            rgb(155, 114, 203) 9%,
            rgb(217, 101, 112) 20%,
            rgb(217, 101, 112) 24%,
            rgb(155, 114, 203) 35%,
            rgb(66, 133, 244) 44%,
            rgb(155, 114, 203) 50%,
            rgb(217, 101, 112) 56%,
            rgb(19, 19, 20) 75%,
            rgb(19, 19, 20) 100%
    );
    background-size: 400% 100%;
}

.b3-color-purple {
    color: #8A4FFF;
}

.b3-color-yellow {
    color: #fad35e;
}

.b3-color-bg-yellow {
    background-color: #fad35e;
}

.toggle-group {
    display: flex;
    border-radius: 4px;
    justify-content: center;
    width: fit-content;
    margin: 0 auto;
}

.toggle-group-item {
    cursor: pointer;
    background-color: white;
    color: var(--mauve-11);
    height: 38px;
    width: 38px;
    display: flex;
    font-size: 15px;
    line-height: 1;
    align-items: center;
    justify-content: center;
    margin-left: 1px;
}

.toggle-group-item:first-child {
    margin-left: 0;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.toggle-group-item:last-child {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.toggle-group-item:hover {
    background-color: #03467d;
    color: #fff;
}

.toggle-group-item.is-active {
    background-color: #63c3fd;
    color: #fff;
}

.toggle-group-item:focus {
    position: relative;
    box-shadow: 0 0 0 2px #03467d;
}

.bubble-menu-group {
    width: 240px;
    border-radius: 4px;
}

.bubble-menu-group svg {
    display: inline-block;
}

.bubble-menu-item {
    padding: 0.5em;
    background: #fff;
    color: #000;
    cursor: pointer;
    border: 1px solid var(--violet-6);
}

.bubble-menu-item svg {
    color: var(--violet-11);
    font-weight: bold;
    display: inline;
}

:root {
    --gradient-shadow: linear-gradient(
            15deg,
            #fb0094,
            #0000ff,
            #00ff00,
            #ffff00,
            #ff0000,
            #fb0094,
            #0000ff,
            #00ff00,
            #ffff00,
            #ff0000
    );
}

.shadow {
    position: relative;
    padding: 0 10px;
    border-radius: 4px;
    margin: 0 20px 20px;
    min-height: 64px;
    background: linear-gradient(0deg, #fff, #fff);
}

.ai-block-editor-block {
    display: flex;
    flex-direction: column;
}

.ai-block-editor {
    width: 100%;
}

.ai-block-editor-inner {
    min-height: 64px;
}

.ai-block-action-block {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

.ai-block-action-block div {
    flex: 1;
}

.llm-type-select button span {
    display: inline-block;
}

.llm-type-select {
    justify-content: flex-start;
}

.ai-block-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1em;
}

.ai-block-actions button {
    border-radius: 4px;
    padding: 0 1em;
    background: var(--mauve-4);
    border: 2px solid var(--mauve-5);
    margin-right: 4px;
}

.ai-block-actions button svg {
    margin-left: 8px;
}

.ai-block-actions button span {
    padding: 0.2em;
    font-size: 10px;
    line-height: 10px;
    border-radius: 4px;
    background: var(--mauve-2);
}

.ai-block-actions svg {
    display: inline-block;
}

.shadow:before,
.shadow:after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    background: var(--gradient-shadow);
    background-size: 400%;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    z-index: -1;
    animation: animate 20s linear infinite;
}

.shadow:after {
    filter: blur(10px);
}

@keyframes animate {
    0% {
        background-position: 0 0;
    }
    50% {
        background-position: 300% 0;
    }
    100% {
        background-position: 0 0;
    }
}

.ProseMirror-content {
    overflow-y: scroll;
}

.ProseMirror-focused {
    outline: #0d0d0d;
}

.ProseMirror insert {
    color: green;
    text-decoration: underline;
}

.ProseMirror delete {
    color: #da4167;
    text-decoration: line-through;
}

.ProseMirror .my-advice {
    border-bottom-width: 2px;
    --tw-border-opacity: 1;
    border-color: rgb(117 9 34 / var(--tw-border-opacity));
    --tw-bg-opacity: 1;
    background-color: rgb(217 39 80 / var(--tw-bg-opacity))
}

.bubble-menu-group {
    position: absolute;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.bubble-menu-tier1 {
    display: flex;
    flex-direction: row;
    background: var(--mauve-1);
    border: 1px solid var(--mauve-5);
    border-radius: 4px;
    height: 40px;
    box-shadow: var(--black-a6) 0 3px 16px -5px, var(--black-a2) 0px 1px 3px;
}

.ask-ai-dropdown {
    background: var(--mauve-1);
    width: 160px;
    margin-top: 4px;
    box-shadow: var(--black-a6) 0 3px 16px -5px, var(--black-a2) 0px 1px 3px;
    border-radius: 4px;
}

.ask-ai-dropdown ul {
    padding: 4px;
}

.ask-ai-dropdown .dropdown-item:hover {
    background-color: var(--violet-9);
    color: var(--violet-1);
}

.ask-ai-dropdown .dropdown-item svg {
    position: absolute;
    right: 8px;
}

.ask-ai-dropdown .dropdown-item {
    font-size: 14px;
    line-height: 1.4;
    padding: 10px 5px;
    color: var(--violet-11);
    border-radius: 3px;
    display: flex;
    align-items: center;
    position: relative;
    user-select: none;
    outline: none;
    cursor: pointer;
    background: #fff;
}

.toolbar-ai-button {
    height: 38px;
}

.bubble-dropdown button {
    height: 38px;
    width: 96px;
}

.bubble-dropdown button {
    padding: 4px;
}

.node-quick-command {
    width: 720px;
    margin: 0 auto;
}
