/* ==========================================
   ZENGİN METİN — editör (Quill) ve içerik gösterimi
   10.09.2026
   ========================================== */

/* ---------- Editör kabuğu (konu oluştur / düzenle) ---------- */
.rich-editor-wrap {
    border: 1px solid #dfe3e8;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
}
.rich-editor-wrap:focus-within {
    border-color: #0e3f83;
    box-shadow: 0 0 0 3px rgba(14, 63, 131, 0.12);
}
.rich-editor-wrap .ql-toolbar.ql-snow {
    border: none;
    border-bottom: 1px solid #e8ecf1;
    background: #f8fafc;
    padding: 6px 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 2px 6px;
    font-family: inherit;
}
.rich-editor-wrap .ql-toolbar.ql-snow .ql-formats { margin-right: 6px; }
.rich-editor-wrap .ql-toolbar.ql-snow button {
    border-radius: 6px;
    width: 30px;
    height: 28px;
}
.rich-editor-wrap .ql-toolbar.ql-snow button:hover,
.rich-editor-wrap .ql-toolbar.ql-snow button.ql-active,
.rich-editor-wrap .ql-toolbar.ql-snow .ql-picker-label:hover,
.rich-editor-wrap .ql-toolbar.ql-snow .ql-picker-label.ql-active { color: #0e3f83; background: rgba(14, 63, 131, 0.08); }
.rich-editor-wrap .ql-snow.ql-toolbar button:hover .ql-stroke,
.rich-editor-wrap .ql-snow.ql-toolbar button.ql-active .ql-stroke,
.rich-editor-wrap .ql-snow .ql-picker-label:hover .ql-stroke,
.rich-editor-wrap .ql-snow .ql-picker-label.ql-active .ql-stroke { stroke: #0e3f83; }
.rich-editor-wrap .ql-snow.ql-toolbar button:hover .ql-fill,
.rich-editor-wrap .ql-snow.ql-toolbar button.ql-active .ql-fill { fill: #0e3f83; }
.rich-editor-wrap .ql-snow .ql-picker { font-family: inherit; }
.rich-editor-wrap .ql-snow .ql-picker-label { border-radius: 6px; }

.rich-editor-wrap .ql-container.ql-snow {
    border: none;
    font-family: 'Inter', 'Noto Sans Regular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14.5px;
}
.rich-editor-wrap .ql-editor {
    min-height: 220px;
    max-height: 60vh;
    overflow-y: auto;
    padding: 14px 16px;
    line-height: 1.6;
    color: #1c1c1c;
}
.rich-editor-wrap .ql-editor.ql-blank::before {
    color: #9aa3ad;
    font-style: normal;
    left: 16px;
    right: 16px;
}
.rich-editor-wrap.is-disabled { opacity: .55; pointer-events: none; }

/* Türkçe başlık seçici etiketleri */
.rich-editor-wrap .ql-snow .ql-picker.ql-header .ql-picker-label::before,
.rich-editor-wrap .ql-snow .ql-picker.ql-header .ql-picker-item::before { content: 'Normal'; }
.rich-editor-wrap .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
.rich-editor-wrap .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before { content: 'Başlık'; }
.rich-editor-wrap .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
.rich-editor-wrap .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before { content: 'Alt başlık'; }

/* Link balonu */
.rich-editor-wrap .ql-snow .ql-tooltip { z-index: 20; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.rich-editor-wrap .ql-snow .ql-tooltip::before { content: 'Bağlantı:'; }
.rich-editor-wrap .ql-snow .ql-tooltip[data-mode=link]::before { content: 'Bağlantı adresi:'; }
.rich-editor-wrap .ql-snow .ql-tooltip a.ql-action::after { content: 'Düzenle'; }
.rich-editor-wrap .ql-snow .ql-tooltip.ql-editing a.ql-action::after { content: 'Kaydet'; }
.rich-editor-wrap .ql-snow .ql-tooltip a.ql-remove::before { content: 'Kaldır'; }

.rich-editor-hint {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 6px;
    font-size: 12px;
    color: #7a8794;
    flex-wrap: wrap;
}
.rich-editor-hint .is-error { color: #dc2626; font-weight: 600; }

/* ---------- İçerik gösterimi (.rich-content) ---------- */
.rich-content { overflow-wrap: anywhere; }
.rich-content > :first-child { margin-top: 0; }
.rich-content > :last-child { margin-bottom: 0; }
.rich-content p { margin: 0 0 .75em; }
.rich-content h2, .rich-content h3, .rich-content h4 {
    margin: 1.1em 0 .45em;
    line-height: 1.3;
    font-weight: 700;
    color: #0f172a;
}
.rich-content h2 { font-size: 1.25em; }
.rich-content h3 { font-size: 1.12em; }
.rich-content h4 { font-size: 1.02em; }
.rich-content ul, .rich-content ol { margin: 0 0 .85em; padding-left: 1.5em; }
.rich-content ul { list-style: disc; }
.rich-content ol { list-style: decimal; }
.rich-content li { margin: .2em 0; }
.rich-content li > p { margin: 0; }
.rich-content blockquote {
    margin: .8em 0;
    padding: .55em 1em;
    border-left: 4px solid #0e3f83;
    background: rgba(14, 63, 131, 0.05);
    border-radius: 0 8px 8px 0;
    color: #334155;
}
.rich-content pre {
    margin: .8em 0;
    padding: .8em 1em;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 8px;
    font-family: 'JetBrains Mono', Consolas, Menlo, monospace;
    font-size: .9em;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.rich-content code {
    font-family: Consolas, Menlo, monospace;
    font-size: .92em;
    background: rgba(14, 63, 131, 0.07);
    padding: .1em .35em;
    border-radius: 4px;
}
.rich-content pre code { background: none; padding: 0; }
.rich-content a { color: #1a5fb4 !important; text-decoration: underline; text-underline-offset: 2px; }
.rich-content hr { border: none; border-top: 1px solid #e2e8f0; margin: 1em 0; }
.rich-content table { border-collapse: collapse; width: 100%; margin: .8em 0; font-size: .95em; }
.rich-content th, .rich-content td { border: 1px solid #e2e8f0; padding: 6px 10px; text-align: left; }
.rich-content th { background: #f1f5f9; }
.rich-content u { text-underline-offset: 2px; }

/* ---------- Konu formu mobil düzeltmeleri ----------
   submit_page.css sabit genişlikler kullanır (738/736/708/706px) ve
   seçicileri 3-4 sınıf derinliğinde; bu yüzden burada aynı derinlik + !important. */
@media (max-width: 991px) {
    .submit-page { width: 100% !important; padding: 12px !important; box-sizing: border-box; align-content: flex-start; }
    .submit-page .left,
    .submit-page .right { width: 100%; max-width: 100%; box-sizing: border-box; }
    .submit-page .right { margin: 16px 0 0 !important; }
    .submit-page .left .head .head-text { font-size: 16px; }

    .submit-page .left .community-selector,
    .submit-page .left .community-selector .top { width: 100%; box-sizing: border-box; }

    .submit-page .left .post-options,
    .submit-page .left .post-options .title-container,
    .submit-page .left .post-options .title-container .title,
    .submit-page .left .post-options .src-container,
    .submit-page .left .post-options .src-field,
    .submit-page .left .post-options .post-types,
    .submit-page .left .post-options .submit-container,
    .submit-page .left .footer-container,
    .submit-page .left .post-options .category-container .category,
    .submit-page .left .post-options .subcategory-container .category {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }
    .submit-page .left .post-options .divider { width: auto !important; margin-left: 0 !important; margin-right: 0 !important; }
    .submit-page .left .post-options .src-container { margin-left: 0 !important; margin-right: 0 !important; }

    /* Konu / Görsel / Bağlantı / Anket / Sesli sekmeleri: eşit paylaş, ikon+etiket sığsın */
    .submit-page .left .post-options .post-types { height: auto; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .submit-page .left .post-options .post-types::-webkit-scrollbar { display: none; }
    .submit-page .left .post-options .post-types .post-type {
        flex: 1 0 auto;
        padding: 10px 12px !important;
        width: auto !important;
        min-width: 0;
        align-items: center;
        gap: 6px;
    }
    .submit-page .left .post-options .post-types .post-type h2 { font-size: 12px; white-space: nowrap; }
    .submit-page .left .post-options .post-types .post-type img { height: 18px !important; margin: 0 !important; }

    .rich-editor-wrap .ql-editor { min-height: 180px; max-height: none; }
    .rich-editor-wrap .ql-toolbar.ql-snow { position: sticky; top: 0; z-index: 5; }
    .rich-editor-hint { flex-direction: column; gap: 4px; }
}

@media (max-width: 480px) {
    .submit-page .left .post-options .title-container .title { padding-right: 64px !important; }
    .rich-editor-wrap .ql-toolbar.ql-snow { padding: 4px 6px; }
    .rich-editor-wrap .ql-toolbar.ql-snow button { width: 28px; height: 26px; }
}