/* ═══════════════════════════════════════════════════════════════
   GOOGLE DRIVE — "Rev 2, in place." signature hero
   Two-pane mirror: Lightroom file list ⇄ Drive folder with rev
   counters. Row-by-row EDITED → amber sync sweep → rev 2 ✓, plus
   one 1.4 GB TIFF that stalls at 61% and RESUMES (never restarts).
   Behavior: /js/product/google-drive.js. Loads after /css/product.css.
   ═══════════════════════════════════════════════════════════════ */

.gd-demo {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 1.2rem; align-items: start;
  background: rgba(13 11 8 / 0.55);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: 5px;
  padding: 1.3rem;
  font-size: 0.66rem;
}
.gd-col { min-width: 0; }
.gd-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 0.8rem;
  color: var(--dim); font-size: 0.58rem; letter-spacing: 0.18em;
  margin-bottom: 0.85rem; white-space: nowrap;
}
.gd-head-sub { color: var(--dim); opacity: 0.55; font-size: 0.5rem; letter-spacing: 0.14em; }

/* ── file rows ─────────────────────────────────────────────── */
.gd-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-soft); }
.gd-list li {
  position: relative;
  border-bottom: 1px solid var(--line-soft);
  letter-spacing: 0.05em; color: var(--silver);
}
.gd-list li:nth-child(odd) { background: rgba(201 194 182 / 0.03); }
.gd-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.gd-name em { font-style: normal; color: var(--dim); font-size: 0.56rem; margin-left: 0.45em; }

/* Lightroom pane: clickable rows */
#gdSrc button {
  all: unset; box-sizing: border-box;
  display: flex; justify-content: space-between; align-items: center; gap: 0.7rem;
  width: 100%; padding: 0.62rem 0.55rem;
  font: inherit; letter-spacing: inherit; color: inherit;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}
@media (hover: hover) {
  #gdSrc button:hover { background: rgba(232 163 61 / 0.07); color: var(--highlight); }
}
#gdSrc button:focus-visible { outline: 2px solid var(--amber); outline-offset: -2px; }
#gdSrc .gd-flag {
  color: var(--safelight); font-size: 0.54rem; letter-spacing: 0.12em;
  opacity: 0; transition: opacity 0.35s; flex: none;
}
#gdSrc li.is-edited { color: var(--highlight); }
#gdSrc li.is-edited .gd-flag { opacity: 1; }

/* Drive pane: name · status/rev · progress underline */
#gdDst li {
  display: flex; justify-content: space-between; align-items: center; gap: 0.7rem;
  padding: 0.62rem 0.55rem;
  transition: background 0.4s;
}
#gdDst li.is-syncing { background: rgba(232 163 61 / 0.08); }
#gdDst li.is-lost { background: rgba(255 92 57 / 0.07); }
.gd-status {
  margin-left: auto; flex: none;
  font-size: 0.52rem; letter-spacing: 0.1em; color: var(--amber);
  display: none; white-space: nowrap;
}
#gdDst li.has-status .gd-status { display: inline; }
#gdDst li.has-status .gd-rev { display: none; }
#gdDst li.has-status .gd-name em { display: none; } /* free room for long statuses */
#gdDst li.is-lost .gd-status { color: var(--safelight); animation: gd-lost-blink 0.5s step-end 2; }
#gdDst li.is-paused .gd-status { color: var(--dim); animation: none; }
@keyframes gd-lost-blink { 50% { opacity: 0.25; } }
.gd-rev {
  font-style: normal; color: var(--dim); flex: none;
  font-variant-numeric: tabular-nums; white-space: nowrap;
  transition: color 0.4s;
}
#gdDst li.is-updated .gd-rev { color: var(--teal); }
.gd-bar {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--amber); transform: scaleX(0); transform-origin: left;
  pointer-events: none;
  transition: background 0.3s, opacity 0.4s;
}
#gdDst li.is-lost .gd-bar { background: var(--safelight); }
#gdDst li.is-updated .gd-bar { opacity: 0; }

/* ── the link between panes ────────────────────────────────── */
.gd-link { display: grid; place-items: center; align-self: stretch; }
.gd-pulse { width: 34px; height: 1px; background: var(--line); position: relative; overflow: hidden; }
.gd-pulse::after {
  content: ''; position: absolute; inset: 0;
  background: var(--amber); transform: translateX(-100%);
}
.gd-demo.is-flowing .gd-pulse::after { animation: gd-pulse 1.1s var(--ease-inout) infinite; }
@keyframes gd-pulse { to { transform: translateX(100%); } }

/* ── meter line ────────────────────────────────────────────── */
.gd-meter {
  margin-top: 0.9rem; padding: 0 0.2rem;
  color: var(--dim); font-size: 0.6rem; letter-spacing: 0.2em;
  font-variant-numeric: tabular-nums;
  transition: color 0.4s;
}
.gd-meter.is-synced { color: var(--teal); }

/* ── reduced motion: final state, no loops ─────────────────── */
@media (prefers-reduced-motion: reduce) {
  #gdDst li.is-lost .gd-status { animation: none; }
  .gd-demo.is-flowing .gd-pulse::after { animation: none; }
}

/* ── responsive ────────────────────────────────────────────── */
@media (max-width: 760px) {
  .gd-demo { grid-template-columns: 1fr; font-size: 0.62rem; }
  .gd-link { display: none; }
  .gd-head { white-space: normal; }
}
