/* Lenci · Nawaa design studio in the post drawer (v3/nawaa-design.js): the quality switch, Add my logo / Edit with AI, the brand-colour
   badge over a picture, and the carousel studio (swipeable track with scroll snap, dots, arrows, the slide editor). Builds on
   nawaa.css + studio.css tokens; logical properties only, so Arabic mirrors. The drawer is ≤ 440 px wide on every screen. */
.nd-tools { display: grid; gap: 10px; }
.nd-quality { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.nd-q-label { font-family: var(--display); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-inline-end: 4px; }
[dir="rtl"] .nd-q-label { letter-spacing: 0; }
.nd-tool-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.nd-tool-acts a.ghost, .nd-edit-ai { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.nd-link { border: 0; background: none; padding: 0; color: #c4b5fd; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* the brand-colour badge (over the post visual, under a slide) */
.nd-brandcheck { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 5px 11px; border-radius: 999px; font-family: var(--display); font-size: 11.5px; font-weight: 700; backdrop-filter: blur(6px); }
.nw-visual .nd-brandcheck { position: absolute; inset-block-end: 10px; inset-inline-start: 10px; max-width: calc(100% - 20px); }
.nd-brandcheck.on, .nd-brandcheck.neutral { color: #bbf7d0; background: rgba(6,78,59,.72); box-shadow: inset 0 0 0 1px rgba(134,239,172,.35); }
.nd-brandcheck.drift { color: #fef3c7; background: rgba(120,53,15,.78); box-shadow: inset 0 0 0 1px rgba(253,230,138,.35); }
.nd-brandcheck .nd-link { color: #fde68a; }

/* the carousel */
.nd-carousel { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01)); }
.nd-car-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.nd-car-head b { font-family: var(--display); font-size: 14px; }
.nd-car-head .muted { font-size: 12px; text-align: end; }
.nd-car-plan { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.nd-car-plan select, .nd-in { font: inherit; font-size: 13px; color: var(--ink); background: rgba(0,0,0,.35); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.nd-car-plan select { flex: 0 0 auto; }
.nd-stage { position: relative; }
.nd-track { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain; padding-block-end: 4px; scrollbar-width: none; border-radius: 12px; outline-offset: 3px; }
.nd-track::-webkit-scrollbar { display: none; }
.nd-slide { position: relative; flex: 0 0 86%; margin: 0; scroll-snap-align: center; border-radius: 12px; overflow: hidden; background: #17171f; aspect-ratio: 1 / 1; box-shadow: 0 10px 26px rgba(0,0,0,.45); }
.nd-slide canvas, .nd-slide .nd-slide-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nd-slide figcaption { position: absolute; inset-block-start: 8px; inset-inline-end: 8px; padding: 3px 8px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; font-family: var(--mono); font-size: 10.5px; direction: ltr; unicode-bidi: isolate; }
.nd-slide.busy canvas, .nd-slide.busy img { filter: saturate(.4) brightness(.6); }
.nd-spin { position: absolute; inset: 0; display: grid; place-items: center; }
.nd-spin i { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,.2); border-top-color: #22d3ee; animation: ndSpin 0.9s linear infinite; }
@keyframes ndSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .nd-spin i { animation-duration: 3s; } .nd-track { scroll-behavior: auto; } }
.nd-nav { display: flex; align-items: center; justify-content: center; gap: 10px; }
.nd-arrow { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(255,255,255,.05); color: var(--ink); font-size: 18px; line-height: 1; display: grid; place-items: center; padding: 0; cursor: pointer; }
.nd-arrow:disabled { opacity: .35; cursor: default; }
.nd-dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; max-width: 70%; }
.nd-dot { width: 8px; height: 8px; padding: 0; border-radius: 50%; border: 0; background: rgba(255,255,255,.25); cursor: pointer; transition: width .2s var(--ease), background .2s; }
.nd-dot.on { width: 22px; border-radius: 6px; background: linear-gradient(90deg, #22d3ee, #8b5cf6); }
.nd-car-acts { display: grid; gap: 10px; }
.nd-car-acts .primary { justify-self: start; }
.nd-check { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.nd-check input { accent-color: #a855f7; width: 16px; height: 16px; margin: 0; }
.nd-editor { display: grid; gap: 8px; padding-block-start: 10px; border-block-start: 1px solid var(--line); }
.nd-ed-head b { font-family: var(--display); font-size: 12.5px; }
.nd-field { display: grid; gap: 4px; }
.nd-field > span { font-family: var(--display); font-size: 11px; font-weight: 600; color: var(--muted); }
.nd-in { width: 100%; box-sizing: border-box; resize: vertical; }
.nd-ed-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.nd-ed-acts a.ghost { text-decoration: none; }
.nd-ed-check:empty { display: none; }

/* the calendar card's slide count */
.nd-card-count { position: absolute; inset-block-start: 8px; inset-inline-end: 36px; padding: 2px 7px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; font-family: var(--mono); font-size: 10px; pointer-events: none; }

/* the drawer body is a grid inside a fixed-height flex column: its rows must not shrink below their content (a 100 %-wide picture has no
   min-content height, so a long drawer used to squash the visual into a strip) */
.nw-dr-body { grid-auto-rows: max-content; }
