/* Social Proof admin tab. Loaded on demand by INITS.socialproof in backoffice.js.
   Base components (.card, .toggle, .toggle-row, .view-head, .grad-text,
   .section-label, .btn, .btn-primary, .btn-sm) come from main.css / backoffice.css. */

.sp-card { max-width: 640px; }

/* Master toggle reads as the primary control: gradient band inside the card. */
.sp-master-row {
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(88,0,157,.28), rgba(139,92,246,.10));
  border: 1px solid rgba(139,92,246,.25);
  padding: 12px 14px;
  margin-bottom: 4px;
}

/* Wraps the activity-type toggles + timing controls; calmer disabled treatment
   when the master switch is off. */
.sp-sub { transition: opacity .25s; }
.sp-sub.sp-dimmed { opacity: .55; pointer-events: none; cursor: not-allowed; }
.sp-sub.sp-dimmed .toggle { filter: grayscale(1); }

/* Number rows mirror .toggle-row without a switch on the right. */
.sp-number-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0 2px;
  border-top: 1px solid rgba(139,92,246,.12);
}
.sp-number-row .tt strong { display: block; font-size: .95rem; }
.sp-number-row .tt small {
  color: var(--muted-2);
  font-size: .82rem;
  display: block;
  margin-top: 3px;
  line-height: 1.5;
}
.sp-number-input { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.sp-number-input input {
  width: 76px;
  padding: 10px 12px;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  color: var(--text);
  background: rgba(0,0,0,.45);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.sp-number-input input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 12px rgba(139,92,246,.45);
}
.sp-number-input span { color: var(--muted); font-size: .88rem; }

/* Live preview card. */
.sp-preview-card { max-width: 640px; margin-top: 18px; }
.sp-preview {
  margin: 8px 0 14px;
  font-size: 1rem;
  line-height: 1.6;
  color: #cdb9ff;
  font-weight: 600;
}
.sp-preview-btn { margin-bottom: 4px; }
.sp-save-status { margin: 8px 0 0; font-size: .85rem; color: #cdb9ff; min-height: 1.2em; }
.sp-save-status.sp-error { color: #ff9d9d; }

/* Scoped checkbox toggles for admin.html. admin.css styles .toggle as a
   <button> switch, so the backoffice checkbox pattern is scoped here to the
   Social Proof panel only and never touches the Settings toggles. */
#panel-socialproof .toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
}
#panel-socialproof .toggle-row .tt strong { display: block; font-size: .95rem; }
#panel-socialproof .toggle-row .tt small {
  color: var(--muted-2);
  font-size: .82rem;
  display: block;
  margin-top: 3px;
  line-height: 1.5;
}
#panel-socialproof .toggle {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
  border: none;
  background: none;
  padding: 0;
}
#panel-socialproof .toggle input { opacity: 0; width: 0; height: 0; }
#panel-socialproof .toggle .tk {
  position: absolute;
  inset: 0;
  cursor: pointer;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--card-border);
  transition: background .2s, border-color .2s;
}
#panel-socialproof .toggle .tk::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #b9b4d9;
  transition: transform .2s, background .2s;
}
#panel-socialproof .toggle input:checked + .tk { background: var(--gradient); border-color: transparent; }
#panel-socialproof .toggle input:checked + .tk::before { transform: translateX(24px); background: #fff; }
#panel-socialproof .toggle input:focus-visible + .tk { outline: 2px solid var(--purple-light); outline-offset: 2px; }
