/* Droocy V13.8 reusable rich text editor */
.droocy-rte{border:1px solid #d8dee9;border-radius:14px;background:#fff;overflow:hidden;box-shadow:0 4px 14px rgba(16,24,40,.035)}
.droocy-rte-toolbar{display:flex;align-items:center;gap:5px;flex-wrap:wrap;padding:8px;background:#f8f9fc;border-bottom:1px solid #e4e7ec;position:sticky;top:0;z-index:2}
.droocy-rte-toolbar button,.droocy-rte-toolbar select,.droocy-rte-toolbar label{height:31px;min-width:31px;border:1px solid #d7dce5;border-radius:8px;background:#fff;color:#344054;font-family:inherit;font-size:11px;font-weight:800;display:inline-flex;align-items:center;justify-content:center;padding:0 8px;cursor:pointer}
.droocy-rte-toolbar button:hover,.droocy-rte-toolbar label:hover{border-color:#8a72ef;color:#6048d2;background:#f7f5ff}.droocy-rte-toolbar select{min-width:92px;cursor:pointer}
.droocy-rte-color{gap:5px}.droocy-rte-color input{width:18px;height:18px;border:0;padding:0;background:transparent;cursor:pointer}.droocy-rte-sep{width:1px;height:24px;background:#e4e7ec;margin:0 2px}
.droocy-rte-editor{min-height:180px;max-height:520px;overflow:auto;padding:14px 15px;outline:0;color:#202939;font-size:13px;line-height:1.9;text-align:right;direction:rtl;background:#fff}
.droocy-rte-editor:focus{box-shadow:inset 0 0 0 2px rgba(104,71,232,.12)}
.droocy-rte-editor p{margin:.35em 0}.droocy-rte-editor h2,.droocy-rte-editor h3,.droocy-rte-editor h4{margin:.55em 0 .3em}.droocy-rte-editor ul,.droocy-rte-editor ol{padding-inline-start:24px}.droocy-rte-editor table{border-collapse:collapse;width:100%}.droocy-rte-editor td,.droocy-rte-editor th{border:1px solid #d0d5dd;padding:6px 8px}
.droocy-rte-source{width:100%;min-height:180px;border:0!important;border-radius:0!important;padding:14px!important;font:12px/1.7 Consolas,monospace!important;direction:ltr!important;text-align:left!important;display:none;resize:vertical}
.droocy-rte.is-source .droocy-rte-editor{display:none}.droocy-rte.is-source .droocy-rte-source{display:block}.droocy-rte-source-toggle.active{background:#6650d9!important;color:#fff!important;border-color:#6650d9!important}
@media(max-width:640px){.droocy-rte-toolbar{gap:4px}.droocy-rte-toolbar button,.droocy-rte-toolbar select,.droocy-rte-toolbar label{height:34px}.droocy-rte-editor{min-height:150px}}

/* V13.10 media upload/paste */
.droocy-rte-status{padding:6px 10px;border-top:1px solid #eef0f4;background:#fbfcfe;color:#7b8492;font-size:9px;font-weight:700}
.droocy-rte-status.busy{color:#5f46d5;background:#f7f5ff}.droocy-rte-status.error{color:#b42318;background:#fff3f2}
.droocy-rte.is-dragging{box-shadow:0 0 0 3px rgba(104,71,232,.18);border-color:#765be9}.droocy-rte.is-dragging .droocy-rte-editor{background:#faf8ff}
.droocy-rte-editor img,.droocy-rich-text img{max-width:100%;height:auto;border-radius:10px;display:block;margin:8px auto}
.droocy-rte-editor a,.droocy-rich-text a{color:#5f46d5;text-decoration:underline;font-weight:700}
.droocy-rich-text table{border-collapse:collapse;max-width:100%}.droocy-rich-text td,.droocy-rich-text th{border:1px solid #d0d5dd;padding:6px 8px}
\n/* V13.11 — structured AI question-bank presentation */\n.ai13-editor .droocy-rte-editor{background:#fff;line-height:1.9}\n.ai13-editor .droocy-rte-editor>div{border:1px solid #dfe4ff;border-radius:16px;padding:16px 18px;margin:14px 0;background:linear-gradient(180deg,#fff,#fafaff);box-shadow:0 5px 16px rgba(65,55,160,.045)}\n.ai13-editor .droocy-rte-editor>div h3{margin:0 0 10px;color:#4934c8;font-size:16px;font-weight:900}\n.ai13-editor .droocy-rte-editor>div p{margin:7px 0;color:#202939}\n.ai13-editor .droocy-rte-editor>div ol{margin:10px 0;padding-right:25px;display:grid;gap:7px}\n.ai13-editor .droocy-rte-editor>div ol li{background:#f7f7fc;border:1px solid #eaebf4;border-radius:10px;padding:8px 10px}\n.ai13-editor .droocy-rte-editor>div p strong:first-child{color:#2b2580}\n.ai13-editor .droocy-rte-editor>hr{border:0;border-top:1px dashed #d8d8e8;margin:16px 0}\n.ai13-editor .droocy-rte-editor h2{color:#17152f;font-size:19px;margin:16px 0 10px}\n
/* V13.13 — output-language-aware editor direction */
.droocy-rte[data-content-dir="ltr"] .droocy-rte-editor{direction:ltr!important;text-align:left!important}
.droocy-rte[data-content-dir="rtl"] .droocy-rte-editor{direction:rtl!important;text-align:right!important}
.droocy-rte[data-content-dir="ltr"] .droocy-rte-editor ol,
.droocy-rte[data-content-dir="ltr"] .droocy-rte-editor ul{padding-left:26px!important;padding-right:0!important}
.droocy-rte[data-content-dir="rtl"] .droocy-rte-editor ol,
.droocy-rte[data-content-dir="rtl"] .droocy-rte-editor ul{padding-right:26px!important;padding-left:0!important}
.droocy-rte[data-content-dir="ltr"] .droocy-rte-editor>div,
.droocy-rte[data-content-dir="ltr"] .droocy-rte-editor p,
.droocy-rte[data-content-dir="ltr"] .droocy-rte-editor h1,
.droocy-rte[data-content-dir="ltr"] .droocy-rte-editor h2,
.droocy-rte[data-content-dir="ltr"] .droocy-rte-editor h3,
.droocy-rte[data-content-dir="ltr"] .droocy-rte-editor h4{direction:ltr;text-align:left}
.droocy-rte[data-content-dir="rtl"] .droocy-rte-editor>div,
.droocy-rte[data-content-dir="rtl"] .droocy-rte-editor p,
.droocy-rte[data-content-dir="rtl"] .droocy-rte-editor h1,
.droocy-rte[data-content-dir="rtl"] .droocy-rte-editor h2,
.droocy-rte[data-content-dir="rtl"] .droocy-rte-editor h3,
.droocy-rte[data-content-dir="rtl"] .droocy-rte-editor h4{direction:rtl;text-align:right}


/* V13.14 — polished rendered AI summaries */
.droocy-rte-editor{
  background:#fff;
}
.droocy-rte-editor > div[style*="background-color"]{
  box-sizing:border-box;
}
.droocy-rte-editor h1,
.droocy-rte-editor h2,
.droocy-rte-editor h3{
  line-height:1.55;
}
.droocy-rte-editor table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  margin:14px 0;
  overflow:hidden;
  border:1px solid #e3e7ef;
  border-radius:12px;
}
.droocy-rte-editor th,
.droocy-rte-editor td{
  padding:10px 12px;
  border-bottom:1px solid #e9edf3;
  vertical-align:top;
}
.droocy-rte-editor th{
  background:#f6f4ff;
  font-weight:900;
}
.droocy-rte-editor tr:last-child td{border-bottom:0}
.droocy-rte-editor ul,
.droocy-rte-editor ol{line-height:1.9}
.droocy-rte-editor hr{
  border:0;
  border-top:1px solid #e5e7eb;
  margin:18px 0;
}
