/* PragHowTo: Obsidian In-Product Guidance & Live Spotlight Stylesheet */

:root {
  --howto-bg-scrim: rgba(3, 3, 8, 0.75);
  --howto-surface-card: #0e1015;
  --howto-surface-elevated: #161822;
  --howto-border-subtle: rgba(255, 255, 255, 0.08);
  --howto-border-focus: rgba(255, 255, 255, 0.22);
  --howto-catchlight: inset 0 1px 0 0 rgba(255, 255, 255, 0.12);
  --howto-text-primary: #ffffff;
  --howto-text-secondary: #9496a1;
  --howto-text-muted: #646675;
  --howto-beacon-accent: #38bdf8;
}

/* Modal Overlay & Scrim */
.prag-howto-overlay {
  position: fixed;
  inset: 0;
  z-index: 99990;
  background: var(--howto-bg-scrim);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.prag-howto-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* Search Modal Card */
.prag-howto-modal {
  width: 620px;
  background: var(--howto-surface-card);
  border: 1px solid var(--howto-border-subtle);
  border-radius: 12px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.85), var(--howto-catchlight);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Search Header Input */
.prag-howto-searchbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--howto-border-subtle);
}

.prag-howto-searchbar input {
  flex: 1;
  background: transparent;
}

.prag-howto-mic-btn {
  background: transparent;
  border: 1px solid var(--howto-border-subtle);
  border-radius: 6px;
  color: var(--howto-text-secondary);
  padding: 5px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.prag-howto-mic-btn:hover {
  background: var(--howto-surface-elevated);
  color: var(--howto-text-primary);
  border-color: var(--howto-border-focus);
}

.prag-howto-mic-btn.is-recording {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
  animation: pulse-recording 1.2s infinite;
}

@keyframes pulse-recording {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.8; }
}

.btn-watch-sync {
  border-color: rgba(56, 189, 248, 0.3) !important;
  color: #38bdf8 !important;
}

.btn-watch-sync:hover {
  background: rgba(56, 189, 248, 0.12) !important;
}
  border: none;
  color: var(--howto-text-primary);
  font-size: 16px;
  font-family: inherit;
  outline: none;
}

.prag-howto-searchbar input::placeholder {
  color: var(--howto-text-muted);
}

.prag-howto-searchbar kbd {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--howto-border-subtle);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  color: var(--howto-text-muted);
  font-family: ui-monospace, monospace;
}

/* Results List */
.prag-howto-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 8px;
}

.prag-howto-item {
  padding: 12px 14px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.prag-howto-item:hover,
.prag-howto-item.is-selected {
  background: var(--howto-surface-elevated);
  border-color: var(--howto-border-subtle);
}

.prag-howto-item-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prag-howto-item-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--howto-text-primary);
}

.prag-howto-item-desc {
  font-size: 12px;
  color: var(--howto-text-secondary);
}

.prag-howto-item-actions {
  display: flex;
  gap: 8px;
}

.prag-howto-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--howto-border-subtle);
  border-radius: 6px;
  color: var(--howto-text-primary);
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease;
}

.prag-howto-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* On-Demand Demystifier */
.prag-howto-demystifier {
  background: rgba(20, 24, 34, 0.5);
  border-top: 1px solid var(--howto-border-subtle);
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prag-howto-demystifier-trigger {
  font-size: 11px;
  color: var(--howto-text-muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prag-howto-demystifier-content {
  font-size: 12px;
  line-height: 1.45;
  color: #cbd5e1;
  display: none;
}

.prag-howto-demystifier.is-open .prag-howto-demystifier-content {
  display: block;
}

/* Live Element Spotlight Mask & Beacon */
.prag-spotlight-scrim {
  position: fixed;
  inset: 0;
  z-index: 99995;
  background: rgba(3, 3, 8, 0.65);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.prag-spotlight-scrim.is-active {
  opacity: 1;
  pointer-events: auto;
}

.prag-spotlight-beacon {
  position: fixed;
  z-index: 99999;
  background: var(--howto-surface-card);
  border: 1px solid var(--howto-border-focus);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.9), var(--howto-catchlight);
  padding: 10px 16px;
  font-size: 13px;
  color: var(--howto-text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: beaconPulse 2s infinite ease-in-out;
}

@keyframes beaconPulse {
  0%, 100% { box-shadow: 0 0 16px rgba(56, 189, 248, 0.15), var(--howto-catchlight); }
  50% { box-shadow: 0 0 24px rgba(56, 189, 248, 0.35), var(--howto-catchlight); }
}

/* Floating Micro-Video Player */
.prag-floating-player {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 420px;
  z-index: 99998;
  background: var(--howto-surface-card);
  border: 1px solid var(--howto-border-subtle);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), var(--howto-catchlight);
  overflow: hidden;
  display: none;
}

.prag-floating-player.is-visible {
  display: flex;
  flex-direction: column;
}

.prag-floating-player-header {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--howto-border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--howto-text-primary);
}

.prag-floating-player video {
  width: 100%;
  height: 236px;
  background: #000;
  display: block;
}
