/* task-body-editor-and-topbar-slider-debug (۲۰۲۶-۰۸-۳۱) -- کامپوزر بدنهٔ مقاله */

.mh-block-composer .mh-content-row { align-items: center; }
.mh-block-badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 20px;
    background: #eef2f3; color: #55666c; margin-inline-end: 8px;
}
.mh-block-badge-heading   { background: #e8f0fe; color: #1a56b0; }
.mh-block-badge-link_box  { background: #fff2e6; color: #b5651d; }
.mh-block-badge-text_only { background: #eef7ee; color: #2a7a2f; }
.mh-block-badge-gallery   { background: #f3ecfb; color: #6a3fa0; }
.mh-block-badge-video     { background: #fdeaea; color: #b3312c; }

.mh-block-edit { list-style: none; padding: 12px; background: #f7fbfb; border: 1px solid #d9e6e7; border-radius: 10px; margin: 4px 0 10px; }

/* #135 -- دستگیرهٔ «+» بین بلوک‌ها (الگوی Notion) */
.mh-block-inserter { list-style: none; display: flex; justify-content: center; align-items: center; height: 8px; margin: 0; padding: 0; border: 0; background: none; position: relative; }
.mh-block-inserter::before { content: ''; position: absolute; inset-inline: 8px; height: 2px; background: transparent; border-radius: 2px; transition: background .15s; }
.mh-inserter-btn {
    width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 1.5px solid transparent;
    background: transparent; color: var(--iq-primary, #16ACB7); cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 11px;
    opacity: 0; transform: scale(.7); transition: .15s; position: relative; z-index: 1;
}
.mh-block-inserter:hover::before { background: var(--iq-primary, #16ACB7); opacity: .35; }
.mh-block-inserter:hover .mh-inserter-btn,
.mh-inserter-btn:focus-visible { opacity: 1; transform: scale(1); border-color: var(--iq-primary, #16ACB7); background: #fff; }
.mh-insert-after-btn { color: var(--iq-primary, #16ACB7); }
.mh-picker-armed { outline: 2px dashed var(--iq-primary, #16ACB7); outline-offset: 4px; border-radius: 12px; }
.mh-insert-hint { font-size: 12px; font-weight: 600; color: var(--iq-primary, #16ACB7); background: #e8f7f8; border-radius: 8px; padding: 6px 10px; margin: 0 0 10px; }

/* روی موبایل دستگیره همیشه نیمه‌دیده تا با تپ پیدا شود */
@media (max-width: 640px) {
    .mh-block-inserter { height: 26px; }
    .mh-inserter-btn { opacity: .55; transform: scale(1); border-color: #cfe0e1; background: #fff; }
}

/* --- add picker --- */
.mh-block-add-picker { margin: 10px 0; }
.mh-block-add-label { display: block; font-size: 13px; font-weight: 600; color: #2b3b41; margin-bottom: 8px; }
.mh-block-type-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mh-block-type-card {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 14px 8px; border: 1.5px solid #d7dee2; border-radius: 12px;
    background: #fff; color: #33474e; cursor: pointer; font: inherit; font-size: 13px;
    transition: .15s;
}
.mh-block-type-card:hover { border-color: var(--iq-primary, #16ACB7); background: #f2fafb; }
.mh-block-type-card i { font-size: 20px; color: var(--iq-primary, #16ACB7); }

#mh-block-add-form { margin-top: 12px; padding: 14px; border: 1px solid #d9e6e7; border-radius: 12px; background: #f7fbfb; }
.mh-btn-cancel { background: transparent; border: 0; color: #8a9aa0; cursor: pointer; font: inherit; margin-inline-start: 8px; }

/* --- heading block --- */
.mh-block-heading-opts { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; }
.mh-seg { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.mh-seg-opt { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border: 1px solid #d7dee2; border-radius: 8px; cursor: pointer; font-size: 12px; margin: 0; }
.mh-seg-opt input { accent-color: var(--iq-primary, #16ACB7); }
.mh-frame-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.mh-frame-opt { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; font-size: 11px; margin: 0; }
.mh-frame-opt input { position: absolute; opacity: 0; }
.mh-frame-preview { display: block; width: 92px; padding: 6px 8px; font-size: 11px; text-align: center; background: #fff; border: 1px solid #e0e6e9; border-radius: 6px; color: #33474e; }
.mh-frame-opt input:checked + .mh-frame-preview { outline: 2px solid var(--iq-primary, #16ACB7); }
.mh-frame-preview-bar       { border-inline-start: 4px solid var(--iq-primary, #16ACB7); }
.mh-frame-preview-accent    { background: var(--iq-primary, #16ACB7); color: #fff; border-color: var(--iq-primary, #16ACB7); }
.mh-frame-preview-box       { border: 2px solid var(--iq-primary, #16ACB7); }
.mh-frame-preview-underline { border: 0; border-bottom: 3px solid var(--iq-primary, #16ACB7); border-radius: 0; }

/* --- link_box picker --- */
.mh-lb-picker { border: 1px solid #e0e6e9; border-radius: 10px; overflow: hidden; margin: 8px 0 14px; }
.mh-lb-search-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #f6f9fa; border-bottom: 1px solid #e6ecee; }
.mh-lb-search-row i { color: #90a4ab; }
.mh-lb-search { border: 0 !important; background: transparent; flex: 1; }
.mh-lb-filter-row { padding: 8px 10px; border-bottom: 1px solid #eef2f3; }
.mh-lb-results { max-height: 220px; overflow-y: auto; }
.mh-lb-result { display: flex; align-items: center; gap: 8px; width: 100%; text-align: start; padding: 7px 12px; border: 0; border-bottom: 1px solid #f0f3f4; background: #fff; cursor: pointer; font: inherit; }
.mh-lb-result:hover { background: #f7fbfb; }
.mh-lb-result.is-picked { background: #e8f7f8; }
.mh-lb-result[hidden] { display: none; }
.mh-lb-result-badge { flex: none; font-size: 10px; padding: 2px 7px; border-radius: 12px; background: #eceff0; color: #55666c; }
.mh-lb-result-title { flex: 1; font-size: 13px; color: #2b3b41; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mh-lb-toggles { display: flex; gap: 16px; flex-wrap: wrap; margin: 8px 0; font-size: 12px; }
.mh-lb-toggles .mh-check { display: inline-flex; align-items: center; gap: 6px; }

/* --- mobile bottom-sheet --- */
@media (max-width: 640px) {
    .mh-block-type-cards { grid-template-columns: repeat(2, 1fr); }
    .mh-block-type-card { padding: 18px 8px; font-size: 14px; }
    .mh-block-type-card i { font-size: 24px; }
    body.mh-sheet-open { overflow: hidden; }
    body.mh-sheet-open #mh-block-add-form {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 3000;
        max-height: 88vh; overflow-y: auto; margin: 0;
        border-radius: 16px 16px 0 0; box-shadow: 0 -8px 30px rgba(0,0,0,.25);
    }
    body.mh-sheet-open::after {
        content: ''; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 2999;
    }
    .mh-block-heading-opts { flex-direction: column; gap: 10px; }
}

/* ===== frontend (article.blade.php) — inline blocks ===== */
.mh-body-heading { margin: 26px 0 12px; font-weight: 700; line-height: 1.5; color: #1b2b31; }
h2.mh-body-heading { font-size: 1.5rem; }
h3.mh-body-heading { font-size: 1.22rem; }
.mh-body-heading.mh-hf-bar { border-inline-start: 5px solid var(--mh-primary, #16ACB7); padding-inline-start: 12px; }
.mh-body-heading.mh-hf-accent { background: var(--mh-primary, #16ACB7); color: #fff; padding: 8px 14px; border-radius: 8px; }
.mh-body-heading.mh-hf-box { border: 2px solid var(--mh-primary, #16ACB7); padding: 8px 14px; border-radius: 8px; }
.mh-body-heading.mh-hf-underline { border-bottom: 3px solid var(--mh-primary, #16ACB7); padding-bottom: 6px; display: inline-block; }

.mh-inline-linkbox {
    margin: 22px 0; padding: 16px 18px; border: 1px solid #e0e6e9;
    border-inline-start: 5px solid var(--mh-primary, #16ACB7);
    border-radius: 10px; background: #f8fbfb;
    display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap;
}
.mh-inline-linkbox .mh-ilb-photo { width: 84px; height: 84px; border-radius: 8px; object-fit: cover; flex: none; }
.mh-inline-linkbox .mh-ilb-body { flex: 1; min-width: 200px; }
.mh-inline-linkbox .mh-ilb-kicker { font-size: 12px; color: var(--mh-primary, #16ACB7); font-weight: 700; margin-bottom: 4px; }
.mh-inline-linkbox .mh-ilb-title { font-size: 1.05rem; font-weight: 700; margin: 0 0 6px; color: #1b2b31; }
.mh-inline-linkbox .mh-ilb-desc { font-size: .92rem; color: #55666c; margin: 0 0 10px; }
.mh-inline-linkbox .mh-ilb-btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px;
    background: var(--mh-primary, #16ACB7); color: #fff; border-radius: 8px;
    text-decoration: none; font-size: .9rem; font-weight: 600;
}
@media (max-width: 575px) {
    .mh-inline-linkbox { flex-direction: column; }
}

/* article subtitle */
.mh-article-subtitle { font-size: 1.15rem; color: #55666c; font-weight: 400; margin: 6px 0 14px; line-height: 1.6; }
