.aptigence-rich-text-fallback {
    min-height: 10rem;
}

.note-editor.note-frame {
    border-color: rgba(15, 23, 42, 0.22);
    border-radius: 0.7rem;
    box-shadow: none;
    overflow: hidden;
}

.note-editor.note-frame:focus-within {
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.note-editor .note-toolbar {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.12);
    padding: 0.45rem;
}

.note-editor .note-btn {
    min-height: 2rem;
    color: #0f172a;
}

.note-editor .note-btn:focus-visible,
.note-editor .note-editable:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
}

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

.note-editor .note-editable {
    background: #fff;
    color: #0f172a;
    line-height: 1.55;
}

.note-editor .note-editable table,
.aptigence-rich-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
}

.note-editor .note-editable th,
.note-editor .note-editable td,
.aptigence-rich-content th,
.aptigence-rich-content td {
    border: 1px solid rgba(15, 23, 42, 0.2);
    padding: 0.45rem 0.55rem;
    text-align: left;
    vertical-align: top;
}

.note-editor .note-editable img,
.aptigence-rich-content img {
    max-width: 100%;
    height: auto;
}

.note-editor .note-editable blockquote,
.aptigence-rich-content blockquote {
    margin: 0.8rem 0;
    padding: 0.55rem 0.85rem;
    border-left: 4px solid #64748b;
    background: #f8fafc;
}

.aptigence-rich-content {
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.6;
}

.aptigence-rich-content > :first-child {
    margin-top: 0;
}

.aptigence-rich-content > :last-child {
    margin-bottom: 0;
}

.aptigence-rich-content h2,
.aptigence-rich-content h3,
.aptigence-rich-content h4 {
    line-height: 1.25;
    margin: 1.25em 0 0.55em;
}

.aptigence-rich-content p,
.aptigence-rich-content ul,
.aptigence-rich-content ol,
.aptigence-rich-content pre {
    margin: 0.7em 0;
}

.aptigence-rich-content ul,
.aptigence-rich-content ol {
    padding-left: 1.5rem;
}

.aptigence-rich-content a {
    color: #1d4ed8;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.aptigence-rich-content pre,
.aptigence-rich-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.aptigence-rich-content pre {
    max-width: 100%;
    overflow-x: auto;
    padding: 0.8rem;
    border-radius: 0.45rem;
    background: #f1f5f9;
}

.note-modal {
    z-index: 1600;
}

.note-popover {
    z-index: 1610;
}

@media (max-width: 640px) {
    .note-editor .note-toolbar {
        overflow-x: auto;
        white-space: nowrap;
    }
}
