/* Made by terrarium/tools/make_cell_counter.py from app/cellcounter/notebook.css: edit that file. */
/* The Cell Counter inside Lab Notebook: the same app and the same colours, with more depth and light, plus the
   notebook's own buttons (back to the notebook, add to the notebook page). */

body {
  background:
    radial-gradient(1100px 700px at 88% -12%, rgba(87, 217, 178, .07), transparent 60%),
    radial-gradient(900px 640px at -12% 112%, rgba(242, 169, 59, .06), transparent 58%),
    var(--bg);
}

/* the rail: a little light from above, and the logo and name in the counter's colour in Lab Notebook: orange */
.rail { background: linear-gradient(180deg, #19202a 0%, #141920 46%, #12161c 100%); }
.rail-brand svg { filter: drop-shadow(0 0 10px rgba(242, 169, 59, .4)); }
.rail-brand svg rect { fill: #1A0F05; }
.rail-brand svg [stroke="#57D9B2"] { stroke: #F2A93B; }
.rail-brand svg [fill="#57D9B2"] { fill: #F2A93B; }
.rail-brand svg [stroke="#F2A93B"] { stroke: #FF6B35; }
.rail-brand svg [fill="#F2A93B"] { fill: #FF6B35; }
.rail-brand span { background: linear-gradient(90deg, #f3f5f8 10%, #ffd9a0 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-item.active { background: linear-gradient(90deg, rgba(242, 169, 59, .12), rgba(255, 255, 255, .03)); box-shadow: inset 0 0 0 1px var(--border), inset 2px 0 0 var(--amber); }

/* buttons with a little lift */
.btn { transition: border-color .15s, transform .15s, box-shadow .15s, filter .15s; }
.btn.primary { background: linear-gradient(135deg, #f6b955, var(--amber) 55%, #e6952a); box-shadow: 0 6px 18px rgba(242, 169, 59, .22), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(242, 169, 59, .32), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn:active { transform: translateY(0); }

/* panels with depth */
.panel { background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, 0) 120px), var(--panel); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 12px 32px rgba(0, 0, 0, .28); }
.inspector .panel h2 { letter-spacing: .04em; }

/* the result: a bright number, a glowing viability bar */
.count-hero .num { background: linear-gradient(180deg, #ffffff 35%, #a8f0da); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 22px rgba(87, 217, 178, .28)); }
.count-hero.ln-pulse .num { animation: ln-pulse .7s cubic-bezier(.2, .8, .2, 1); }
@keyframes ln-pulse { 0% { transform: scale(.92); filter: drop-shadow(0 0 0 rgba(87, 217, 178, 0)); } 45% { transform: scale(1.06); filter: drop-shadow(0 0 26px rgba(87, 217, 178, .7)); } 100% { transform: scale(1); } }
.count-hero .num { display: inline-block; transform-origin: left bottom; }
.viability-bar { height: 8px; border-radius: 4px; background: linear-gradient(90deg, #f08b9b, var(--coral)); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.viability-bar .fill { background: linear-gradient(90deg, #39c49b, var(--mint)); box-shadow: 0 0 14px rgba(87, 217, 178, .55); transition: width .7s cubic-bezier(.2, .7, .2, 1); }

/* the photo floats on a dark stage */
.viewer { background: radial-gradient(ellipse at 50% 40%, #0c1018 0%, var(--viewer-bg) 72%); }
.viewer #canvas { box-shadow: 0 24px 70px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .06); }

/* while a photo is counted, a beam sweeps across it */
.viewer:has(#procBadge.show)::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: linear-gradient(100deg, transparent 38%, rgba(87, 217, 178, .08) 47%, rgba(140, 240, 210, .26) 50%, rgba(87, 217, 178, .08) 53%, transparent 62%);
  background-size: 260% 100%;
  animation: ln-scan 1.5s linear infinite;
}
@keyframes ln-scan { from { background-position: 125% 0; } to { background-position: -25% 0; } }
.processing-badge { z-index: 3; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* the empty viewer: cells drift behind a dark halo, and the counter outlines them as they pass */
.ln-field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.viewer .empty { position: relative; z-index: 1; padding: 34px 40px 28px; border-radius: 28px; background: radial-gradient(closest-side, rgba(5, 6, 10, .92) 0%, rgba(5, 6, 10, .74) 62%, rgba(5, 6, 10, 0) 100%); max-width: 520px; }
.empty .empty-ico { color: var(--mint); filter: drop-shadow(0 0 12px rgba(87, 217, 178, .55)); animation: ln-breathe 3.2s ease-in-out infinite; }
@keyframes ln-breathe { 50% { transform: scale(1.08); filter: drop-shadow(0 0 20px rgba(87, 217, 178, .8)); } }
.ln-kicker { font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--mint); opacity: .9; }
.empty h2 { font-size: 27px; line-height: 1.2; letter-spacing: -.01em; background: linear-gradient(90deg, #ffffff 15%, #a8f0da 60%, #f6c27a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.empty p { color: #a3abbb; }
.empty-actions .btn { padding: 11px 20px; font-size: 13.5px; }

/* ---------- inside Lab Notebook ---------- */
.ln-back {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: rgba(255, 255, 255, .03); color: var(--text-dim);
  font: inherit; font-size: 12.5px; text-align: left; cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.ln-back:hover { color: var(--text); border-color: var(--text-faint); background: rgba(255, 255, 255, .06); }
.ln-back .ico { width: 16px; height: 16px; }

.ln-add {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px;
  background: linear-gradient(135deg, #6fe6c2, var(--mint) 55%, #39c49b); color: #032119; border-color: transparent; font-weight: 600;
  box-shadow: 0 6px 20px rgba(87, 217, 178, .28), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.ln-add:hover { transform: translateY(-1px); border-color: transparent; box-shadow: 0 10px 28px rgba(87, 217, 178, .38), inset 0 1px 0 rgba(255, 255, 255, .4); }
.ln-add:disabled { opacity: .6; transform: none; cursor: progress; }
.ln-add .ico { width: 16px; height: 16px; stroke-width: 2; }
.ln-add-to:empty { display: none; }
.ln-add-to { font: 600 11px/1 ui-monospace, 'SF Mono', Menlo, monospace; padding: 3px 6px; border-radius: 5px; background: rgba(3, 33, 25, .16); }
#batchDownloadRow .ln-add { margin-right: auto; }
#batchDownloadRow .ln-add:has(+ .ln-photos) { margin-right: 0; }
.ln-photos .photos-n { background: rgba(3, 33, 25, .16); margin-left: 0; }
.ln-photos:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
#photosDialog .ln-add .ln-add-text { display: inline; }

/* the rail shows icons only on narrower windows */
@media (min-width: 821px) and (max-width: 1180px) {
  .ln-back { justify-content: center; padding: 8px 0; }
  .ln-back span { display: none; }
}
@media (max-width: 1000px) {
  .ln-add .ln-add-text { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .empty .empty-ico, .count-hero.ln-pulse .num, .viewer:has(#procBadge.show)::after { animation: none; }
}

/* the results panel takes the width it is dragged to (js/panels.js); phones keep the counter's own layout */
:root { --ln-edge-color: var(--amber); }
@media (min-width: 1181px) { .workspace { grid-template-columns: minmax(0, 1fr) var(--ln-insp-w, 332px); } }
@media (min-width: 821px) and (max-width: 1180px) { .workspace { grid-template-columns: minmax(0, 1fr) var(--ln-insp-w, 300px); } }
