/* documentary studio: the reels page (../wedding/wedding.css + ../reels/reels.css) + chapters, chips, colour swatches */
.doc .phone { background: #f4f3f0; }
.doc .swatches { margin-bottom: 0; }
.doc .sw i { background: var(--c); }
.doc .sw.th-light i { background: #f4f3f0; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .14); }
.doc .sw.th-dark i { background: #07090d; }

/* a chapter: number badge, remove link */
.doc .chapter h3 { display: flex; align-items: center; gap: 8px; }
.ch-n { display: inline-grid; place-items: center; min-width: 34px; height: 26px; padding: 0 6px; border-radius: 9px; background: var(--green); color: #fff; font-size: 13px; font-weight: 800; direction: ltr; }
.ch-del { margin-inline-start: auto; border: 0; background: none; padding: 9px 6px; min-height: 36px; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--muted); text-decoration: underline; cursor: pointer; }
.ch-del:hover { color: #d62f2f; }
.ch-add { display: block; width: 100%; margin: 0 0 14px; padding: 14px; border-radius: 18px; border: 2px dashed rgba(255, 122, 0, .55); background: #fff8f1; color: var(--green-d); font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; transition: background .2s, transform .2s; }
.ch-add:hover { background: #fff1e2; transform: translateY(-2px); }

/* narration box + its counter */
.doc .field textarea { width: 100%; min-width: 0; padding: 11px 14px; border-radius: 14px; border: 1.5px solid rgba(255, 122, 0, .4); background: #fff; outline: 0; font: inherit; font-size: 16px; line-height: 1.6; resize: vertical; min-height: 82px; transition: border-color .2s, box-shadow .2s; }
.doc .field textarea:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(255, 122, 0, .16); }
.doc .field span { display: flex; justify-content: space-between; gap: 8px; }
.doc .field .count { font-style: normal; font-size: 12px; color: var(--muted); direction: ltr; }
.doc .rows .field.wide { grid-column: 1 / -1; }
.row-num { grid-column: 1 / -1; display: grid; grid-template-columns: 110px 1fr; gap: 10px; }

/* countries as chips */
.chips-in { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 48px; padding: 6px 8px; border-radius: 14px; border: 1.5px solid rgba(255, 122, 0, .4); background: #fff; cursor: text; transition: border-color .2s, box-shadow .2s; }
.chips-in:focus-within { border-color: var(--green); box-shadow: 0 0 0 4px rgba(255, 122, 0, .16); }
.chips-in input { flex: 1; min-width: 120px; height: 34px; border: 0 !important; box-shadow: none !important; outline: 0; padding: 0 6px; background: transparent; font: inherit; font-size: 15px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 12px; padding-inline: 12px 6px; border-radius: 999px; background: #fff1e2; border: 1.5px solid rgba(255, 122, 0, .5); color: #8a3d00; font-size: 14px; font-weight: 700; animation: chipIn .3s cubic-bezier(.2, .8, .3, 1.4); }
.chip button { position: relative; display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgba(255, 122, 0, .18); color: #8a3d00; font-size: 14px; line-height: 1; cursor: pointer; }
.chip button::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; } /* a finger-size target (38px) round the small × */
.chip button:hover { background: var(--green); color: #fff; }
@keyframes chipIn { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

.voice-tip.over { color: #d62f2f; font-weight: 700; }
@media (max-width: 640px) { .row-num { grid-template-columns: 96px 1fr; } }
@media (prefers-reduced-motion: reduce) { .chip { animation: none; } }

/* ✨ AI writer box: topic → the whole film */
.ai-box { position: relative; overflow: hidden; border: 2px solid var(--green) !important; background: linear-gradient(160deg, #fff 0%, #fff6ec 100%) !important; box-shadow: 0 16px 36px rgba(255, 122, 0, .14); }
.ai-box h3 { font-size: 17px; }
.ai-sub { margin: -2px 0 12px; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.ai-row { display: flex; gap: 8px; }
.ai-row input { flex: 1; min-width: 0; height: 50px; padding: 0 14px; border-radius: 14px; border: 1.5px solid rgba(255, 122, 0, .45); background: #fff; outline: 0; font: inherit; font-size: 15.5px; transition: border-color .2s, box-shadow .2s; }
.ai-row input:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(255, 122, 0, .16); }
.ai-go { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 18px; border: 0; border-radius: 14px; background: linear-gradient(135deg, #ffa23f, #ff7a00 55%, #f06400); color: #fff; font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; box-shadow: 0 10px 22px rgba(255, 122, 0, .35); transition: transform .2s, box-shadow .2s; white-space: nowrap; }
.ai-go:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(255, 122, 0, .45); }
.ai-go:disabled { cursor: progress; opacity: .92; }
.ai-dots { display: inline-flex; gap: 3px; }
.ai-dots b { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: aiDot 1s ease-in-out infinite; }
.ai-dots b:nth-child(2) { animation-delay: .15s; } .ai-dots b:nth-child(3) { animation-delay: .3s; }
@keyframes aiDot { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-4px); opacity: 1; } }
.ai-bar { height: 4px; margin-top: 10px; border-radius: 999px; background: rgba(255, 122, 0, .14); overflow: hidden; }
.ai-bar i { display: block; width: 40%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffb15c, #ff7a00); animation: aiBar 1.3s ease-in-out infinite; }
@keyframes aiBar { 0% { transform: translateX(160%); } 100% { transform: translateX(-260%); } }
.ai-done { margin-top: 10px; padding: 9px 12px; border-radius: 12px; background: #eefbf2; color: #17603a; font-size: 13.5px; font-weight: 700; line-height: 1.6; }
.ai-done button { border: 0; background: none; padding: 0 4px; font: inherit; color: var(--green-d); text-decoration: underline; cursor: pointer; }
@media (max-width: 480px) { .ai-row { flex-direction: column; } .ai-go { justify-content: center; } }

/* the one-minute meter */
.len-meter { margin-top: 12px; display: grid; gap: 6px; font-size: 13.5px; color: var(--muted); }
.len-meter b { color: var(--ink); font-weight: 800; }
.len-meter i { display: block; height: 6px; border-radius: 999px; background: #fff1e2; overflow: hidden; }
.len-meter em { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffb15c, #ff7a00); transition: width .4s ease; }
.len-meter.over em { background: #d62f2f; }
.len-meter.over, .len-meter.over b { color: #d62f2f; }
.ch-add:disabled { cursor: default; opacity: .6; transform: none; border-color: rgba(0, 0, 0, .15); color: var(--muted); background: #fafafa; }
@media (prefers-reduced-motion: reduce) { .ai-dots b, .ai-bar i { animation: none; } }

/* simple page (Amer): topic → look → voice → download; the words wait behind «✏️ عدّل الكلام» */
.ai-box .len-meter { margin-top: 14px; padding-top: 12px; border-top: 1px dashed rgba(255, 122, 0, .3); }
.look .look-l { display: block; margin: 2px 2px 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.look .swatches + .look-l { margin-top: 12px; }
.adv { margin: 0 0 14px; }
.adv > summary { list-style: none; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 16px; border-radius: 18px; border: 1.5px solid rgba(255, 122, 0, .45); background: #fff; cursor: pointer; text-align: center; transition: background .2s, box-shadow .2s; }
.adv > summary::-webkit-details-marker { display: none; }
.adv > summary span { font-size: 16px; font-weight: 800; color: var(--ink); }
.adv > summary span::after { content: "⌄"; display: inline-block; margin-inline-start: 8px; color: var(--green); transition: transform .25s; }
.adv[open] > summary span::after { transform: rotate(180deg); }
.adv > summary small { font-size: 12.5px; color: var(--muted); }
.adv > summary:hover { background: #fff8f1; box-shadow: 0 8px 20px rgba(255, 122, 0, .12); }
.adv[open] > summary { margin-bottom: 12px; background: #fff8f1; }
.adv-body { animation: advIn .35s ease; }
@keyframes advIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .adv-body { animation: none; } }

/* premium page (Amer): visitors see everything and watch the ready film; options open the subscription window */
.pro-banner { display: grid; gap: 6px; margin-bottom: 14px; padding: 14px 16px; border-radius: 18px; text-align: center;
  background: linear-gradient(135deg, #fff8e6, #fff1d6); border: 1.5px solid #e9c66a; box-shadow: 0 10px 26px rgba(200, 150, 40, .16); }
.pro-banner b { font-size: 16px; font-weight: 800; color: #8a6416; }
.pro-banner span { font-size: 13.5px; line-height: 1.6; color: #6b5a3a; }
.pro-banner button { justify-self: center; margin-top: 4px; padding: 10px 26px; border: 0; border-radius: 999px; cursor: pointer; font: inherit; font-size: 15px; font-weight: 800; color: #3a2a06;
  background: linear-gradient(110deg, #c8961e, #f7e08a 45%, #e0b23f 70%, #fff3c0); box-shadow: 0 8px 20px rgba(200, 150, 40, .35); }
.form.locked .group input, .form.locked .group textarea, .form.locked .chips-in { cursor: pointer; }
.form.locked .group > h3::after { content: " 🔒"; font-size: .8em; }
.form.locked .ai-go { background: linear-gradient(110deg, #c8961e, #f7e08a 45%, #e0b23f 70%, #fff3c0); color: #3a2a06; box-shadow: 0 10px 22px rgba(200, 150, 40, .35); }
