
/* Lexical Editor Base Styles */

.lexical-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    align-items: center;
}

.lexical-toolbar__group {
    display: flex;
    gap: 0.25rem;
}

.lexical-toolbar__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2rem;
    padding: 0 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1f2937;
    background-color: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.lexical-toolbar__button:hover:not(.is-disabled) {
    background-color: #e5e7eb;
}

.lexical-toolbar__button.is-active {
    background-color: #2563eb;
    border-color: #1d4ed8;
    color: #ffffff;
}

.lexical-toolbar__button.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.lexical-toolbar__select {
    height: 2rem;
    padding: 0 0.5rem;
    font-size: 0.875rem;
    color: #1f2937;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
}

.lexical-toolbar__divider {
    width: 1px;
    height: 1.5rem;
    background-color: #e5e7eb;
    margin: 0 0.25rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.lexical-editor {
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 1rem;
    min-height: 300px;
    background-color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: #1f2937;
    cursor: text;
    outline: none;
    word-wrap: break-word;
}

.lexical-editor:focus,
.lexical-editor:focus-within {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.lexical-editor[contenteditable="false"] {
    background-color: #f9fafb;
    cursor: not-allowed;
}

.lexical-editor [contenteditable] {
    outline: none;
}

/* Paragraph */
.lexical-paragraph {
    margin: 0;
    padding: 0;
    position: relative;
}

.lexical-paragraph:not(:last-child) {
    margin-bottom: 1rem;
}

/* Text Formatting */
.lexical-textBold {
    font-weight: 600;
}

.lexical-textItalic {
    font-style: italic;
}

.lexical-textUnderline {
    text-decoration: underline;
}

/* Links */
.lexical-link {
    color: #3b82f6;
    text-decoration: underline;
    cursor: pointer;
}

.lexical-link:hover {
    text-decoration-color: #1e40af;
}

/* Lists */
.lexical-list-ul {
    list-style-type: disc;
}

.lexical-list-ol {
    list-style-type: decimal;
}

.lexical-list-item {
    list-style-position: outside;
    margin: 0.3rem 0;
}

.lexical-editor ul,
.lexical-editor ol {
    margin: 0 0 0.75rem 1.25rem;
    padding-left: 1.25rem;
}

.lexical-editor ul ul,
.lexical-editor ol ol,
.lexical-editor ul ol,
.lexical-editor ol ul {
    margin-left: 1rem;
}

/* Code blocks */
.lexical-code-block {
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    padding: 1rem;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.lexical-code-block code {
    color: #374151;
}

/* Blockquote */
.lexical-blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 1rem;
    margin-left: 0;
    margin-right: 0;
    font-style: italic;
    color: #6b7280;
}

/* Heading styles */
.lexical-h1,
.lexical-h2,
.lexical-h3,
.lexical-h4,
.lexical-h5,
.lexical-h6 {
    margin: 1.5rem 0 0.5rem 0;
    font-weight: 600;
}

.lexical-h1 {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.lexical-h2 {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.lexical-h3 {
    font-size: 1.5rem;
    line-height: 2rem;
}

.lexical-h4 {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.lexical-h5 {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.lexical-h6 {
    font-size: 1rem;
    line-height: 1.5rem;
}
