/* Batch tools section (index.html #toolkit): Censor Faces spotlight, then
   Denoise and Camera Profile cards, each with a small mock of the real
   dialog. Entrances are played by batch-tools.js (html.tk-armed, .tk-on). */

.toolkit { border-top: 1px solid var(--border); }

.tk-head {
  display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: end;
  margin-bottom: 4.2rem;
}
.tk-title { font-size: clamp(2.5rem, 4.4vw, 4rem); }
.tk-title em { font-style: normal; color: var(--accent); }
.tk-intro { color: var(--muted); font-size: 1.05rem; line-height: 1.85; }
.tk-intro strong { color: var(--text); font-weight: 500; }

.tk-cmd {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: 'DM Mono', monospace; font-size: .72rem; letter-spacing: .04em;
  color: var(--fc, var(--accent)); margin-bottom: 1.1rem;
}
.tk-cmd .tk-new {
  font-family: 'Inter', sans-serif; font-size: .64rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  padding: .18rem .5rem; border-radius: 999px;
  color: #0e1a26; background: var(--fc, var(--accent));
}
.tk-h3 {
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700;
  font-size: clamp(1.7rem, 2.6vw, 2.35rem); line-height: 1.12; letter-spacing: -.02em;
  margin-bottom: 1.1rem;
}
.tk-h3 em { font-style: normal; color: var(--fc, var(--accent)); }
.tk-body { color: var(--muted); line-height: 1.8; }
.tk-body strong { color: var(--text); font-weight: 500; }

.tk-points { list-style: none; margin-top: 1.6rem; display: grid; gap: .95rem; }
.tk-points li {
  position: relative; padding-left: 1.7rem; color: var(--muted);
  font-size: .96rem; line-height: 1.65;
}
.tk-points li strong { color: var(--text); font-weight: 500; }
.tk-points li::before {
  content: ''; position: absolute; left: 0; top: .5em;
  width: .7rem; height: .7rem; border-radius: 2px;
  background:
    linear-gradient(var(--fc, var(--accent)), var(--fc, var(--accent))) 0 0 / 50% 50% no-repeat,
    linear-gradient(color-mix(in srgb, var(--fc, var(--accent)) 45%, transparent),
                    color-mix(in srgb, var(--fc, var(--accent)) 45%, transparent)) 100% 0 / 50% 50% no-repeat,
    linear-gradient(color-mix(in srgb, var(--fc, var(--accent)) 45%, transparent),
                    color-mix(in srgb, var(--fc, var(--accent)) 45%, transparent)) 0 100% / 50% 50% no-repeat,
    linear-gradient(var(--fc, var(--accent)), var(--fc, var(--accent))) 100% 100% / 50% 50% no-repeat;
}

/* ─── Censor Faces spotlight ─── */
.tk-spot {
  --fc: #f0819e;
  display: grid; grid-template-columns: .9fr 1.1fr; gap: 4.5rem; align-items: center;
  padding: 3.2rem 0 4rem;
  border-top: 1px solid var(--border);
}
.tk-visual { position: relative; padding-bottom: 2.4rem; }
.tk-photo {
  position: relative; margin: 0; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border-2);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .8);
  aspect-ratio: 1400 / 1211;
  background: var(--bg-3);
}
.tk-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* A box around each found face, with its person's name. */
.tk-face {
  position: absolute; width: 11%; aspect-ratio: 1;
  border: 2px solid var(--fc); border-radius: 4px;
  transform: translate(-50%, -50%);
  transition: opacity .45s ease, transform .6s var(--ease-out, ease);
}
.tk-face span {
  position: absolute; left: 50%; top: calc(100% + .35rem); transform: translateX(-50%);
  white-space: nowrap; font-size: .66rem; font-weight: 600; letter-spacing: .02em;
  padding: .12rem .45rem; border-radius: 4px; color: #2a0f17; background: var(--fc);
}
.tk-face.f1 { left: 26.4%; top: 15.9%; }
.tk-face.f2 { left: 71.8%; top: 51.6%; }

/* The picker: the plugin's dialog, floating over the photo. */
.tk-picker {
  position: absolute; left: -2.2rem; bottom: 0; width: min(330px, 78%);
  transition: opacity .6s ease, transform .7s var(--ease-out, ease);
}

