/* jomijo Carousel - the layout: the slide and the strip of slides on the left, the settings (Slide / Look / You) on the
   right; on a phone all of it stacked. app.css (shared by every app) gives the buttons, fields and dialogs. */
@font-face { font-family: "Caveat"; src: url("fonts/caveat.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
:root { --accent: #ec4899; --accent-2: #f9a8d4; }
html, body.ed { height: 100%; }
body.ed { display: flex; flex-direction: column; overflow: hidden; }
.etop .btn { white-space: nowrap; }
.etop { gap: 8px; padding-top: 8px; padding-bottom: 8px; flex-wrap: nowrap; }
.eico { border-radius: 7px; flex: none; }
.etitle { min-width: 0; width: 260px; flex: 0 1 260px; padding: 6px 10px; border-radius: 10px; font-weight: 700; background: transparent; border: 1px solid transparent; }
.etitle:hover, .etitle:focus { border-color: var(--line); background: var(--panel-2); }
.grow { flex: 1; }
.ib { width: 38px; height: 38px; flex: none; display: inline-grid; place-items: center; border-radius: 11px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; font-size: 17px; line-height: 1; padding: 0; }
.ib:hover { border-color: var(--muted); } .ib:disabled { opacity: 0.35; cursor: default; }
.ob { height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; font-weight: 700; font-size: 13px; white-space: nowrap; }
.ob:hover { border-color: var(--muted); } .ob:disabled { opacity: 0.35; cursor: default; }
.seg2 { display: inline-flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; flex-wrap: wrap; }
.seg2 button { background: var(--panel-2); border: 0; padding: 8px 12px; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--muted); }
.seg2 button[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 26%, var(--panel-2)); color: var(--ink); }

.ewrap { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 360px; }
.eleft { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
/* the slide */
.cstage { position: relative; flex: 1; min-height: 200px; overflow: hidden; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #241431, #07060d 75%); touch-action: pan-y; }
.cframe { position: relative; box-shadow: 0 16px 44px rgba(0, 0, 0, 0.55); border-radius: 6px; overflow: hidden; cursor: pointer; }
.cframe canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: rgba(12, 17, 36, 0.8); color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0 0 3px; }
.nav.prev { left: 12px; } .nav.next { right: 12px; } .nav:disabled { opacity: 0.25; cursor: default; }
.ccount { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.toast { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); background: rgba(12, 17, 36, 0.94); border: 1px solid var(--line); padding: 8px 14px; border-radius: 12px; font-size: 13px; font-weight: 600; z-index: 6; max-width: min(560px, 90%); text-align: center; }
body.dropping .cstage { outline: 3px dashed var(--accent); outline-offset: -8px; }

/* the strip of slides: tap to go, drag to reorder (hold first on a touch screen) */
.strip { flex: none; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--panel); overflow-x: auto; touch-action: pan-x; scrollbar-width: thin; }
.thumb { position: relative; flex: none; padding: 0; border: 2px solid transparent; border-radius: 8px; background: none; cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.thumb canvas { display: block; width: 72px; height: auto; border-radius: 5px; pointer-events: none; }
.thumb b { position: absolute; left: 4px; top: 4px; font-size: 10px; background: rgba(0, 0, 0, 0.65); color: #fff; border-radius: 5px; padding: 0 5px; line-height: 16px; }
.thumb.on { border-color: var(--accent); }
.thumb.drag { opacity: 0.35; }
.strip .addslide { flex: none; width: 72px; align-self: stretch; min-height: 72px; border: 2px dashed var(--line); border-radius: 8px; background: none; color: var(--muted); font-size: 13px; font-weight: 700; cursor: pointer; }
.strip .addslide:hover { border-color: var(--accent); color: var(--ink); }
.dropmark { flex: none; width: 4px; align-self: stretch; background: var(--accent); border-radius: 2px; margin: 0 -7px; }

/* the settings */
.eside { border-left: 1px solid var(--line); background: var(--panel); min-width: 0; min-height: 0; overflow-y: auto; padding: 0 16px 24px; }
.eside .tabs { position: sticky; top: 0; z-index: 2; background: var(--panel); margin: 0 -16px 14px; }
.eside h3 { margin: 4px 0 10px; font-size: 15px; }
.eside .field { margin-bottom: 12px; }
.eside input[type=range] { padding: 0; border: 0; background: none; accent-color: var(--accent); width: 100%; }
.eside textarea, .eside input[type=text] { font: inherit; font-weight: 600; }
.eside textarea { min-height: 64px; resize: vertical; }
.pnote { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.prow { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.chkrow { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14px; cursor: pointer; } .chkrow input { width: auto; accent-color: var(--accent); }
.cols { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cdot { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; padding: 0; }
.cdot[aria-pressed="true"] { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.cols input[type=color] { width: 34px; height: 34px; padding: 0; border: 0; background: none; cursor: pointer; }
.layouts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 14px; }
.layouts button { display: grid; justify-items: center; gap: 2px; padding: 8px 2px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); font-size: 11px; font-weight: 700; cursor: pointer; }
.layouts button b { font-size: 18px; line-height: 1.2; color: var(--ink); }
.layouts button[aria-pressed="true"] { border-color: var(--accent); color: var(--ink); background: color-mix(in srgb, var(--accent) 18%, var(--panel-2)); }
.looks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.looks .lk { position: relative; display: grid; gap: 4px; padding: 4px; border-radius: 10px; border: 2px solid var(--line); background: var(--panel-2); cursor: pointer; font-size: 12px; font-weight: 700; color: var(--ink); text-align: center; }
.looks .lk canvas { width: 100%; height: auto; border-radius: 6px; display: block; }
.looks .lk.on { border-color: var(--accent); }
.looks .lk .x { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); font-size: 11px; cursor: pointer; display: grid; place-items: center; padding: 0; }
.picrow { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.picrow img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; background: #000; flex: none; }
.picrow img.round { border-radius: 50%; }
.danger, .btn.danger { color: #fca5a5; border-color: rgba(239, 68, 68, 0.5); }
.flash { animation: flash 0.9s ease; } @keyframes flash { 0%, 60% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: none; } }

/* dialogs */
.top0 { margin-top: 0; }
.plist { list-style: none; margin: 14px 0 6px; padding: 0; display: grid; gap: 8px; }
.plist li { display: flex; gap: 8px; align-items: center; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 6px; }
.plist li.on { border-color: var(--accent); }
.plist .po { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: center; background: none; border: 0; text-align: left; cursor: pointer; padding: 0; color: var(--ink); }
.plist canvas { width: 48px; height: auto; border-radius: 6px; background: #000; flex: none; }
.plist strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plist small { color: var(--muted); }
.exp .st-busy, .exp .st-done, .exp .st-error { display: none; }
.exp[data-state="busy"] .st-busy, .exp[data-state="done"] .st-done, .exp[data-state="error"] .st-error { display: block; }
.bar { height: 10px; border-radius: 6px; background: var(--panel-2); overflow: hidden; border: 1px solid var(--line); }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.2s; }
.egrid { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.egrid img { height: 220px; width: auto; border-radius: 8px; flex: none; scroll-snap-align: start; background: #000; }
.aidlg { width: min(640px, 94vw); }
#report ul { margin: 6px 0; padding-left: 20px; }

@media (max-width: 1100px) { .ewrap { grid-template-columns: minmax(0, 1fr) 320px; } }
/* a phone (or a narrow window): one column - the slide, the strip, then the settings */
@media (max-width: 860px) {
  body.ed { overflow: auto; height: auto; } .hide-s, .eico { display: none; }
  .etop { padding-left: 10px; padding-right: 10px; } .etitle { flex: 1 1 auto; width: auto; }
  .etop .ib { width: 34px; height: 34px; } #redo { display: none; } .etop .btn.small { padding-left: 10px; padding-right: 10px; }
  .ewrap { grid-template-columns: minmax(0, 1fr); } .cstage { height: 56vh; height: 56dvh; flex: none; }
  .nav { width: 38px; height: 38px; font-size: 22px; } .nav.prev { left: 4px; } .nav.next { right: 4px; }
  .thumb canvas { width: 58px; } .strip .addslide { width: 58px; }
  .eside { border-left: 0; border-top: 1px solid var(--line); overflow: visible; }
  .eside .tabs { top: 0; }
  .egrid img { height: 180px; }
}
