/* LEARN -> USE CASES, EDITING (js/learn-usecases-edit.js). Simon, 21 Oct
   2026. Developer accounts only: none of this is drawn for anybody else. */

/* the strip over the cards */
.uce-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 9px 12px; border: 1px dashed rgba(229, 10, 78, .45); border-radius: 8px;
  background: rgba(229, 10, 78, .05); font-size: 12.5px; color: var(--text-faint); }
.uce-bar b { color: var(--text); font-weight: 700; }
.uce-sp { flex: 1; }
.uce-msg { font-size: 12px; color: var(--text); max-width: 46ch; }
.uce-msg.bad, .uce-fmsg.bad, .uce-vmsg.bad { color: #ff6b6b; }
.uce-bar .ln-hbtn[hidden] { display: none; }
.uce-modal .ln-hbtn[disabled] { opacity: .45; cursor: default; filter: none; }
.uce-pend .tuc-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .2); border-top-color: var(--accent); animation: tuc-spin .8s linear infinite; }

/* a developer's card: Edit and Delete beside it, over the picture */
.uc-cw { position: relative; display: flex; min-width: 0; }
.uc-cw > .uc-card { flex: 1; min-width: 0; }
.uc-adm { position: absolute; right: 8px; top: 8px; display: flex; gap: 4px; z-index: 1; opacity: .85; transition: opacity .15s; }
.uc-cw:hover .uc-adm, .uc-adm:focus-within { opacity: 1; }
.uc-admb { font: inherit; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 4px; border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(0, 0, 0, .7); color: #fff; cursor: pointer; }
.uc-admb:hover { border-color: var(--accent); }
.uc-admdel:hover { background: #b3123f; border-color: #b3123f; }
.uc-dnav .uc-admb { background: var(--card-hover, #19191c); border-color: var(--border); margin-right: 4px; height: 30px; padding: 0 10px; }
.uc-tvid { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; pointer-events: none; }
.uc.uc-admin .uc-grid .uc-card { touch-action: pan-y; user-select: none; }

/* dropping */
.uc.uce-dragging .uc-grid { outline: 2px dashed rgba(229, 10, 78, .55); outline-offset: 6px; border-radius: 8px; }
.uc-cw.uce-dropto > .uc-card { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.uce-dropover { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 20002; padding: 10px 16px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); pointer-events: none; }
.uce-dropover[hidden] { display: none; }

/* moving a card */
.uce-ghost { position: fixed; left: 0; top: 0; z-index: 20003; pointer-events: none; padding: 6px 10px; border-radius: 6px; background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 700; max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
.uce-ghost.uce-no { background: #444; }
.uce-mark { position: fixed; z-index: 20002; width: 3px; border-radius: 2px; background: var(--accent); pointer-events: none; }
.uce-mark[hidden] { display: none; }
.uce-lifted { opacity: .4; }
html.uce-moving, html.uce-moving * { cursor: grabbing !important; }

/* the editor */
.uce-modal { position: fixed; inset: 0; z-index: 20010; background: rgba(0, 0, 0, .72); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.uce-box { width: min(1080px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 10px;
  background: var(--card); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); overflow: hidden; color: var(--text); }
.uce-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--border); font-size: 14px; }
.uce-top b { color: #fff; }
.uce-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 18px; padding: 16px 18px; overflow-y: auto; min-height: 0; }
@media (max-width: 799.98px) { .uce-body { grid-template-columns: 1fr; } }
.uce-media { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.uce-vid { position: relative; aspect-ratio: 16 / 9; border: 2px dashed var(--border); border-radius: 8px; background: #000; cursor: pointer; overflow: hidden;
  display: flex; align-items: center; justify-content: center; }
.uce-vid.over { border-color: var(--accent); }
.uce-vprev { position: absolute; inset: 0; }
.uce-vprev img, .uce-vprev video { width: 100%; height: 100%; object-fit: cover; display: block; }
.uce-vtext { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 10px 14px; border-radius: 6px;
  background: rgba(0, 0, 0, .6); font-size: 12px; color: var(--text-faint); }
.uce-vtext b { color: #fff; font-size: 13px; }
.uce-vmsg, .uce-fmsg { font-size: 12px; color: var(--text-faint); min-height: 16px; }
.uce-pics { display: flex; flex-wrap: wrap; gap: 6px; }
.uce-pic { position: relative; width: 84px; height: 56px; border-radius: 5px; border: 1px solid var(--border); overflow: hidden; background: #000; display: flex; align-items: center; justify-content: center; }
.uce-pic img { width: 100%; height: 100%; object-fit: cover; }
.uce-pic button { position: absolute; right: 2px; top: 2px; width: 18px; height: 18px; border-radius: 50%; border: 0; padding: 0; line-height: 18px; font-size: 13px;
  background: rgba(0, 0, 0, .75); color: #fff; cursor: pointer; }
.uce-addpic { align-self: flex-start; }
.uce-fields { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.uce-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.uce-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.uce-l { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }
.uce-h { font-size: 11px; color: var(--text-faint); }
.uce-f input, .uce-f textarea, .uce-f select { font: inherit; font-size: 13px; color: var(--text); background: var(--surface-sunk, #0e0e10); border: 1px solid var(--border);
  border-radius: 5px; padding: 7px 9px; min-width: 0; width: 100%; box-sizing: border-box; }
.uce-f textarea { resize: vertical; line-height: 1.5; }
.uce-f input:focus, .uce-f textarea:focus, .uce-f select:focus { outline: none; border-color: var(--accent); }
.uce-chk { display: flex; align-items: center; gap: 7px; font-size: 12.5px; padding-bottom: 8px; }
.uce-foot { display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-top: 1px solid var(--border); }
.uce-fmsg { flex: 1; }