/* The result: a copy, stacked, still a raw. */
.tk-result {
  position: absolute; right: 1rem; top: 1rem;
  display: flex; align-items: center; gap: .55rem;
  padding: .45rem .7rem; border-radius: 8px;
  background: rgba(20, 20, 22, .82); backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-2);
  font-family: 'DM Mono', monospace; font-size: .68rem; color: var(--text);
  transition: opacity .5s ease, transform .6s var(--ease-out, ease);
}
.tk-result b {
  font-family: 'Inter', sans-serif; font-size: .6rem; letter-spacing: .1em; font-weight: 600;
  padding: .1rem .38rem; border-radius: 4px; color: #0d1f12; background: #74d68a;
}

/* Armed by batch-tools.js: start hidden, play in once in view. */
.tk-armed .tk-spot:not(.tk-on) .tk-face { opacity: 0; transform: translate(-50%, -50%) scale(1.35); }
.tk-armed .tk-spot:not(.tk-on) .tk-picker { opacity: 0; transform: translateY(18px); }
.tk-armed .tk-spot:not(.tk-on) .tk-result { opacity: 0; transform: translateY(-8px); }
.tk-spot.tk-on .tk-face.f1 { transition-delay: .35s; }
.tk-spot.tk-on .tk-face.f2 { transition-delay: .6s; }
.tk-spot.tk-on .tk-picker { transition-delay: .95s; }
.tk-spot.tk-on .tk-result { transition-delay: 1.5s; }

