/* AvatarFactory Modern Operator — shared component styles */

/* ── Modal ────────────────────────────────────────────────────── */
.pv-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(8, 7, 11, 0.72);
  backdrop-filter: blur(6px);
  z-index: 80;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease-out;
}
.pv-modal-backdrop.open { opacity: 1; pointer-events: auto; }

.pv-modal {
  background: #1c1b1c;
  border-radius: 24px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(255,255,255,0.06);
  width: 100%; max-width: 640px;
  max-height: 86vh;
  overflow: hidden;
  transform: translateY(12px) scale(0.98);
  opacity: 0;
  transition: transform 200ms ease-out, opacity 180ms ease-out;
  display: flex; flex-direction: column;
}
.pv-modal-backdrop.open .pv-modal { transform: translateY(0) scale(1); opacity: 1; }
.pv-modal.large { max-width: 960px; }
.pv-modal.small { max-width: 420px; }

.pv-modal-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 20px 24px 12px;
  gap: 16px;
}
.pv-modal-title { font-family: "Instrument Serif", serif; font-size: 24px; letter-spacing: -0.02em; color: #e5e2e3; }
.pv-modal-sub { font-size: 13px; color: #c9c4d8; margin-top: 4px; }
.pv-modal-close {
  background: transparent; border: 0; color: #c9c4d8;
  width: 36px; height: 36px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 150ms;
}
.pv-modal-close:hover { background: rgba(255,255,255,0.06); color: #e5e2e3; }

.pv-modal-body { padding: 12px 24px 24px; overflow-y: auto; flex: 1; }
.pv-modal-footer {
  padding: 16px 24px;
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  border-top: 1px solid rgba(255,255,255,0.05);
  background: #1c1b1c;
}
.pv-modal-footer.between { justify-content: space-between; }

/* Mobile modal/drawer rules moved to _base.html mobile foundation block */

/* ── Drawer ───────────────────────────────────────────────────── */
.pv-drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(8, 7, 11, 0.55);
  backdrop-filter: blur(4px);
  z-index: 70;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease-out;
}
.pv-drawer-backdrop.open { opacity: 1; pointer-events: auto; }

.pv-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 460px; max-width: 92vw;
  background: #1c1b1c;
  box-shadow: -20px 0 40px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(255,255,255,0.06);
  z-index: 75;
  transform: translateX(100%);
  transition: transform 240ms cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; flex-direction: column;
}
.pv-drawer.open { transform: translateX(0); }
.pv-drawer.wide { width: 720px; }

.pv-drawer-header {
  padding: 22px 24px 14px;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.pv-drawer-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
.pv-drawer-footer {
  padding: 16px 24px;
  display: flex; gap: 10px; justify-content: flex-end;
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* ── Toast ───────────────────────────────────────────────────── */
.pv-toast-root {
  position: fixed; top: 24px; right: 24px;
  z-index: 100;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.pv-toast {
  background: #2a2a2b;
  color: #e5e2e3;
  padding: 12px 18px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(255,255,255,0.06);
  display: flex; align-items: center; gap: 10px;
  font-size: 14px;
  min-width: 240px; max-width: 420px;
  pointer-events: auto;
  transform: translateX(420px);
  opacity: 0;
  transition: transform 220ms ease-out, opacity 200ms ease-out;
}
.pv-toast.show { transform: translateX(0); opacity: 1; }
.pv-toast.success { border-left: 3px solid #4ade80; }
.pv-toast.error { border-left: 3px solid #ffb4ab; }
.pv-toast.info { border-left: 3px solid #5de6ff; }
.pv-toast .icon { font-size: 18px; }
.pv-toast.success .icon { color: #86efac; }
.pv-toast.error .icon { color: #ffb4ab; }
.pv-toast.info .icon { color: #5de6ff; }

@media (max-width: 768px) {
  .pv-toast { min-width: 0; }
}

/* ── Tabs ───────────────────────────────────────────────────── */
.pv-tabs {
  display: flex; gap: 4px;
  background: #1c1b1c;
  padding: 4px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
  overflow-x: auto;
}
.pv-tab {
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px; color: #c9c4d8;
  cursor: pointer;
  white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
  background: transparent; border: 0;
  transition: background 150ms, color 150ms;
}
.pv-tab:hover { color: #e5e2e3; background: rgba(255,255,255,0.03); }
.pv-tab.active { background: #2a2a2b; color: #cabeff; }
.pv-tab .icon { font-size: 16px; }

.pv-tab-panel { display: none; }
.pv-tab-panel.active { display: block; }

/* ── Segmented control ──────────────────────────────────────── */
.pv-segmented {
  display: inline-flex;
  background: #1c1b1c;
  border-radius: 12px;
  padding: 3px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
  gap: 2px;
}
.pv-seg {
  padding: 7px 14px; border-radius: 9px;
  font-size: 13px; color: #c9c4d8;
  background: transparent; border: 0; cursor: pointer;
  transition: background 150ms, color 150ms;
  white-space: nowrap;
}
.pv-seg:hover { color: #e5e2e3; }
.pv-seg.active { background: #2a2a2b; color: #cabeff; box-shadow: inset 0 0 0 1px rgba(202,190,255,0.18); }

/* ── Switch (toggle) ────────────────────────────────────────── */
.pv-switch {
  position: relative;
  width: 40px; height: 22px;
  background: #353436;
  border-radius: 999px;
  cursor: pointer;
  transition: background 180ms;
  flex-shrink: 0;
}
.pv-switch::after {
  content: "";
  position: absolute; left: 3px; top: 3px;
  width: 16px; height: 16px;
  background: #e5e2e3; border-radius: 50%;
  transition: transform 180ms ease-out;
}
.pv-switch.on { background: #947dff; }
.pv-switch.on::after { transform: translateX(18px); }

/* ── Buttons (extending base.html .btn) ─────────────────────── */
.pv-btn-primary {
  background: linear-gradient(135deg, #7C5CFF 0%, #22D3EE 100%);
  color: white;
  padding: 10px 18px; border-radius: 12px;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; border: 0; cursor: pointer;
  transition: transform 150ms, box-shadow 150ms;
}
.pv-btn-primary:hover { transform: scale(1.02); box-shadow: 0 0 30px rgba(202,190,255,0.25); }
.pv-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.pv-btn-secondary {
  background: #2a2a2b; color: #e5e2e3;
  padding: 10px 16px; border-radius: 12px;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; border: 0; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
  transition: background 150ms;
}
.pv-btn-secondary:hover { background: #353436; }

.pv-btn-ghost {
  background: transparent; color: #c9c4d8;
  padding: 8px 14px; border-radius: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; border: 0; cursor: pointer;
  transition: background 150ms, color 150ms;
}
.pv-btn-ghost:hover { background: rgba(255,255,255,0.04); color: #e5e2e3; }

.pv-btn-danger {
  background: rgba(255,180,171,0.12); color: #ffb4ab;
  padding: 10px 16px; border-radius: 12px;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; border: 0; cursor: pointer;
}
.pv-btn-danger:hover { background: rgba(255,180,171,0.18); }

.pv-btn-icon {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: #c9c4d8;
  border: 0; border-radius: 10px; cursor: pointer;
  transition: background 150ms, color 150ms;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(202,190,255,0.2);
}
.pv-btn-icon:hover { background: rgba(255,255,255,0.06); color: #e5e2e3; }
.pv-btn-icon:active { background: rgba(255,255,255,0.10); }
@media (hover: none) and (pointer: coarse) {
  .pv-btn-icon { width: 44px; height: 44px; }
}

/* loading state */
.pv-btn-loading { position: relative; pointer-events: none; opacity: 0.7; }
.pv-btn-loading::after {
  content: ""; position: absolute; right: 14px; top: 50%;
  width: 14px; height: 14px; margin-top: -7px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: pv-spin 700ms linear infinite;
}
@keyframes pv-spin { to { transform: rotate(360deg); } }

/* ── Form elements ──────────────────────────────────────────── */
.pv-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.pv-label { font-size: 12px; color: #c9c4d8; letter-spacing: -0.01em; }
.pv-help { font-size: 11px; color: #938ea1; margin-top: 4px; }
.pv-error { font-size: 12px; color: #ffb4ab; margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.pv-input.invalid { box-shadow: inset 0 0 0 1px rgba(255,180,171,0.5) !important; }

.pv-counter { font-size: 11px; color: #938ea1; text-align: right; margin-top: 4px; }
.pv-counter.warn { color: #ffd6a8; }
.pv-counter.error { color: #ffb4ab; }

/* ── Badges & chips ─────────────────────────────────────────── */
.pv-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 10.5px; letter-spacing: 0.02em; text-transform: uppercase;
  background: rgba(255,255,255,0.06); color: #c9c4d8;
}
.pv-badge.success { background: rgba(74,222,128,0.14); color: #86efac; }
.pv-badge.warn { background: rgba(255,214,168,0.14); color: #ffd6a8; }
.pv-badge.danger { background: rgba(255,180,171,0.14); color: #ffb4ab; }
.pv-badge.primary { background: rgba(202,190,255,0.14); color: #cabeff; }
.pv-badge.info { background: rgba(93,230,255,0.14); color: #5de6ff; }
.pv-badge.dot::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; flex-shrink: 0;
}

/* ── Dropdown / context menu ────────────────────────────────── */
.pv-menu {
  position: absolute;
  background: #2a2a2b;
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(255,255,255,0.06);
  min-width: 200px;
  z-index: 60;
  transform: translateY(-4px) scale(0.98);
  opacity: 0; pointer-events: none;
  transition: transform 160ms ease-out, opacity 140ms;
}
.pv-menu.open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
.pv-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 9px;
  font-size: 13px; color: #e5e2e3;
  cursor: pointer; user-select: none;
  background: transparent; border: 0; width: 100%; text-align: left;
}
.pv-menu-item:hover { background: rgba(255,255,255,0.06); }
.pv-menu-item.danger { color: #ffb4ab; }
.pv-menu-item.danger:hover { background: rgba(255,180,171,0.10); }
.pv-menu-divider { height: 1px; background: rgba(255,255,255,0.05); margin: 4px 0; }

/* ── Empty state ───────────────────────────────────────────── */
.pv-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 64px 24px;
  text-align: center;
  background: #1c1b1c;
  border-radius: 24px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
.pv-empty .icon {
  font-size: 48px;
  color: #484555;
  margin-bottom: 12px;
}
.pv-empty-title { font-family: "Instrument Serif", serif; font-size: 22px; color: #e5e2e3; }
.pv-empty-text { color: #938ea1; margin-top: 6px; max-width: 360px; font-size: 14px; }

/* ── Skeleton loaders ──────────────────────────────────────── */
.pv-skeleton {
  background: linear-gradient(90deg, #1c1b1c 0%, #2a2a2b 50%, #1c1b1c 100%);
  background-size: 200% 100%;
  animation: pv-shimmer 1.4s ease-in-out infinite;
  border-radius: 8px;
}
@keyframes pv-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Filter pills ──────────────────────────────────────────── */
.pv-pill-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pv-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #1c1b1c;
  color: #c9c4d8;
  font-size: 13px;
  cursor: pointer;
  border: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
  transition: background 150ms, color 150ms, box-shadow 150ms;
}
.pv-pill:hover { color: #e5e2e3; background: #2a2a2b; }
.pv-pill.active { background: rgba(202,190,255,0.10); color: #cabeff; box-shadow: inset 0 0 0 1px rgba(202,190,255,0.30); }
.pv-pill .pv-pill-count { background: rgba(255,255,255,0.08); padding: 1px 7px; border-radius: 999px; font-size: 11px; }

/* ── Table ─────────────────────────────────────────────────── */
.pv-table { width: 100%; border-collapse: collapse; }
.pv-table th, .pv-table td {
  padding: 12px 14px;
  text-align: left;
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.pv-table th { color: #938ea1; font-weight: 500; text-transform: uppercase; font-size: 11px; letter-spacing: 0.04em; }
.pv-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ── Card (extending bento) ────────────────────────────────── */
.pv-card-stack { display: flex; flex-direction: column; gap: 12px; }
.pv-card-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; background: #1c1b1c; border-radius: 14px; }

/* ── Progress bar ──────────────────────────────────────────── */
.pv-progress {
  width: 100%; height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
}
.pv-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7C5CFF 0%, #22D3EE 100%);
  border-radius: 999px;
  transition: width 300ms ease-out;
}

/* ── Lightbox ──────────────────────────────────────────────── */
.pv-lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 90;
  display: flex; align-items: center; justify-content: center;
  padding: 32px;
  opacity: 0; pointer-events: none;
  transition: opacity 200ms;
}
.pv-lightbox.open { opacity: 1; pointer-events: auto; }
.pv-lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; }
.pv-lightbox-close {
  position: absolute; top: 24px; right: 24px;
  background: rgba(255,255,255,0.08); color: white;
  width: 44px; height: 44px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  border: 0; cursor: pointer;
}

/* Mobile sidebar handled in _base.html (mobile foundation block) */

/* ── Utility ───────────────────────────────────────────────── */
.pv-hide { display: none !important; }
.pv-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
.pv-grid-auto { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

@media (max-width: 1280px) { .pv-grid-auto { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } }
@media (max-width: 768px) { .pv-grid-auto { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; } }

/* focus visibility */
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid rgba(93,230,255,0.55);
  outline-offset: 2px;
}

/* Touch-friendly: on devices without hover, force hover-revealed action
   buttons inside .video-card to stay visible so mobile users can tap them. */
@media (hover: none) {
  .video-card .group-hover\:opacity-100 { opacity: 1 !important; }
}

/* ── Tooltip ───────────────────────────────────────────────── */
.pv-tooltip {
  position: fixed;
  top: 0; left: 0;
  z-index: 110;
  display: none;
  pointer-events: none;
  opacity: 0;
  max-width: 280px;
  font-family: "Inter Tight", Inter, sans-serif;
  color: rgba(229, 226, 227, 0.95);
  background: rgba(28, 27, 28, 0.95);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border-radius: 8px;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.45),
    0 2px 6px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  transition: opacity 100ms ease-out, transform 150ms ease-out;
  transform: translateY(2px) scale(0.98);
  will-change: opacity, transform;
}
.pv-tooltip.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 150ms ease-out, transform 150ms ease-out;
}
.pv-tooltip::before {
  /* Subtle violet/cyan gradient border at low opacity */
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.45) 0%, rgba(34, 211, 238, 0.35) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  opacity: 0.55;
}
.pv-tooltip-inner {
  position: relative;
  padding: 8px 12px;
}
.pv-tooltip.expanded .pv-tooltip-inner { padding: 12px 16px; }
.pv-tooltip-title {
  font-family: "Instrument Serif", serif;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: #e5e2e3;
  margin: 0 0 4px;
  line-height: 1.2;
}
.pv-tooltip-desc {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(229, 226, 227, 0.92);
  margin: 0;
  white-space: normal;
  word-wrap: break-word;
}
.pv-tooltip.compact .pv-tooltip-desc { font-size: 13px; line-height: 1.3; }

/* Arrow */
.pv-tooltip-arrow {
  position: absolute;
  width: 12px; height: 12px;
  background: rgba(28, 27, 28, 0.95);
  transform: rotate(45deg);
  pointer-events: none;
  border-radius: 2px;
}
.pv-tooltip[data-position="top"] .pv-tooltip-arrow {
  bottom: -4px;
  border-right: 1px solid rgba(34, 211, 238, 0.18);
  border-bottom: 1px solid rgba(34, 211, 238, 0.18);
}
.pv-tooltip[data-position="bottom"] .pv-tooltip-arrow {
  top: -4px;
  border-left: 1px solid rgba(124, 92, 255, 0.22);
  border-top: 1px solid rgba(124, 92, 255, 0.22);
}
.pv-tooltip[data-position="left"] .pv-tooltip-arrow {
  right: -4px;
  border-right: 1px solid rgba(34, 211, 238, 0.18);
  border-top: 1px solid rgba(124, 92, 255, 0.22);
}
.pv-tooltip[data-position="right"] .pv-tooltip-arrow {
  left: -4px;
  border-left: 1px solid rgba(124, 92, 255, 0.22);
  border-bottom: 1px solid rgba(34, 211, 238, 0.18);
}

/* Helper info icon (replaces inline helper text) */
.pv-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  border-radius: 999px;
  background: transparent;
  color: #938ea1;
  border: 0;
  cursor: help;
  vertical-align: middle;
  margin-left: 6px;
  transition: color 150ms, background 150ms;
}
.pv-info-icon:hover, .pv-info-icon:focus-visible {
  color: #cabeff;
  background: rgba(202, 190, 255, 0.10);
}
.pv-info-icon .icon { font-size: 14px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .pv-tooltip { transition: opacity 80ms linear; transform: none !important; }
}

/* Mobile: anchor near top of screen on small viewports for long text */
@media (max-width: 480px) {
  .pv-tooltip { max-width: calc(100vw - 24px); }
}

/* ── Touch-target compliance (iOS HIG / Material) ───────────────────────
   On touch devices, every interactive element must be at least 44x44 CSS
   pixels. This block bumps padding / min-height / min-width on touch only
   so desktop hover layouts stay compact. Triggered by Playwright
   touch-targets.spec.ts running on iphone-13 + pixel-5 viewports. */
@media (hover: none) and (pointer: coarse) {
  /* All button variants: ensure 44px minimum on both axes. */
  .pv-btn-primary,
  .pv-btn-secondary,
  .pv-btn-danger,
  .pv-btn-ghost {
    min-height: 44px;
    min-width: 44px;
    padding-top: 11px;
    padding-bottom: 11px;
  }

  /* Icon-only mobile buttons (.pv-mobile-hide-label hides text labels via
     _base.html). They render as 40x44; bump to 44x44 here. The
     `min-width: 44px` plus `justify-content: center` keeps the icon
     centered after the bump. */
  .pv-btn-primary.pv-mobile-hide-label,
  .pv-btn-secondary.pv-mobile-hide-label,
  .pv-btn-ghost.pv-mobile-hide-label,
  .pv-btn-danger.pv-mobile-hide-label,
  a.pv-btn-ghost.pv-mobile-hide-label,
  a.pv-btn-secondary.pv-mobile-hide-label {
    min-width: 44px;
    min-height: 44px;
    padding: 10px !important;
    justify-content: center;
  }

  /* Legacy .btn / .btn-secondary / .gradient-cta (used on dashboard,
     billing, and elsewhere outside the .pv-btn-* family). */
  .btn,
  a.btn,
  button.btn,
  .gradient-cta {
    min-height: 44px;
    padding-top: 11px;
    padding-bottom: 11px;
  }

  /* Text/search inputs and selects: 44px tall hit-area. font-size: 16px
     is already set globally to prevent iOS zoom-on-focus. */
  input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  textarea,
  select {
    min-height: 44px;
    padding-top: 11px;
    padding-bottom: 11px;
  }

  /* Filter pills */
  .pv-pill {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  /* Tabs and segmented controls */
  .pv-tab,
  .pv-seg {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  /* Switch toggle: keep the visible 40x22 track look but expand the
     interactive box to 44x44 by reusing the existing element as a
     transparent flex container, painting the track on ::before and
     keeping the thumb on ::after. */
  .pv-switch {
    width: 44px;
    height: 44px;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 2px;
  }
  .pv-switch::before {
    content: "";
    position: absolute;
    left: 2px; top: 50%;
    transform: translateY(-50%);
    width: 40px; height: 22px;
    background: #353436;
    border-radius: 999px;
    transition: background 180ms;
  }
  .pv-switch.on::before { background: #947dff; }
  .pv-switch::after {
    /* Re-anchor the thumb relative to the visible track (left:2px) plus
       3px inset, total left: 5px from the .pv-switch box. */
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
  }
  .pv-switch.on::after {
    transform: translateY(-50%) translateX(18px);
  }

  /* Inline text-link affordances inside cards (e.g. dashboard "All videos →",
     "Manage All →"). Keep the visual size, expand hit area with padding
     so getBoundingClientRect returns >=44 height. */
  a.text-primary.text-xs,
  .bento a.text-primary,
  .bento-high a.text-primary {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 12px 0;
  }

  /* Login screen helper links (#forgot, #signup) need a hit area too. The
     visual remains the same since padding is invisible on transparent
     backgrounds. */
  a#forgot,
  a#signup {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 12px 4px;
  }

  /* Dev-only fill button on login page. */
  button#dev-fill {
    min-height: 44px;
    padding-top: 11px !important;
    padding-bottom: 11px !important;
  }

  /* Automation page: trailing "view error" link inside table cell. */
  td a[href="/preview/errors"] {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 12px 0;
  }

  /* Sidebar toggle hamburger lives in the header on mobile. The base
     foundation block in _base.html already sets it to 44x44 via
     `main.pv-main > header .pv-sidebar-toggle`. The _demo page renders
     outside that selector path (no main.pv-main wrapper in some layouts);
     enforce 44x44 globally on touch. */
  .pv-sidebar-toggle.pv-btn-icon,
  .pv-sidebar-toggle {
    width: 44px !important;
    height: 44px !important;
  }
}

