/*
 * QP panel–only styling for the live math preview panel shown beneath each RichEditor.
 * Registered as a Filament asset — see App\Providers\AppServiceProvider::boot().
 */

/* Ensure the editor content area always retains full width and cannot be crushed into a column */
.fi-fo-rich-editor-content {
    min-width: 0 !important;
    width: 100% !important;
}

.fi-fo-rich-editor-content .ProseMirror,
.fi-fo-rich-editor-content .tiptap {
    width: 100% !important;
}

/* Custom font size classes for RichEditor & Preview */
.font-tiny,
.text-tiny {
    font-size: 0.75em !important;
}

.font-large,
.text-large {
    font-size: 1.25em !important;
}

.fisat-math-live-preview {
    display: none;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-top: 0;
    border: none !important;
    border-top: 2px dashed #c7d2fe !important;
    border-radius: 0 0 0.5rem 0.5rem;
    background: #fafafa;
    overflow: hidden;
}
.dark .fisat-math-live-preview {
    border-top-color: #4338ca !important;
    background: #111827;
}
.fisat-math-live-preview-label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.75rem;
    font-size: 0.6rem;
    font-weight: 700;
    color: #a5b4fc;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    user-select: none;
    background: #eef2ff;
}
.dark .fisat-math-live-preview-label {
    background: #1e1b4b;
    color: #818cf8;
}
.fisat-math-live-preview-body {
    padding: 0.625rem 1rem 0.75rem;
    font-size: 0.95rem;
    color: #1f2937;
    line-height: 1.75;
    overflow-x: auto;
    word-break: break-word;
    white-space: pre-wrap;
}
.dark .fisat-math-live-preview-body {
    color: #e5e7eb;
}
.fisat-math-live-preview-body .katex-display {
    margin: 0.4em 0;
}
.fisat-math-live-preview-body p {
    margin: 0 0 0.4em;
}
.fisat-math-live-preview-body p:last-child {
    margin-bottom: 0;
}
