/* ==========================================================
   Prototipo admin: minimalus, neutralus UI (ne brando),
   kaip testu-micro-learning. Tik prototipui.

   Markup:
   <div class="ms-admin">
     <div class="ms-admin-panel">
       <div class="ms-admin-title">…</div>
       <div class="ms-admin-group">Grupė</div>
       <label class="ms-admin-opt"><input type="radio">…</label>
       <button class="ms-admin-reset">…</button>
     </div>
     <button class="ms-admin-btn">…</button>
   </div>
   ========================================================== */
.ms-admin {
  --ui-font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  --ui-ink: #1f2323;
  --ui-sub: #8b9090;
  --ui-line: rgba(0, 0, 0, .08);
  --ui-hover: rgba(0, 0, 0, .045);
  --ui-shadow: 0 0 0 .5px rgba(0, 0, 0, .12), 0 2px 4px rgba(0, 0, 0, .04), 0 12px 32px rgba(0, 0, 0, .10);
  position: fixed; left: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 450;
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  font-family: var(--ui-font); -webkit-font-smoothing: antialiased;
}
.ms-admin-btn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .9); box-shadow: 0 0 0 .5px rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .05); color: var(--ui-ink); font: 500 12px/1 var(--ui-font); cursor: pointer; opacity: .8; transition: opacity .15s, background .15s; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.ms-admin-btn svg { color: var(--ui-sub); }
.ms-admin-btn:hover, .ms-admin-btn[aria-expanded="true"] { opacity: 1; background: #fff; }
.ms-admin-btn[aria-expanded="true"] svg { color: var(--ui-ink); }
.ms-admin-btn:focus-visible { outline: 2px solid rgba(0, 0, 0, .25); outline-offset: 1px; }

.ms-admin-panel { width: 290px; max-height: calc(100vh - 72px); overflow-y: auto; padding: 6px; border-radius: 12px; background: #fff; box-shadow: var(--ui-shadow); color: var(--ui-ink); font: 12px/1.4 var(--ui-font); }
.ms-admin-title { padding: 8px 8px 4px; font-weight: 600; }
.ms-admin-group { margin: 0; padding: 10px 8px 4px; color: var(--ui-sub); font-size: 11px; font-weight: 500; }
.ms-admin-opt { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; line-height: 16px; cursor: pointer; transition: background .12s; }
.ms-admin-opt:hover { background: var(--ui-hover); }
.ms-admin-opt small { margin-left: auto; color: var(--ui-sub); font-size: 11px; }

.ms-admin input[type=radio], .ms-admin input[type=checkbox] { appearance: none; -webkit-appearance: none; flex: 0 0 14px; width: 14px; height: 14px; margin: 0; border: 1px solid rgba(0, 0, 0, .25); background: #fff center / 10px no-repeat; cursor: pointer; transition: background-color .12s, border-color .12s; }
.ms-admin input[type=radio] { border-radius: 50%; }
.ms-admin input[type=radio]:checked { border: 4px solid var(--ui-ink); }
.ms-admin input[type=checkbox] { border-radius: 4px; }
.ms-admin input[type=checkbox]:checked { background-color: var(--ui-ink); border-color: var(--ui-ink); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 5l3.2 3.2L11 1.5'/%3E%3C/svg%3E"); }

.ms-admin-reset { display: block; width: calc(100% - 4px); margin: 6px 2px 2px; padding: 7px 8px; border: 0; border-top: 1px solid var(--ui-line); border-radius: 0 0 6px 6px; background: none; color: var(--ui-sub); font: 12px var(--ui-font); text-align: left; cursor: pointer; transition: color .12s, background .12s; }
.ms-admin-reset:hover { color: var(--ui-ink); background: var(--ui-hover); }

@media (prefers-reduced-motion: reduce) { .ms-admin * { transition: none !important; } }
body.is-shot .ms-admin { display: none; }

/* ==========================================================
   Prezentacijos lapelis „Kaip veikia DI paieška“.
   Geltonas kaip lipnus lapelis, kad būtų aišku: ne sąsajos dalis.
   ========================================================== */
.brain-btn { position: fixed; top: 22px; left: calc(var(--ms-sidebar-w, 272px) - 52px); z-index: 70; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid #e6d27a; border-radius: 8px; background: #fff3a8; color: #6b5a12; box-shadow: 0 2px 6px rgba(80, 60, 0, .15); cursor: pointer; transition: transform .15s, box-shadow .15s; }
.brain-btn:hover { transform: translateY(-1px) rotate(-3deg); box-shadow: 0 4px 12px rgba(80, 60, 0, .22); }
.brain-bg { position: fixed; inset: 0; z-index: 71; background: rgba(40, 35, 10, .18); }
.brain { position: fixed; top: 16px; left: 16px; bottom: 16px; z-index: 72; width: min(420px, calc(100vw - 32px)); overflow-y: auto; padding: 28px 28px 24px; border-radius: 4px 4px 4px 22px; background: #fff6b3; color: #3d3510; font-family: 'Open Sans', system-ui, sans-serif; box-shadow: 0 18px 40px rgba(60, 45, 0, .28), 0 2px 4px rgba(60, 45, 0, .12); transform: rotate(-.6deg); }
.brain::before { content: ''; position: absolute; top: -1px; left: 50%; width: 110px; height: 22px; background: rgba(255, 255, 255, .55); transform: translateX(-50%) rotate(1.5deg); box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.brain h2 { margin: 6px 0 8px; font-size: 22px; font-weight: 700; line-height: 1.25; }
.brain h3 { margin: 20px 0 6px; font-size: 15px; font-weight: 700; }
.brain p, .brain li { font-size: 14.5px; line-height: 1.55; }
.brain-lead { margin: 0; }
.brain ul { margin: 0; padding-left: 18px; }
.brain li { margin: 4px 0; }
.brain li::marker { color: #b39a1e; }
.brain b { font-weight: 700; }
.brain-foot { margin: 22px 0 0; padding-top: 12px; border-top: 1px dashed #d9c35a; color: #7a6a24; font-size: 13px !important; }
.brain-x { position: absolute; top: 10px; right: 12px; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: none; color: #6b5a12; font-size: 20px; cursor: pointer; }
.brain-x:hover { background: rgba(107, 90, 18, .1); }
.brain-anim { transition: opacity .25s ease, transform .3s cubic-bezier(.2, .8, .2, 1); }
.brain-off { opacity: 0; transform: translateX(-24px) rotate(-2deg); }
body.is-shot .brain-btn { display: none; }
.brain-bg { z-index: 1100; }
.brain { z-index: 1101; }
/* Lapelio mygtukas apačioje šalia Admin */
.brain-btn { top: auto; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); left: 98px; width: 28px; height: 28px; border-radius: 8px; z-index: 450; }
.brain-btn svg { width: 16px; height: 16px; }

/* Artefaktų katalogas (prototipui): mygtukas šalia Admin ir „smegenų“ */
.arts-btn { position: fixed; left: 136px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 450; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .9); box-shadow: 0 0 0 .5px rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .08); color: #2f4347; font-size: 12.5px; font-weight: 500; }
.arts-btn svg { color: #5f7a7e; }
.arts-btn:hover, .arts-btn[aria-expanded="true"] { background: #fff; }
.arts { position: fixed; left: 12px; bottom: calc(48px + env(safe-area-inset-bottom, 0px)); z-index: 460; width: 300px; max-height: calc(100vh - 72px); overflow-y: auto; padding: 8px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .12), 0 12px 32px rgba(0, 0, 0, .16); scrollbar-width: thin; }
.arts-title { display: grid; gap: 1px; padding: 6px 8px 8px; color: #2f4347; font-size: 13px; font-weight: 700; }
.arts-title small { color: #8aa3a6; font-size: 11.5px; font-weight: 400; }
.arts-group { margin: 8px 8px 4px; color: #8aa3a6; font-size: 10.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; }
.arts-i { display: flex; align-items: baseline; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: 6px; background: none; color: #2f4347; font-size: 13px; text-align: left; }
.arts-i span { flex: 1; min-width: 0; }
.arts-i small { flex: 0 0 auto; color: #a3b6b8; font-size: 11px; }
.arts-i:hover { background: #f3f7f7; }
.arts-i.is-on { background: #e6f0f0; font-weight: 600; }
body.is-shot .arts-btn, body.is-shot .arts { display: none; }

/* Admin: parametrai kaip eilutės su antro lygio meniu į šoną */
.ms-admin-row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: 6px; background: none; color: var(--ui-ink); font: 12px/16px var(--ui-font); text-align: left; cursor: pointer; transition: background .12s; }
.ms-admin-row span { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-admin-row small { flex: 1 1 0; min-width: 0; overflow: hidden; color: var(--ui-sub); font-size: 11px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.ms-admin-row svg { flex: 0 0 auto; color: var(--ui-sub); }
.ms-admin-row:hover, .ms-admin-row.is-open { background: var(--ui-hover); }
.ms-admin-sub { position: fixed; z-index: 470; width: 260px; max-height: calc(100vh - 24px); overflow-y: auto; padding: 6px; border-radius: 12px; background: #fff; box-shadow: var(--ui-shadow); color: var(--ui-ink); font: 12px/1.4 var(--ui-font); animation: ms-sub-in .14s ease; }
@keyframes ms-sub-in { from { opacity: 0; transform: translateX(-4px); } }