/* ─── Denoise + Camera Profile cards ─── */
.tk-pair {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
}
.tk-card {
  position: relative; overflow: hidden;
  border: 1px solid var(--border); border-radius: 14px;
  padding: 2.2rem 2.2rem 2.4rem;
  background:
    radial-gradient(120% 80% at 100% 0%,
      color-mix(in srgb, var(--fc) 11%, transparent), transparent 60%),
    var(--bg-2);
  transition: border-color .25s ease, transform .3s var(--ease-out, ease);
}
@media (hover: hover) {
  .tk-card:hover { border-color: var(--border-2); transform: translateY(-3px); }
}
.tk-card.denoise { --fc: #7dd3fc; }
.tk-card.profile { --fc: #f5b661; }
.tk-card .tk-h3 { font-size: clamp(1.45rem, 2vw, 1.8rem); }

.tk-mock { margin-top: 1.9rem; }

/* ─── Lightroom dialogs ───
   Drawn like the real plug-in dialogs: Lightroom shows them light even in
   dark mode, with a bold title, grey headings over soft group boxes, and
   white rows that turn blue when ticked. */
.lr-win {
  --lr-text: #1d1d1f; --lr-muted: #77777e; --lr-blue: #0a70e6;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', sans-serif;
  color: var(--lr-text); background: #ececec; border-radius: 11px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .5), 0 30px 60px -22px rgba(0, 0, 0, .85);
  text-align: left;
}
.lr-titlebar {
  height: 26px; display: grid; place-items: center;
  background: #f4f4f6; border-bottom: 1px solid #d9d9dc;
  font-size: .66rem; font-weight: 600; color: #4b4b50;
}
.lr-body { padding: .85rem 1rem .9rem; font-size: .74rem; }
.lr-h { font-size: 1.04rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.lr-sub { color: var(--lr-muted); font-size: .72rem; line-height: 1.45; margin-top: .15rem; }
.lr-label {
  margin: .8rem 0 .3rem; font-size: .58rem; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--lr-muted);
}
.lr-box {
  background: #e7e7e7; border: 1px solid rgba(0, 0, 0, .07); border-radius: 7px;
  padding: .6rem .7rem;
}
.lr-card {
  display: grid; grid-template-columns: 28px 1fr auto; gap: .6rem; align-items: center;
  margin-top: .45rem; padding: .45rem .6rem; border-radius: 8px;
  background: #fff; border: 1px solid #d8d8de;
}
.lr-sub + .lr-card { margin-top: .75rem; }
.lr-card.on { background: #e9f2ff; border-color: #8cbcf5; }
.lr-card svg { width: 28px; height: 28px; border-radius: 6px; display: block; }
.lr-card-t { font-weight: 600; font-size: .74rem; line-height: 1.25; }
.lr-card-t small { display: block; font-weight: 400; font-size: .66rem; color: var(--lr-muted); }
.lr-cb {
  width: 14px; height: 14px; border-radius: 3.5px; display: grid; place-items: center;
  background: #fff; border: 1px solid #b8b8be;
}
.lr-cb.on { background: var(--lr-blue); border-color: var(--lr-blue); }
.lr-cb.on::after {
  content: ''; width: 6px; height: 3px; margin-top: -2px;
  border: 1.6px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg);
}
.lr-btns { display: flex; justify-content: flex-end; gap: .45rem; margin-top: .9rem; }
.lr-btn {
  min-width: 4.4rem; text-align: center; padding: .22rem .8rem; border-radius: 6px;
  font-size: .7rem; background: #fff; color: var(--lr-text);
  border: 1px solid rgba(0, 0, 0, .12); box-shadow: 0 1px 0 rgba(0, 0, 0, .04);
}
.lr-btn.primary {
  color: #fff; border-color: transparent;
  background: linear-gradient(#3b86f7, #1f6fee);
}
.lr-iso {
  display: grid; grid-template-columns: 2.4rem 1fr 1.5rem 2.6rem; gap: .55rem; align-items: center;
  padding: .2rem 0; font-size: .72rem;
}
.lr-iso > span:first-child { text-align: right; }
.lr-iso.head { font-size: .6rem; font-weight: 700; color: var(--lr-muted); padding-bottom: .3rem; }
.lr-iso em { font-style: normal; color: var(--lr-muted); }
.lr-meter { height: 6px; border-radius: 3px; background: #dcdce2; overflow: hidden; }
.lr-meter i {
  display: block; height: 100%; width: var(--w); border-radius: 3px; background: var(--lr-blue);
  transform-origin: left; transition: transform .9s var(--ease-out, ease);
}
.tk-armed .tk-card:not(.tk-on) .lr-meter i { transform: scaleX(0); }
.lr-field {
  font-weight: 400; padding: .08rem .35rem; background: #fff;
  border: 1px solid #c8c8ce; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
}
.lr-popup {
  position: relative; padding: .28rem 1.9rem .28rem .55rem; border-radius: 6px;
  background: #fff; border: 1px solid rgba(0, 0, 0, .12); box-shadow: 0 1px 1px rgba(0, 0, 0, .06);
  font-size: .72rem;
}
.lr-popup::after {
  content: ''; position: absolute; right: 4px; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  border-radius: 4px; background: var(--lr-blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M4.5 5.5 7 3l2.5 2.5M4.5 8.5 7 11l2.5-2.5' fill='none' stroke='%23fff' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.lr-note { color: var(--lr-muted); font-size: .66rem; line-height: 1.45; margin-top: .45rem; }
.lr-promise { margin-top: .75rem; color: var(--lr-muted); font-size: .7rem; }
.lr-promise::before { content: '\2713'; color: #249648; font-weight: 700; margin-right: .4rem; }

/* Lightroom's own activity bar, where a batch shows its progress. */
.lr-activity {
  margin-top: .9rem; padding: .6rem .8rem; border-radius: 8px;
  background: #1b1b1d; border: 1px solid var(--border);
}
.lr-activity-text { color: var(--muted); font-size: .7rem; margin-bottom: .4rem; }
.lr-activity-track { height: 4px; border-radius: 2px; background: #3a3a3e; overflow: hidden; }
.lr-activity-track i {
  display: block; height: 100%; width: 42%; border-radius: 2px; background: #c9c9cc;
  animation: tk-progress 7s ease-in-out infinite;
}
@keyframes tk-progress {
  0% { width: 12%; } 70% { width: 64%; } 100% { width: 64%; }
}

/* ─── Strip ─── */
.tk-strip {
  margin-top: 2.6rem; display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.tk-strip div {
  padding: 1.3rem 1.2rem; font-size: .9rem; color: var(--muted); line-height: 1.55;
  border-right: 1px solid var(--border);
}
.tk-strip div:last-child { border-right: 0; }
.tk-strip strong { display: block; color: var(--text); font-weight: 500; margin-bottom: .15rem; }
.tk-strip .menu {
  font-family: 'DM Mono', monospace; font-size: .76rem; color: var(--accent-hi);
}

@media (max-width: 900px) {
  .tk-head, .tk-spot, .tk-pair { grid-template-columns: 1fr; gap: 2.4rem; }
  .tk-head { margin-bottom: 2.6rem; }
  .tk-spot { padding-top: 2.4rem; }
  .tk-visual { padding-bottom: 0; }
  .tk-picker { position: relative; left: 0; width: auto; margin-top: -2.2rem; margin-left: 1rem; margin-right: 1rem; }
  .tk-card { padding: 1.7rem 1.4rem 1.9rem; }
  .tk-strip { grid-template-columns: 1fr; }
  .tk-strip div { border-right: 0; border-bottom: 1px solid var(--border); }
  .tk-strip div:last-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .lr-activity-track i { animation: none; width: 42%; }
}
