/* Shared 1-click install row. Loaded by every forge so the button cannot drift
   between pages. Uses only the shared theme tokens from THEME.md. */

.oneclick-row {
  display: flex;
  gap: 8px;
  margin: 20px 0 0;
}

/* Each button flexes equally, so adding a second manager later splits the row
   50/50 with no further CSS. */
.oneclick-btn {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.oneclick-btn:hover:not([disabled]) {
  background: var(--bg-2);
  border-color: var(--brass-dim);
}

.oneclick-btn:active:not([disabled]) { transform: translateY(1px); }

.oneclick-btn[disabled] { opacity: 0.4; cursor: default; }

/* Detected, but there is nothing to send yet. Dimmed to read as "not now"
   while staying clickable, so the click can explain why. */
.oneclick-btn.is-idle { opacity: 0.55; }
.oneclick-btn.is-idle:hover { opacity: 0.8; }

.oneclick-icon {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  overflow: hidden;
}

.oneclick-icon img {
  width: 100%;
  height: 100%;
  /* contain, not cover: a manager's mark may be a full-bleed tile or a logo
     with its own margins, and contain renders both correctly without cropping. */
  object-fit: contain;
  display: block;
}

.oneclick-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.oneclick-title {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.oneclick-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
}

/* Marks a manager whose side of the handshake is not in a public build yet.
   Kept small and muted: it is a caveat, not a call to action. */
.oneclick-wip {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 4px;
  vertical-align: middle;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--bg);
  background: var(--brass-dim);
  border-radius: 2px;
}

.oneclick-btn.is-detected .oneclick-wip { background: var(--brass); }

/* Detected: brass up the title so a running manager reads as the live path,
   matching the brass-for-primary-accent rule in THEME.md. */
.oneclick-btn.is-detected .oneclick-title { color: var(--brass); }
.oneclick-btn.is-detected:hover:not([disabled]) .oneclick-title { color: var(--brass-hot); }
.oneclick-btn.is-detected .oneclick-icon { border-color: var(--brass-dim); }

.oneclick-btn.is-working {
  animation: oneclick-pulse 1s ease-in-out infinite alternate;
}

/* Success uses the same mint-green as an active selection elsewhere. */
.oneclick-btn.is-sent {
  border-color: var(--sel-dim);
  box-shadow: 0 0 12px var(--sel-glow);
}
.oneclick-btn.is-sent .oneclick-title { color: var(--sel); }

@keyframes oneclick-pulse {
  from { opacity: 0.65; }
  to   { opacity: 1; }
}

@media (max-width: 420px) {
  .oneclick-row { flex-direction: column; }
}
