/* «كاروسيل للنشر» (editor/post.js), on the home page and in the editor */
dialog.pst { width: min(760px, calc(100vw - 28px)); max-height: calc(100vh - 36px); padding: 0; overflow: hidden; border-radius: 20px; display: flex; flex-direction: column; }
dialog.pst:not([open]) { display: none; }
#post-new.pst { width: min(600px, calc(100vw - 28px)); }
.pst-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.pst-head h2 { margin: 0; font-size: 18px; padding: 0; }
.pst-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.pst-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: linear-gradient(150deg, #f2b84b, #e0731f); color: #1c1404; }
.pst-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.pst-x { margin-inline-start: auto; width: 32px; height: 32px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 15px; cursor: pointer; }
.pst-x:hover { background: var(--line); color: var(--text); }
.pst-body { padding: 16px 20px; overflow: auto; display: grid; gap: 14px; }
.pst-f { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.pst-f > span { display: flex; gap: 8px; align-items: baseline; }
.pst-f small { font-size: 11.5px; opacity: .8; }
.pst-f input, .pst-f textarea { width: 100%; box-sizing: border-box; padding: 9px 12px; border-radius: 11px; border: 1px solid var(--line); background: transparent; color: var(--text); font: inherit; font-size: 14.5px; }
.pst-f textarea { resize: vertical; line-height: 1.7; min-height: 120px; }
.pst-f input:focus, .pst-f textarea:focus { outline: 2px solid #f2b84b; outline-offset: 1px; border-color: transparent; }
.pst-two { display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px; }
.pst-looks { display: flex; gap: 10px; flex-wrap: wrap; }
.pst-look { display: grid; gap: 6px; justify-items: center; padding: 6px; border-radius: 14px; border: 2px solid transparent; background: none; color: var(--text); cursor: pointer; font: inherit; }
.pst-look span { position: relative; width: 64px; height: 80px; border-radius: 9px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.pst-look span i { position: absolute; top: 20px; inset-inline: 22px; height: 3px; border-radius: 3px; }
.pst-look span b { position: absolute; inset-inline: 12px; height: 5px; border-radius: 3px; top: 34px; }
.pst-look span b + b { top: 45px; inset-inline: 20px; opacity: .8; }
.pst-look small { font-size: 12px; color: var(--muted); }
.pst-look.on { border-color: #f2b84b; }
.pst-look.on small { color: var(--text); font-weight: 700; }
.pst-looks.sm .pst-look span { width: 40px; height: 50px; }
.pst-looks.sm .pst-look span i { top: 13px; inset-inline: 14px; }
.pst-looks.sm .pst-look span b { top: 22px; inset-inline: 7px; height: 4px; }
.pst-looks.sm .pst-look span b + b { top: 29px; inset-inline: 12px; }
.pst-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.pst-slide { margin: 0; display: grid; gap: 6px; }
.pst-pic { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--line); cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.18); transition: transform .15s; }
.pst-pic:hover { transform: translateY(-2px); }
.pst-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pst-pic img:not([src]) { visibility: hidden; }
.pst-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin-inline-end: 6px; box-sizing: border-box; border-radius: 10px; background: #f2b84b; color: #1c1404; font-size: 11.5px; font-weight: 800; }
.pst-slide figcaption span { display: inline-flex; align-items: center; color: var(--text); font-weight: 600; }
.pst-slide figcaption { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11.5px; color: var(--muted); min-width: 0; }
.pst-slide figcaption span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pst-del { flex: none; width: 24px; height: 24px; border-radius: 8px; border: 1px solid var(--line); background: none; color: var(--muted); cursor: pointer; font-size: 11px; }
.pst-del:hover { color: #ef6b6b; border-color: #ef6b6b; }
.pst-slide.fail .pst-pic::after { content: '!'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 28px; color: var(--muted); }
.pst-add { aspect-ratio: 4 / 5; border-radius: 12px; border: 2px dashed var(--line); background: none; color: var(--muted); display: grid; place-content: center; justify-items: center; gap: 6px; cursor: pointer; font: inherit; font-size: 13px; }
.pst-add span { font-size: 30px; line-height: 1; }
.pst-add:hover { border-color: #f2b84b; color: var(--text); }
.pst-msg { margin: 0; font-size: 13px; color: #e0a21f; }
.pst-msg:empty { display: none; }
.pst-foot { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); }
.pst-foot > span { margin-inline-end: auto; font-size: 12.5px; color: var(--muted); }
.pst-btn { height: 40px; padding: 0 18px; border-radius: 11px; border: 0; background: #f2b84b; color: #1c1404; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.pst-btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.pst-btn:disabled { opacity: .5; cursor: default; }
@media (max-width: 560px) { .pst-two { grid-template-columns: 1fr; } .pst-grid { grid-template-columns: repeat(2, 1fr); } }
