/* LaraEditor — استایل ویرایشگر + استایل محتوای منتشرشده */

.le {
  --le-ink: #1d2733;
  --le-muted: #637083;
  --le-line: #d9dee5;
  --le-bg: #ffffff;
  --le-bar: #f4f6f8;
  --le-hover: #e6ebf0;
  --le-accent: #1b6b73;
  --le-accent-soft: #d8eef0;
  --le-radius: 10px;
  font-family: Vazirmatn, "Vazir", "IRANSans", Tahoma, system-ui, sans-serif;
  color: var(--le-ink);
  background: var(--le-bg);
  border: 1px solid var(--le-line);
  border-radius: var(--le-radius);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: clip;
}
.le:focus-within { border-color: var(--le-accent); box-shadow: 0 0 0 3px var(--le-accent-soft); }

/* نوار ابزار */
.le-bar {
  display: flex; flex-wrap: wrap; gap: 4px 10px;
  padding: 8px 10px;
  background: var(--le-bar);
  border-bottom: 1px solid var(--le-line);
  position: sticky; top: 0; z-index: 5;
}
.le-group { display: flex; align-items: center; gap: 2px; }
.le-group + .le-group { padding-inline-start: 10px; border-inline-start: 1px solid var(--le-line); }
.le-btn {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px;
  border: 0; border-radius: 7px;
  background: transparent; color: var(--le-ink);
  cursor: pointer; position: relative;
  transition: background-color .12s, color .12s;
}
.le-btn:hover { background: var(--le-hover); }
.le-btn:active { transform: scale(.94); }
.le-btn.is-on { background: var(--le-accent); color: #fff; }
.le-btn:focus-visible, .le-select:focus-visible, .le-dialog :is(input,select,button):focus-visible {
  outline: 2px solid var(--le-accent); outline-offset: 1px;
}
.le-select {
  height: 34px; padding: 0 10px; border: 1px solid var(--le-line); border-radius: 7px;
  background: #fff; color: var(--le-ink); font: inherit; font-size: 13px; cursor: pointer;
}
.le-color input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.le-A { font-size: 17px; line-height: 1; font-weight: 800; margin-top: -4px; }
.le-swatch { position: absolute; inset-inline: 8px; bottom: 5px; height: 3px; border-radius: 2px; }

/* ناحیه نوشتن */
.le-body {
  padding: 22px 26px;
  outline: none;
  overflow: auto;
  max-height: 70vh;
  flex: 1;
}
.le-body.is-empty:before {
  content: attr(data-placeholder);
  color: var(--le-muted);
  pointer-events: none;
  position: absolute;
}
.le.is-drop .le-body { background: var(--le-accent-soft); }
.le.is-busy .le-body { cursor: progress; }
.le-source {
  width: 100%; box-sizing: border-box; border: 0; outline: none; resize: vertical;
  padding: 18px 22px; background: #14202b; color: #d7e3ee;
  font: 13px/1.8 ui-monospace, Menlo, Consolas, monospace; tab-size: 2;
}
.le.is-source .le-bar .le-btn:not([data-cmd="@source"]):not([data-cmd="@full"]),
.le.is-source .le-bar .le-select,
.le.is-source .le-bar .le-color { opacity: .35; pointer-events: none; }

/* نوار وضعیت */
.le-status {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 6px 14px; font-size: 12px; color: var(--le-muted);
  border-top: 1px solid var(--le-line); background: var(--le-bar);
}
.le-msg { color: var(--le-accent); }
.le-clear-draft {
  display: inline-flex; align-items: center; gap: 5px;
  margin-inline-start: auto;
  border: 1px solid var(--le-line); background: transparent; color: var(--le-muted);
  font-size: 11px; padding: 2px 8px; border-radius: 6px; cursor: pointer; flex: none;
}
.le-clear-draft:hover { background: var(--le-hover); color: var(--le-ink); }

/* تمام‌صفحه */
html.le-lock { overflow: hidden; }
.le.is-full { position: fixed; inset: 0; z-index: 9999; border-radius: 0; border: 0; }
.le.is-full .le-body { max-height: none; }
.le.is-full .le-source { flex: 1; resize: none; }

/* پنجره‌های گفتگو */
.le-dialog {
  border: 0; border-radius: 12px; padding: 0; width: min(92vw, 420px);
  font-family: Vazirmatn, Tahoma, sans-serif; color: #1d2733;
  box-shadow: 0 20px 60px rgba(15, 25, 35, .3);
}
.le-dialog::backdrop { background: rgba(15, 25, 35, .45); }
.le-dialog form { padding: 20px 22px; display: grid; gap: 10px; }
.le-dialog h3 { margin: 0 0 4px; font-size: 17px; }
.le-dialog label { font-size: 13px; color: #4a5766; }
.le-dialog input[type=text], .le-dialog input[type=number], .le-dialog input:not([type]), .le-dialog select {
  width: 100%; box-sizing: border-box; height: 40px; padding: 0 12px;
  border: 1px solid #cdd5de; border-radius: 8px; font: inherit; background: #fff;
}
.le-dialog .le-check { display: flex; align-items: center; gap: 8px; color: #1d2733; font-size: 14px; }
.le-dialog menu { display: flex; gap: 8px; margin: 8px 0 0; padding: 0; }
.le-dialog menu button {
  height: 40px; padding: 0 18px; border-radius: 8px; border: 1px solid #cdd5de;
  background: #fff; font: inherit; cursor: pointer;
}
.le-dialog menu .le-primary { background: #1b6b73; border-color: #1b6b73; color: #fff; }

/* ---------- استایل محتوا ----------
   همین کلاس را به محتوای منتشرشده در سایت هم بدهید:
   <div class="le-content">{!! $post->body !!}</div> */
.le-content {
  font-family: Vazirmatn, "Vazir", "IRANSans", Tahoma, system-ui, sans-serif;
  font-size: 16px; line-height: 2; color: #1d2733;
  overflow-wrap: anywhere;
}
.le-content > :first-child { margin-top: 0; }
.le-content p { margin: 0 0 1.1em; }
.le-content h2 { font-size: 1.55em; line-height: 1.5; margin: 1.6em 0 .6em; }
.le-content h3 { font-size: 1.3em; line-height: 1.55; margin: 1.5em 0 .5em; }
.le-content h4 { font-size: 1.1em; margin: 1.4em 0 .4em; }
.le-content a { color: #1b6b73; text-underline-offset: 3px; }
.le-content ul, .le-content ol { margin: 0 0 1.1em; padding-inline-start: 1.6em; }
.le-content li { margin-bottom: .3em; }
.le-content blockquote {
  margin: 1.4em 0; padding: .6em 1.2em;
  border-inline-start: 4px solid #1b6b73; background: #f1f6f7; color: #36485a; border-radius: 0 8px 8px 0;
}
.le-content blockquote p:last-child { margin-bottom: 0; }
.le-content pre {
  direction: ltr; text-align: left; margin: 1.2em 0; padding: 14px 16px; overflow: auto;
  background: #14202b; color: #d7e3ee; border-radius: 8px; font: 13.5px/1.8 ui-monospace, Menlo, Consolas, monospace;
}
.le-content code { direction: ltr; unicode-bidi: embed; background: #eef1f4; padding: .1em .4em; border-radius: 4px; font-size: .9em; }
.le-content pre code { background: none; padding: 0; }
.le-content hr { border: 0; border-top: 1px solid #d9dee5; margin: 2em 0; }
.le-content table { width: 100%; border-collapse: collapse; margin: 1.3em 0; font-size: .95em; }
.le-content th, .le-content td { border: 1px solid #d9dee5; padding: 8px 12px; text-align: start; min-width: 60px; }
.le-content th { background: #f4f6f8; font-weight: 700; }
.le-content img { max-width: 100%; height: auto; border-radius: 6px; display: block; margin: 1.2em auto; }
.le-content img.img-right { float: right; margin: .3em 0 1em 1.4em; }
.le-content img.img-left { float: left; margin: .3em 1.4em 1em 0; }
.le-content img.img-center { margin-inline: auto; }
.le-content img.w-25 { width: 25%; }
.le-content img.w-50 { width: 50%; }
.le-content img.w-75 { width: 75%; }
.le-content img.w-100 { width: 100%; }
.le-content::after { content: ""; display: table; clear: both; }
.le-body img { cursor: pointer; }
.le-body img:hover { outline: 2px solid var(--le-accent); outline-offset: 2px; }

@media (max-width: 640px) {
  .le-body { padding: 16px; }
  .le-group + .le-group { padding-inline-start: 0; border: 0; }
  .le-btn { width: 38px; height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  .le-btn { transition: none; }
}

/* ---------- پلیر ویدیو و صوت ---------- */
.le-content figure.le-media { margin: 1.4em auto; padding: 0; width: 100%; }
.le-content figure.le-media.w-75 { width: 75%; }
.le-content figure.le-media.w-50 { width: 50%; }
.le-content figure.le-media.w-25 { width: 25%; }
.le-content figure.le-media video { display: block; width: 100%; height: auto; max-height: 70vh; background: #000; border-radius: 8px; }
.le-content figure.le-media audio { display: block; width: 100%; }
.le-body figure.le-media { border-radius: 10px; outline-offset: 4px; cursor: default; }
.le-body figure.le-media:hover { outline: 2px solid var(--le-line); }
.le-body figure.le-media.is-selected { outline: 2px solid var(--le-accent); }
@media (max-width: 640px) {
  .le-content { font-size: 15px; }
  .le-content figure.le-media.w-25, .le-content figure.le-media.w-50 { width: 100%; }
}
