/* ===============================================
   Nnubia AI — Movies Copilot Styles
   Uses the movies page CSS variables for theme parity.
   Inherits --primary-bg, --text-primary, --text-secondary,
   --accent-red from movies-new.css root.
   =============================================== */

/* Day mode defaults */
.movies-page-wrapper,
.mv-ai-drawer,
.mv-ai-overlay,
.mv-ai-notif-panel,
.mv-voice-modal {
  --mv-ai-bg: var(--primary-bg, #ffffff);
  --mv-ai-surface: rgba(0,0,0,0.03);
  --mv-ai-surface2: rgba(0,0,0,0.06);
  --mv-ai-border: rgba(0,0,0,0.1);
  --mv-ai-text: var(--text-primary, #1a1a1a);
  --mv-ai-text-dim: var(--text-secondary, #555);
  --mv-ai-accent: var(--accent-red, #e50914);
  --mv-ai-accent-glow: rgba(15,23,42,0.08);
  --mv-ai-radius: 12px;
  --mv-ai-drawer-shell: linear-gradient(180deg, #ffffff 0%, #f4f4f5 100%);
  --mv-ai-drawer-body-bg: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.96) 100%);
  --mv-ai-drawer-chrome-bg: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(244,244,245,0.93) 100%);
  --mv-ai-drawer-shadow: -18px 0 42px rgba(15, 23, 42, 0.16), -1px 0 0 rgba(229, 9, 20, 0.08);
  --mv-ai-drawer-highlight: inset 1px 0 0 rgba(255,255,255,0.8), inset 0 1px 0 rgba(255,255,255,0.58);
  --mv-ai-drawer-glow: radial-gradient(circle at top right, rgba(229, 9, 20, 0.1) 0%, rgba(229, 9, 20, 0.03) 24%, rgba(255,255,255,0) 54%);
  --mv-ai-panel-bg: rgba(255,255,255,0.98);
  --mv-ai-user-bg: rgba(229,9,20,0.06);
  --mv-ai-bot-msg-bg: linear-gradient(180deg, rgba(255,255,255,0.92) 0%, rgba(248,250,252,0.98) 100%);
  --mv-ai-bot-msg-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  --mv-ai-user-msg-bg: linear-gradient(135deg, #e50914 0%, #b91c1c 100%);
  --mv-ai-user-msg-shadow: 0 12px 26px rgba(229, 9, 20, 0.22);
  --mv-ai-source-card-bg: rgba(255,255,255,0.92);
  --mv-ai-source-card-hover-bg: rgba(255,245,245,0.98);
  --mv-ai-toolbar-icon: rgba(220, 38, 38, 0.45);
  --mv-ai-toolbar-icon-focus: rgba(220, 38, 38, 0.72);
  --mv-ai-toolbar-icon-shadow: 0 0 3px rgba(220, 38, 38, 0.22);
  --mv-ai-toolbar-icon-shadow-focus: 0 0 5px rgba(220, 38, 38, 0.28);
  --mv-ai-toolbar-input-color: rgba(26, 26, 26, 0.9);
  --mv-ai-toolbar-input-bg: rgba(220, 38, 38, 0.03);
  --mv-ai-toolbar-input-border: rgba(220, 38, 38, 0.25);
  --mv-ai-toolbar-input-shadow: 0 0 4px rgba(220, 38, 38, 0.12), 0 0 8px rgba(220, 38, 38, 0.06), inset 0 0 4px rgba(220, 38, 38, 0.04);
  --mv-ai-toolbar-input-focus-border: rgba(220, 38, 38, 0.48);
  --mv-ai-toolbar-input-focus-bg: rgba(220, 38, 38, 0.05);
  --mv-ai-toolbar-input-focus-shadow: 0 0 8px rgba(220, 38, 38, 0.18), 0 0 18px rgba(220, 38, 38, 0.1), inset 0 0 8px rgba(220, 38, 38, 0.05);
  --mv-ai-toolbar-placeholder: rgba(220, 38, 38, 0.38);
  --mv-ai-toolbar-placeholder-shadow: none;
  --mv-ai-toolbar-clear-bg: rgba(0, 0, 0, 0.06);
  --mv-ai-toolbar-clear-bg-hover: rgba(0, 0, 0, 0.1);
  --mv-ai-toolbar-action-bg: transparent;
  --mv-ai-toolbar-action-color: #71717a;
  --mv-ai-toolbar-action-hover-bg: #f4f4f5;
  --mv-ai-toolbar-action-hover-color: #111827;
  --mv-ai-toolbar-bell-color: #b91c1c;
  --mv-ai-toolbar-bell-color-hover: #991b1b;
  --mv-ai-toolbar-bell-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
  --mv-ai-toolbar-bell-shadow-hover: 0 6px 14px rgba(15, 23, 42, 0.18);
  --mv-voice-overlay: rgba(15, 23, 42, 0.36);
  --mv-voice-panel-bg: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(244,244,245,0.96) 100%);
  --mv-voice-panel-shadow: 0 28px 64px -18px rgba(15, 23, 42, 0.35);
  --mv-voice-transcript-bg: rgba(15, 23, 42, 0.045);
  --mv-voice-response-bg: rgba(229, 9, 20, 0.08);
  --mv-voice-response-border: rgba(229, 9, 20, 0.18);
  --mv-voice-chip-bg: rgba(255,255,255,0.72);
  --mv-voice-chip-hover-bg: rgba(229, 9, 20, 0.08);
}

/* Dark mode overrides */
body.theme-dark .movies-page-wrapper,
body.theme-dark .mv-ai-drawer,
body.theme-dark .mv-ai-overlay,
body.theme-dark .mv-ai-notif-panel,
body.theme-dark [data-mv-theme="night"],
body.night_mode_body .movies-page-wrapper,
body.night_mode_body .mv-ai-drawer,
body.night_mode_body .mv-ai-overlay,
body.night_mode_body .mv-ai-notif-panel,
body.night_mode_body [data-mv-theme="night"],
.night_mode .movies-page-wrapper,
.night_mode .mv-ai-drawer,
.night_mode .mv-ai-overlay,
.night_mode .mv-ai-notif-panel,
[data-mv-theme="night"] {
  --mv-ai-bg: var(--primary-bg, #121212);
  --mv-ai-surface: rgba(255,255,255,0.04);
  --mv-ai-surface2: rgba(255,255,255,0.07);
  --mv-ai-border: rgba(255,255,255,0.08);
  --mv-ai-text: rgba(255,255,255,0.88);
  --mv-ai-text-dim: rgba(255,255,255,0.6);
  --mv-ai-accent-glow: rgba(220,38,38,0.18);
  --mv-ai-drawer-shell: linear-gradient(180deg, #171717 0%, #0f0f10 100%);
  --mv-ai-drawer-body-bg: linear-gradient(180deg, rgba(18,18,18,0.98) 0%, rgba(11,11,12,0.99) 100%);
  --mv-ai-drawer-chrome-bg: linear-gradient(180deg, rgba(26,26,27,0.96) 0%, rgba(16,16,17,0.94) 100%);
  --mv-ai-drawer-shadow: -18px 0 44px rgba(0, 0, 0, 0.54), -1px 0 0 rgba(229, 9, 20, 0.16);
  --mv-ai-drawer-highlight: inset 1px 0 0 rgba(255,255,255,0.06), inset 0 1px 0 rgba(255,255,255,0.03);
  --mv-ai-drawer-glow: radial-gradient(circle at top right, rgba(229, 9, 20, 0.18) 0%, rgba(229, 9, 20, 0.08) 26%, rgba(0,0,0,0) 58%);
  --mv-ai-panel-bg: rgba(18,18,18,0.98);
  --mv-ai-user-bg: rgba(229,9,20,0.12);
  --mv-ai-bot-msg-bg: linear-gradient(180deg, rgba(33,33,35,0.94) 0%, rgba(18,18,19,0.98) 100%);
  --mv-ai-bot-msg-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
  --mv-ai-user-msg-bg: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  --mv-ai-user-msg-shadow: 0 14px 30px rgba(127, 29, 29, 0.36);
  --mv-ai-source-card-bg: rgba(27,27,29,0.94);
  --mv-ai-source-card-hover-bg: rgba(40,40,43,0.98);
  --mv-ai-toolbar-icon: rgba(220, 38, 38, 0.45);
  --mv-ai-toolbar-icon-focus: rgba(220, 38, 38, 0.8);
  --mv-ai-toolbar-icon-shadow: 0 0 3px rgba(220, 38, 38, 0.3);
  --mv-ai-toolbar-icon-shadow-focus: 0 0 6px rgba(220, 38, 38, 0.6);
  --mv-ai-toolbar-input-color: rgba(255, 255, 255, 0.85);
  --mv-ai-toolbar-input-bg: rgba(220, 38, 38, 0.03);
  --mv-ai-toolbar-input-border: rgba(220, 38, 38, 0.35);
  --mv-ai-toolbar-input-shadow: 0 0 5px rgba(220, 38, 38, 0.3), 0 0 10px rgba(220, 38, 38, 0.15), inset 0 0 6px rgba(220, 38, 38, 0.06);
  --mv-ai-toolbar-input-focus-border: rgba(220, 38, 38, 0.65);
  --mv-ai-toolbar-input-focus-bg: rgba(220, 38, 38, 0.05);
  --mv-ai-toolbar-input-focus-shadow: 0 0 10px rgba(220, 38, 38, 0.5), 0 0 25px rgba(220, 38, 38, 0.25), 0 0 50px rgba(220, 38, 38, 0.1), inset 0 0 10px rgba(220, 38, 38, 0.08);
  --mv-ai-toolbar-placeholder: rgba(220, 38, 38, 0.4);
  --mv-ai-toolbar-placeholder-shadow: 0 0 6px rgba(220, 38, 38, 0.15);
  --mv-ai-toolbar-clear-bg: rgba(255, 255, 255, 0.1);
  --mv-ai-toolbar-clear-bg-hover: rgba(255, 255, 255, 0.2);
  --mv-ai-toolbar-action-bg: rgba(12, 12, 12, 0.22);
  --mv-ai-toolbar-action-color: #a1a1aa;
  --mv-ai-toolbar-action-hover-bg: rgba(255, 255, 255, 0.08);
  --mv-ai-toolbar-action-hover-color: #ffffff;
  --mv-ai-toolbar-bell-color: #f87171;
  --mv-ai-toolbar-bell-color-hover: #fca5a5;
  --mv-ai-toolbar-bell-shadow: 0 4px 12px rgba(0, 0, 0, 0.34);
  --mv-ai-toolbar-bell-shadow-hover: 0 6px 16px rgba(0, 0, 0, 0.42);
  --mv-voice-overlay: rgba(2, 6, 23, 0.62);
  --mv-voice-panel-bg: linear-gradient(180deg, rgba(23,23,23,0.98) 0%, rgba(10,10,11,0.98) 100%);
  --mv-voice-panel-shadow: 0 28px 70px -20px rgba(0, 0, 0, 0.62);
  --mv-voice-transcript-bg: rgba(255,255,255,0.06);
  --mv-voice-response-bg: rgba(229, 9, 20, 0.12);
  --mv-voice-response-border: rgba(248, 113, 113, 0.26);
  --mv-voice-chip-bg: rgba(18,18,18,0.72);
  --mv-voice-chip-hover-bg: rgba(229, 9, 20, 0.14);
}

/* ── Unified Search + AI Header ─────────────────────────── */
.mv-ai-header-actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 10px auto 6px;
  padding: 0 12px;
}

.mv-ai-toolbar {
  position: relative;
  width: 100%;
  max-width: 430px;
  display: block;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: none;
}

.mv-ai-toolbar:hover,
.mv-ai-toolbar:focus-within {
  border-color: transparent;
  box-shadow: none;
}

body.theme-light .mv-ai-toolbar {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

body.theme-light .mv-ai-toolbar:hover,
body.theme-light .mv-ai-toolbar:focus-within {
  border-color: transparent;
  box-shadow: none;
}

.mv-ai-toolbar .search-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: none;
  margin: 0;
  display: block;
  color: var(--mv-ai-text);
}

.mv-ai-toolbar .search-wrap .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  flex-shrink: 0;
  color: var(--mv-ai-toolbar-icon);
  filter: drop-shadow(var(--mv-ai-toolbar-icon-shadow));
}

.mv-ai-toolbar .search-wrap input#search-movies {
  width: 100%;
  min-width: 0;
  padding: 10px 214px 10px 44px;
  border: 1px solid var(--mv-ai-toolbar-input-border);
  border-radius: 999px;
  background: var(--mv-ai-toolbar-input-bg);
  color: var(--mv-ai-toolbar-input-color);
  box-shadow: var(--mv-ai-toolbar-input-shadow);
  animation: neonPulse 3s ease-in-out infinite;
  outline: none;
}

.mv-ai-toolbar .search-wrap input#search-movies::placeholder {
  color: var(--mv-ai-toolbar-placeholder);
  text-shadow: var(--mv-ai-toolbar-placeholder-shadow);
}

.mv-ai-toolbar .search-wrap input#search-movies:focus {
  border-color: var(--mv-ai-toolbar-input-focus-border);
  background: var(--mv-ai-toolbar-input-focus-bg);
  box-shadow: var(--mv-ai-toolbar-input-focus-shadow);
  animation: none;
}

.mv-ai-toolbar .search-wrap:focus-within .search-icon {
  color: var(--mv-ai-toolbar-icon-focus);
  filter: drop-shadow(var(--mv-ai-toolbar-icon-shadow-focus));
}

.mv-ai-toolbar .search-clear-btn {
  right: 178px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--mv-ai-toolbar-clear-bg);
  color: inherit;
  opacity: 0.7;
}

.mv-ai-toolbar .search-clear-btn:hover,
.mv-ai-toolbar .search-clear-btn:active {
  background: var(--mv-ai-toolbar-clear-bg-hover);
  color: inherit;
}

.mv-ai-toolbar-actions {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 0;
  flex-shrink: 0;
  border-left: none;
  z-index: 4;
}

body.theme-light .mv-ai-toolbar-actions {
  border-left-color: transparent;
}

.mv-ai-toolbar-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border: none;
  border-radius: 999px;
  background: var(--mv-ai-toolbar-action-bg);
  color: var(--mv-ai-toolbar-action-color);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(6px);
}

.mv-ai-toolbar-action svg {
  display: block;
  flex-shrink: 0;
}

.mv-ai-toolbar-action:hover,
.mv-ai-toolbar-action:focus-visible {
  background: var(--mv-ai-toolbar-action-hover-bg);
  color: var(--mv-ai-toolbar-action-hover-color);
  outline: none;
}

body.theme-light .mv-ai-toolbar-action:not(.mv-ai-toolbar-action-primary) {
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#mv-bellBtn {
  background: transparent;
  color: var(--mv-ai-toolbar-bell-color);
  box-shadow: none;
  backdrop-filter: none;
}

#mv-bellBtn:hover,
#mv-bellBtn:focus-visible {
  background: transparent;
  color: var(--mv-ai-toolbar-bell-color-hover);
  box-shadow: var(--mv-ai-toolbar-bell-shadow-hover);
}

.mv-ai-toolbar-action-primary {
  padding: 0 16px;
  background: var(--mv-ai-accent);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(229, 9, 20, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.mv-ai-toolbar-action-primary:hover,
.mv-ai-toolbar-action-primary:focus-visible {
  background: #c8102e;
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(229, 9, 20, 0.28);
}

body.theme-light .mv-ai-toolbar-action-primary {
  background: var(--mv-ai-accent);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(229, 9, 20, 0.16);
}

body.theme-light .mv-ai-toolbar-action-primary:hover,
body.theme-light .mv-ai-toolbar-action-primary:focus-visible {
  background: #c8102e;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(229, 9, 20, 0.2);
}

.mv-ai-toolbar-action-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.mv-ai-toolbar-action.is-listening {
  background: rgba(220, 38, 38, 0.14);
  color: #fca5a5;
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.2);
}

body.theme-light .mv-ai-toolbar-action.is-listening {
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.12);
}

.mv-ai-badge-dot {
  display: none !important;
}

@media (max-width: 680px) {
  .mv-voice-modal {
    align-items: flex-end;
    justify-content: center;
    padding: 12px;
  }

  .mv-voice-panel {
    width: min(100%, 430px);
    max-height: calc(100vh - 24px);
    padding: 16px 14px 14px;
    border-radius: 22px;
  }

  .mv-voice-settings {
    grid-template-columns: 1fr;
  }

  .mv-voice-chip-row {
    grid-template-columns: 1fr;
  }

  .mv-ai-header-actions {
    margin-top: 8px;
    padding: 0 10px;
  }

  .mv-ai-toolbar {
    max-width: 340px;
  }

  .mv-ai-toolbar .search-wrap {
    max-width: none;
    flex-basis: auto;
  }

  .mv-ai-toolbar .search-wrap input#search-movies {
    padding-right: 132px;
  }

  .mv-ai-toolbar .search-clear-btn {
    right: 96px;
  }

  .mv-ai-toolbar-action {
    height: 38px;
  }

  .mv-ai-toolbar-action-primary {
    width: 38px;
    padding: 0;
  }

  .mv-ai-toolbar-action-label {
    display: none;
  }
}

@media (max-width: 560px) {
  .mv-voice-title strong {
    font-size: 16px;
  }

  .mv-voice-state-label,
  .mv-voice-text {
    font-size: 14px;
  }

  .mv-ai-toolbar {
    max-width: 260px;
  }

  .mv-ai-toolbar .search-wrap {
    max-width: none;
    flex-basis: auto;
  }

  .mv-ai-toolbar .search-wrap input#search-movies {
    font-size: 12px;
    padding: 7px 120px 7px 36px;
  }

  .mv-ai-toolbar .search-wrap .search-icon {
    left: 14px;
  }

  .mv-ai-toolbar .search-clear-btn {
    right: 92px;
    width: 24px;
    height: 24px;
  }

  .mv-ai-toolbar-actions {
    gap: 4px;
    right: 6px;
  }

  .mv-ai-toolbar-action {
    width: 38px;
    height: 38px;
    padding: 0;
  }

  .mv-ai-toolbar-action-label {
    display: none;
  }
}

/* ── Floating Ask Nnubia pill (Manus-style glow + bubble) ─ */
/* Site-wide Nnubia owns the corner — hide the Movies-only FAB. */
body.nb-global-mounted .mv-ai-fab,
body.nb-global-mounted #mv-aiFab,
body:has(#nbGlobalRoot) .mv-ai-fab,
body:has(#nbGlobalRoot) #mv-aiFab {
  display: none !important;
}

@keyframes mvAiFabFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes mvAiFabPulseRing {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.6); opacity: 0; }
}

.mv-ai-fab {
  --mv-ai-fab-red: #e40d0d;
  --mv-ai-fab-red-deep: #8b0000;
  position: fixed;
  /* Clear the right chat/friends rail; JS sets --mv-ai-fab-clearance from .chat-container width. */
  right: max(var(--fab-edge, 24px), env(safe-area-inset-right, 0px), var(--mv-ai-fab-clearance, 114px));
  bottom: var(--fab-bottom, max(28px, calc(env(safe-area-inset-bottom, 0px) + 24px)));
  z-index: 9400;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--mv-ai-fab-red) 0%, var(--mv-ai-fab-red-deep) 100%);
  color: #fff;
  box-shadow: 0 8px 32px rgba(228, 13, 13, 0.4);
  overflow: visible;
  isolation: isolate;
  animation: mvAiFabFloat 3s ease-in-out infinite;
  transition: box-shadow 0.3s ease, opacity 0.18s ease, filter 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}

.mv-ai-fab.is-dragging {
  animation: none;
  transition: none;
  z-index: 9600;
  cursor: grabbing;
  opacity: 0.95;
  filter: brightness(1.05);
  touch-action: none;
}

.mv-ai-fab.is-custom-pos {
  bottom: auto !important;
  right: auto !important;
  animation: none;
}

.mv-ai-fab:hover {
  box-shadow: 0 10px 40px rgba(228, 13, 13, 0.55);
  filter: brightness(1.05);
}

.mv-ai-fab-pulse {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(228, 13, 13, 0.4);
  animation: mvAiFabPulseRing 1.5s ease-out infinite;
  pointer-events: none;
  z-index: 0;
}

.mv-ai-fab.is-hidden,
body.mv-drawer-open .mv-ai-fab,
body.mv-voice-open .mv-ai-fab {
  opacity: 0;
  pointer-events: none;
  animation: none;
  transform: translateY(8px) scale(0.96);
  filter: none;
}

.mv-ai-fab-main,
.mv-ai-fab-mic {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

.mv-ai-fab-main {
  padding: 12px 4px 12px 16px;
}

.mv-ai-fab-mic {
  padding: 12px 16px 12px 4px;
  opacity: 0.88;
}

.mv-ai-fab-menu {
  padding: 12px 2px;
  opacity: 0.9;
}

.mv-ai-fab-main:hover,
.mv-ai-fab-main:focus-visible,
.mv-ai-fab-mic:hover,
.mv-ai-fab-mic:focus-visible {
  outline: none;
  opacity: 1;
}

.mv-ai-fab-label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  line-height: 1;
}

.mv-ai-fab-spark,
.mv-ai-fab-mic svg {
  display: block;
  flex-shrink: 0;
}

@media (max-width: 991px) {
  .mv-ai-fab {
    /* Chat rail usually hidden on smaller breakpoints */
    right: max(var(--fab-edge, 16px), env(safe-area-inset-right, 0px));
    bottom: var(--fab-bottom, max(24px, calc(env(safe-area-inset-bottom, 0px) + 20px)));
  }
}

@media (max-width: 720px) {
  .mv-ai-fab-main {
    padding: 10px 2px 10px 14px;
  }

  .mv-ai-fab-label {
    font-size: 13px;
  }

  .mv-ai-fab-mic {
    padding: 10px 14px 10px 2px;
  }
}

/* Create (+) hidden on Movies — Ask Nnubia still uses shared --fab-bottom (clears mobile nav). */
body.wo-hide-create-fab .mv-ai-fab {
  bottom: var(--fab-bottom, max(28px, calc(env(safe-area-inset-bottom, 0px) + 24px)));
}

@media (max-width: 991px) {
  body.wo-hide-create-fab .mv-ai-fab {
    bottom: var(--fab-bottom, max(24px, calc(env(safe-area-inset-bottom, 0px) + 20px)));
  }
}

/* ── Overlay ────────────────────────────────── */
.mv-ai-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.mv-ai-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* ── Voice Assistant ────────────────────────── */
.mv-voice-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 24px 28px 24px 24px;
}

.mv-voice-modal[hidden] {
  display: none !important;
}

.mv-voice-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(229, 9, 20, 0.16) 0%, rgba(229, 9, 20, 0.06) 22%, rgba(0, 0, 0, 0) 45%), var(--mv-voice-overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.mv-voice-panel {
  position: relative;
  z-index: 1;
  width: min(430px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 20px 20px 18px;
  border-radius: 24px;
  border: 1px solid var(--mv-ai-border);
  background: var(--mv-voice-panel-bg);
  color: var(--mv-ai-text);
  box-shadow: var(--mv-voice-panel-shadow), inset 0 1px 0 rgba(255,255,255,0.08);
}

.mv-voice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  margin-bottom: 14px;
}

.mv-voice-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mv-voice-title-copy {
  min-width: 0;
}

.mv-voice-title strong,
.mv-voice-title span {
  display: block;
}

.mv-voice-title strong {
  font-size: 17px;
  line-height: 1.2;
}

.mv-voice-title span {
  margin-top: 2px;
  font-size: 12px;
  color: var(--mv-ai-text-dim);
}

.mv-voice-title-icon {
  position: relative;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(229, 9, 20, 0.14);
  color: var(--mv-ai-accent);
}

.mv-voice-title-icon svg {
  position: static;
  display: block;
  width: 18px;
  height: 18px;
  margin: 0;
  transform: none;
  flex-shrink: 0;
}

.mv-voice-close {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 0;
  border-radius: 999px;
  background: var(--mv-ai-surface);
  color: var(--mv-ai-text-dim);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.mv-voice-close:hover,
.mv-voice-close:focus-visible {
  background: var(--mv-ai-surface2);
  color: var(--mv-ai-text);
  outline: none;
}

.mv-voice-settings {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  flex-shrink: 0;
  width: 100%;
  margin: 0 0 14px;
  padding: 0;
}

.mv-voice-setting {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  min-width: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mv-ai-text-dim);
}

.mv-voice-setting-label {
  padding-left: 2px;
}

.mv-voice-locale-toggle {
  display: flex;
  gap: 3px;
  padding: 3px;
  border-radius: 12px;
  border: 1px solid var(--mv-ai-border);
  background: var(--mv-voice-chip-bg, rgba(255,255,255,0.04));
}

.mv-voice-locale-btn {
  flex: 1 1 0;
  min-width: 0;
  height: 32px;
  padding: 0 8px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--mv-ai-text-dim);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.mv-voice-locale-btn:hover,
.mv-voice-locale-btn:focus-visible {
  color: var(--mv-ai-text);
  outline: none;
}

.mv-voice-locale-btn.is-active {
  background: var(--mv-ai-accent);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(229, 9, 20, 0.25);
}

.mv-voice-setting select {
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--mv-ai-border);
  background: var(--mv-voice-chip-bg);
  color: var(--mv-ai-text);
  font-size: 12px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  outline: none;
}

.mv-voice-setting select:focus-visible {
  border-color: rgba(229, 9, 20, 0.55);
}

.mv-voice-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 2px;
  margin-bottom: 8px;
}

.mv-voice-state-label {
  margin: 0;
  text-align: center;
  font-size: 13px;
  line-height: 1.45;
  color: var(--mv-ai-text-dim);
}

.mv-voice-visual {
  display: none;
  min-height: 0;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.mv-voice-panel.is-listening .mv-voice-visual,
.mv-voice-panel.is-thinking .mv-voice-visual,
.mv-voice-panel.is-speaking .mv-voice-visual {
  display: flex;
  min-height: 64px;
}

.mv-voice-waveform,
.mv-voice-level-bars {
  display: none;
}

.mv-voice-waveform {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: radial-gradient(circle at center, rgba(229, 9, 20, 0.24) 0%, rgba(229, 9, 20, 0.1) 38%, rgba(229, 9, 20, 0) 72%);
}

.mv-voice-waveform::before,
.mv-voice-waveform::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: inherit;
  border: 1px solid rgba(229, 9, 20, 0.28);
  animation: mvVoicePulse 1.4s ease-in-out infinite;
}

.mv-voice-waveform::after {
  inset: 0;
  animation-delay: 0.2s;
}

.mv-voice-level-bars {
  align-items: flex-end;
  gap: 5px;
  height: 42px;
}

.mv-voice-level-bars span {
  width: 6px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(248, 113, 113, 0.98) 0%, rgba(185, 28, 28, 0.82) 100%);
  transform-origin: center bottom;
  transition: transform 0.12s ease;
}

.mv-voice-panel.is-listening .mv-voice-level-bars {
  display: flex;
}

.mv-voice-panel.is-thinking .mv-voice-waveform,
.mv-voice-panel.is-speaking .mv-voice-waveform {
  display: block;
}

.mv-voice-transcript,
.mv-voice-response {
  padding: 12px 14px;
  border-radius: 14px;
  margin: 0;
}

.mv-voice-transcript {
  background: var(--mv-voice-transcript-bg);
  border: 1px solid rgba(255,255,255,0.03);
}

.mv-voice-response {
  background: var(--mv-voice-response-bg);
  border: 1px solid var(--mv-voice-response-border);
}

.mv-voice-label {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mv-ai-text-dim);
}

.mv-voice-response .mv-voice-label {
  color: var(--mv-ai-accent);
}

.mv-voice-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--mv-ai-text);
  word-break: break-word;
}

.mv-voice-footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 4px;
}

.mv-voice-mic-wrap {
  display: flex;
  justify-content: center;
  margin: 0;
}

.mv-voice-mic {
  position: relative;
  width: 72px;
  height: 72px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  box-shadow: 0 16px 28px rgba(185, 28, 28, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.mv-voice-mic svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}

.mv-voice-mic .mv-voice-mic-icon {
  display: block;
}

.mv-voice-mic .mv-voice-stop-icon,
.mv-voice-mic .mv-voice-interrupt-icon {
  display: none;
}

.mv-voice-mic:hover,
.mv-voice-mic:focus-visible {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 20px 34px rgba(185, 28, 28, 0.34);
  filter: brightness(1.03);
  outline: none;
}

.mv-voice-mic-icon,
.mv-voice-stop-icon,
.mv-voice-interrupt-icon {
  width: 28px;
  height: 28px;
}

.mv-voice-panel.is-listening .mv-voice-mic {
  background: linear-gradient(135deg, #dc2626 0%, #7f1d1d 100%);
  box-shadow: 0 18px 36px rgba(127, 29, 29, 0.42);
}

.mv-voice-panel.is-listening .mv-voice-mic .mv-voice-mic-icon {
  display: none;
}

.mv-voice-panel.is-listening .mv-voice-mic .mv-voice-stop-icon {
  display: block;
}

.mv-voice-panel.is-thinking .mv-voice-mic {
  opacity: 1;
  background: linear-gradient(135deg, #ef4444 0%, #991b1b 100%);
  animation: mvInterruptPulse 1.5s ease-in-out infinite;
}

.mv-voice-panel.is-thinking .mv-voice-mic .mv-voice-mic-icon,
.mv-voice-panel.is-thinking .mv-voice-mic .mv-voice-stop-icon {
  display: none;
}

.mv-voice-panel.is-thinking .mv-voice-mic .mv-voice-interrupt-icon {
  display: block;
  color: #fff;
}

.mv-voice-chips {
  border-top: 1px solid var(--mv-ai-border);
  padding-top: 12px;
}

.mv-voice-chips-label {
  margin: 0 0 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mv-ai-text-dim);
}

.mv-voice-chip-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mv-voice-chip {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--mv-ai-border);
  background: var(--mv-voice-chip-bg);
  color: var(--mv-ai-text);
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.mv-voice-chip:hover,
.mv-voice-chip:focus-visible {
  background: var(--mv-voice-chip-hover-bg);
  border-color: rgba(229, 9, 20, 0.4);
  outline: none;
}

@keyframes mvVoicePulse {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(0.94);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

/* ── Live Mode: Conversation Transcript ────────────────── */
.mv-voice-convo {
  max-height: 220px;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scroll-behavior: smooth;
}

.mv-voice-convo::-webkit-scrollbar {
  width: 3px;
}

.mv-voice-convo::-webkit-scrollbar-thumb {
  background: var(--mv-ai-border);
  border-radius: 3px;
}

.mv-voice-convo-bubble {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.4;
  animation: mvConvoBubbleIn 0.25s ease-out;
}

@keyframes mvConvoBubbleIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.mv-voice-convo-user {
  align-self: flex-end;
  background: var(--mv-ai-accent, #e50914);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.mv-voice-convo-bot {
  align-self: flex-start;
  background: var(--mv-voice-transcript-bg);
  color: var(--mv-ai-text);
  border-bottom-left-radius: 4px;
}

.mv-voice-convo-role {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.7;
}

.mv-voice-convo-text {
  word-break: break-word;
}

/* ── Live Mode: Streaming & Continuous States ──────────── */
.mv-voice-panel.is-streaming .mv-voice-response {
  border-left: 2px solid var(--mv-ai-accent, #e50914);
  padding-left: 12px;
}

.mv-voice-panel.is-streaming .mv-voice-text {
  animation: mvTypeCursor 0.6s step-end infinite;
}

@keyframes mvTypeCursor {
  0%, 100% { border-right: 2px solid var(--mv-ai-accent, #e50914); }
  50% { border-right: 2px solid transparent; }
}

.mv-voice-panel.is-continuous .mv-voice-chips {
  display: none;
}

.mv-voice-panel.is-continuous .mv-voice-state-label {
  font-style: italic;
}

/* ── Live Mode: Interrupt icon on mic button ───────────── */
.mv-voice-panel.is-speaking .mv-voice-mic .mv-voice-mic-icon,
.mv-voice-panel.is-speaking .mv-voice-mic .mv-voice-stop-icon {
  display: none;
}

.mv-voice-panel.is-speaking .mv-voice-mic .mv-voice-interrupt-icon {
  display: block;
  color: #fff;
}

.mv-voice-panel.is-speaking .mv-voice-mic,
.mv-voice-panel.is-thinking .mv-voice-mic {
  pointer-events: auto;
  cursor: pointer;
}

.mv-voice-panel.is-speaking .mv-voice-mic {
  background: linear-gradient(135deg, #ef4444 0%, #991b1b 100%);
  animation: mvInterruptPulse 1.5s ease-in-out infinite;
}

@keyframes mvInterruptPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229, 9, 20, 0.15); }
  50% { box-shadow: 0 0 0 8px rgba(229, 9, 20, 0); }
}

/* ── Live Mode: Thinking state enhancement ─────────────── */
.mv-voice-panel.is-thinking .mv-voice-visual {
  opacity: 0.6;
}

.mv-voice-panel.is-thinking .mv-voice-state-label::after {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--mv-ai-accent, #e50914);
  margin-left: 6px;
  animation: mvThinkDot 1s ease-in-out infinite;
}

@keyframes mvThinkDot {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ── Drawer ── */
.mv-ai-drawer {
  position: fixed;
  top: 0;
  right: -400px;
  width: 380px;
  max-width: 90vw;
  height: 100vh;
  background: var(--mv-ai-drawer-shell);
  color: var(--mv-ai-text);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--mv-ai-drawer-shadow);
  border-left: 1px solid var(--mv-ai-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.mv-ai-drawer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--mv-ai-drawer-glow);
  box-shadow: var(--mv-ai-drawer-highlight);
  pointer-events: none;
}

.mv-ai-drawer > * {
  position: relative;
  z-index: 1;
}

.mv-ai-drawer.open {
  right: 0;
}

.mv-ai-drawer-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--mv-ai-border);
  flex-shrink: 0;
  background: var(--mv-ai-drawer-chrome-bg);
}

.mv-ai-drawer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 0 1 auto;
}

.mv-ai-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--mv-ai-accent);
  color: #fff;
  box-shadow: none;
}

.mv-ai-title-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1.15;
  min-width: 0;
}

.mv-ai-title-name {
  font-size: 13px;
  font-weight: 650;
  color: var(--mv-ai-text);
  letter-spacing: -0.01em;
}

.mv-ai-subtitle {
  font-size: 11px;
  color: var(--mv-ai-text-dim);
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

.mv-ai-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  padding: 0;
  border: none;
  background: transparent;
  flex-shrink: 0;
}

.mv-ai-tab {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--mv-ai-text-dim);
  font: inherit;
  font-size: 12px;
  font-weight: 550;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1;
}

.mv-ai-tab:hover {
  color: var(--mv-ai-text);
  background: rgba(255,255,255,0.05);
}

.mv-ai-tab.is-active {
  color: var(--mv-ai-text);
  background: rgba(255,255,255,0.08);
  box-shadow: inset 0 -2px 0 var(--mv-ai-accent);
}

.mv-ai-head-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.mv-ai-head-btn,
.mv-ai-close {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--mv-ai-text-dim);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  transition: color 0.15s, background 0.15s;
}

.mv-ai-head-btn:hover,
.mv-ai-close:hover {
  color: var(--mv-ai-text);
  background: rgba(255,255,255,0.06);
}

.mv-ai-close:hover {
  color: var(--mv-ai-accent);
  background: rgba(229,9,20,0.12);
}

/* Legacy title block (if any older markup remains) */
.mv-ai-drawer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
}

.mv-ai-intro {
  text-align: center;
  padding: 28px 10px 18px;
}

.mv-ai-hello {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  color: var(--mv-ai-text);
  letter-spacing: -0.02em;
}

.mv-ai-intro p {
  color: var(--mv-ai-text-dim);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 16px;
}

.mv-ai-scope-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 0 0 14px;
}

.mv-ai-scope-chip {
  appearance: none;
  border: 1px solid var(--mv-ai-border);
  background: transparent;
  color: var(--mv-ai-text-dim);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.mv-ai-scope-chip.is-active {
  color: #fff;
  background: var(--mv-ai-accent);
  border-color: var(--mv-ai-accent);
}

.mv-ai-suggests {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  max-width: 320px;
  margin: 0 auto;
}

.mv-ai-sug {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  padding: 10px 12px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.09) 0%, rgba(255,255,255,0.03) 100%);
  color: var(--mv-ai-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 1px 3px rgba(0,0,0,0.2);
}

.mv-ai-sug-spark {
  color: var(--mv-ai-accent);
  flex-shrink: 0;
}

.mv-ai-sug:hover {
  background: linear-gradient(180deg, rgba(229,9,20,0.2) 0%, rgba(229,9,20,0.08) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 0 8px var(--mv-ai-accent-glow);
  color: #fff;
}

.mv-ai-history {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mv-ai-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mv-ai-history-head p {
  margin: 0;
  font-size: 12px;
  color: var(--mv-ai-text-dim);
}

.mv-ai-history-clear {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--mv-ai-accent);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.mv-ai-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mv-ai-history-item {
  appearance: none;
  border: 1px solid var(--mv-ai-border);
  background: rgba(255,255,255,0.03);
  color: var(--mv-ai-text);
  text-align: left;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mv-ai-history-item strong {
  font-size: 13px;
}

.mv-ai-history-item span {
  font-size: 12px;
  color: var(--mv-ai-text-dim);
  line-height: 1.4;
}

.mv-ai-history-empty {
  font-size: 13px;
  color: var(--mv-ai-text-dim);
  padding: 24px 8px;
  text-align: center;
}

.mv-ai-compose-wrap {
  flex-shrink: 0;
  border-top: 1px solid var(--mv-ai-border);
  background: var(--mv-ai-drawer-chrome-bg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.mv-ai-compose {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 6px;
}

.mv-ai-compose-mic {
  width: 34px;
  height: 34px;
  border: 1px solid var(--mv-ai-border);
  border-radius: 50%;
  background: transparent;
  color: var(--mv-ai-text-dim);
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.mv-ai-compose-mic:hover {
  color: var(--mv-ai-text);
  border-color: rgba(255,255,255,0.28);
}

.mv-ai-disclaimer {
  margin: 0;
  padding: 0 16px 10px;
  font-size: 11px;
  line-height: 1.3;
  color: var(--mv-ai-text-dim);
  text-align: center;
}

/* ── Drawer Body ────────────────────────────── */
.mv-ai-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: var(--mv-ai-drawer-body-bg);
}

.mv-ai-spark {
  width: 40px;
  height: 40px;
  color: var(--mv-ai-accent);
  margin-bottom: 12px;
  filter: drop-shadow(0 0 8px var(--mv-ai-accent-glow));
}

body.theme-light .mv-ai-sug {
  background: rgba(0,0,0,0.04);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  color: var(--mv-ai-text);
}

body.theme-light .mv-ai-sug:hover {
  background: rgba(229,9,20,0.08);
  color: var(--mv-ai-accent);
  box-shadow: 0 1px 6px rgba(220,38,38,0.15);
}

/* ── Messages ───────────────────────────────── */
.mv-ai-msgs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mv-ai-msg {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
  white-space: normal;
}

.mv-ai-msg.user {
  align-self: flex-end;
  max-width: 78%;
  padding: 8px 12px;
  background: var(--mv-ai-user-msg-bg);
  color: #ffffff;
  border-bottom-right-radius: 4px;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: none;
  font-size: 13px;
  white-space: pre-wrap;
}

.mv-ai-msg.bot {
  align-self: flex-start;
  max-width: 100%;
  background: var(--mv-ai-bot-msg-bg);
  color: var(--mv-ai-text);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--mv-ai-border);
  box-shadow: none;
}

.mv-ai-msg.bot.compact {
  padding: 12px 14px;
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.08);
}

body.theme-light .mv-ai-msg.bot.compact {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.1);
}

/* Collapse helpers kept inert — chat drawer shows full replies and scrolls. */
.mv-ai-msg.bot.is-collapsible.is-collapsed {
  max-height: none;
  overflow: visible;
}

.mv-ai-msg.bot.is-collapsible.is-collapsed::before {
  display: none;
}

.mv-ai-expand-btn {
  display: none;
}

body.theme-light .mv-ai-msg.user {
  background: var(--mv-ai-user-msg-bg);
  border-color: rgba(255,255,255,0.16);
}

body.theme-light .mv-ai-msg.bot {
  background: var(--mv-ai-bot-msg-bg);
  border-color: var(--mv-ai-border);
}

.mv-ai-msg.bot p {
  margin: 0;
}

.mv-ai-msg.bot p + p,
.mv-ai-msg.bot p + ul,
.mv-ai-msg.bot p + ol,
.mv-ai-msg.bot p + blockquote,
.mv-ai-msg.bot ul + p,
.mv-ai-msg.bot ol + p,
.mv-ai-msg.bot blockquote + p,
.mv-ai-msg.bot ul + ul,
.mv-ai-msg.bot ol + ol,
.mv-ai-msg.bot blockquote + ul,
.mv-ai-msg.bot blockquote + ol,
.mv-ai-msg.bot .mv-ai-md-heading + p,
.mv-ai-msg.bot .mv-ai-md-heading + ul,
.mv-ai-msg.bot .mv-ai-md-heading + ol,
.mv-ai-msg.bot .mv-ai-md-heading + blockquote,
.mv-ai-msg.bot .mv-ai-note-heading + p,
.mv-ai-msg.bot .mv-ai-note-heading + ul,
.mv-ai-msg.bot .mv-ai-note-heading + ol,
.mv-ai-msg.bot p + .mv-ai-note-heading,
.mv-ai-msg.bot ul + .mv-ai-note-heading,
.mv-ai-msg.bot ol + .mv-ai-note-heading {
  margin-top: 0.85em;
}

.mv-ai-msg.bot .mv-ai-note-heading {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--mv-ai-text);
}

.mv-ai-msg.bot .mv-ai-note-heading:first-child {
  margin-top: 0;
}

.mv-ai-msg.bot .mv-ai-note-heading + p {
  margin-top: 0.35em;
}

.mv-ai-msg.bot strong {
  font-weight: 700;
}

.mv-ai-msg.bot em {
  font-style: italic;
}

.mv-ai-msg.bot a {
  color: var(--mv-ai-accent, #e50914);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.mv-ai-msg.bot a:hover {
  color: #b91c1c;
  text-decoration-color: rgba(229, 9, 20, 0.55);
}

body.theme-light .mv-ai-msg.bot a {
  color: var(--mv-ai-accent, #e50914);
}

body.theme-light .mv-ai-msg.bot a:hover {
  color: #b91c1c;
}

.mv-ai-msg.bot ul,
.mv-ai-msg.bot ol {
  margin: 0.35em 0 0;
  padding-left: 1.15em;
}

.mv-ai-msg.bot li + li {
  margin-top: 0.25em;
}

.mv-ai-msg.bot blockquote {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid rgba(229, 9, 20, 0.45);
  border-radius: 10px;
  background: rgba(229, 9, 20, 0.06);
  color: var(--mv-ai-text);
}

.mv-ai-msg.bot code {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(229, 9, 20, 0.12);
  color: inherit;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.92em;
}

.mv-ai-msg.bot pre {
  margin: 0;
  padding: 12px;
  overflow-x: auto;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.16);
  border: 1px solid var(--mv-ai-border);
}

.mv-ai-msg.bot pre code {
  padding: 0;
  border-radius: 0;
  background: transparent;
  display: block;
  white-space: pre;
}

.mv-ai-md-heading {
  font-weight: 700;
  line-height: 1.35;
}

.mv-ai-md-heading-1,
.mv-ai-md-heading-2 {
  font-size: 16px;
}

.mv-ai-md-heading-3,
.mv-ai-md-heading-4 {
  font-size: 15px;
}

/* ── Thinking indicator — animated bouncing dots ───────────── */
.mv-ai-msg.bot.thinking {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--mv-ai-text-dim);
  font-style: italic;
  border: 1px dashed rgba(229,9,20,0.18);
  background: rgba(229,9,20,0.03);
  box-shadow: none;
}

.mv-ai-msg.bot.thinking::after {
  content: '';
  display: inline-flex;
  flex: 0 0 auto;
  width: 24px;
  height: 6px;
  background:
    radial-gradient(circle at 3px 3px, var(--mv-ai-accent) 2px, transparent 2px),
    radial-gradient(circle at 12px 3px, var(--mv-ai-accent) 2px, transparent 2px),
    radial-gradient(circle at 21px 3px, var(--mv-ai-accent) 2px, transparent 2px);
  background-size: 24px 6px;
  animation: mvThinkingDots 1.4s ease-in-out infinite;
}

@keyframes mvThinkingDots {
  0%, 80%, 100% { opacity: 0.3; }
  40% { opacity: 1; }
}

/* ── Streaming response — fade-in tokens + pulsing cursor ──── */
.mv-ai-msg.bot.streaming {
  white-space: normal;
}

.mv-ai-msg.bot.streaming p,
.mv-ai-msg.bot.streaming li,
.mv-ai-msg.bot.streaming strong,
.mv-ai-msg.bot.streaming em,
.mv-ai-msg.bot.streaming a,
.mv-ai-msg.bot.streaming code {
  animation: mvTokenFadeIn 0.3s ease-out both;
}

@keyframes mvTokenFadeIn {
  from {
    opacity: 0;
    filter: blur(2px);
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

.mv-ai-msg.bot.streaming p:last-child {
  animation: mvParaSlideIn 0.25s ease-out both;
}

@keyframes mvParaSlideIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mv-ai-msg.bot.streaming::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 3px;
  vertical-align: text-bottom;
  background: linear-gradient(180deg, var(--mv-ai-accent) 0%, rgba(229, 9, 20, 0.4) 100%);
  border-radius: 1px;
  animation: mvCursorPulse 1s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes mvCursorPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

.mv-ai-msg.bot.streaming.done::after {
  animation: mvCursorFadeOut 0.25s ease-out forwards;
}

@keyframes mvCursorFadeOut {
  to { opacity: 0; width: 0; margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .mv-ai-msg.bot.thinking::after,
  .mv-ai-msg.bot.streaming::after,
  .mv-ai-msg.bot.streaming p,
  .mv-ai-msg.bot.streaming li,
  .mv-ai-msg.bot.streaming strong,
  .mv-ai-msg.bot.streaming em,
  .mv-ai-msg.bot.streaming a,
  .mv-ai-msg.bot.streaming code,
  .mv-ai-msg.bot.streaming p:last-child {
    animation: none;
  }
}

.mv-ai-msg.bot.sources {
  max-width: 100%;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

/* ── Source Cards ────────────────────────────── */
.mv-ai-picks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.mv-ai-picks-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mv-ai-text-dim);
  padding: 0 2px;
}

.mv-ai-sources-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
}

.mv-ai-src-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  text-decoration: none;
  color: var(--mv-ai-text);
  box-shadow: none;
  transition: border-color 0.15s, background-color 0.15s;
}

.mv-ai-src-card:hover {
  background: rgba(229,9,20,0.06);
  border-color: rgba(229,9,20,0.35);
  box-shadow: none;
  transform: none;
}

body.theme-light .mv-ai-src-card {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.08);
}

.mv-ai-src-poster {
  flex: 0 0 48px;
  width: 48px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--mv-ai-surface2);
}

.mv-ai-src-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mv-ai-src-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}

.mv-ai-src-top {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mv-ai-src-kicker {
  display: none;
}

.mv-ai-src-title {
  display: block;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
  color: var(--mv-ai-text);
  text-decoration: none;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mv-ai-src-title:hover {
  color: var(--mv-ai-accent);
}

.mv-ai-src-meta,
.mv-ai-src-reason {
  display: block;
  font-size: 12px;
  line-height: 1.35;
  color: var(--mv-ai-text-dim);
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mv-ai-src-social {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--mv-ai-accent);
  white-space: normal;
}

.mv-ai-src-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.mv-ai-src-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--mv-ai-border);
  background: transparent;
  color: var(--mv-ai-text);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.mv-ai-src-btn-primary {
  background: var(--mv-ai-accent);
  border-color: var(--mv-ai-accent);
  color: #fff !important;
}

/* Source cards live inside .mv-ai-msg.bot — beat the bot-link accent color
   so "Watch" stays white on the red primary button (not red-on-red). */
.mv-ai-msg.bot a.mv-ai-src-btn,
.mv-ai-msg.bot a.mv-ai-src-poster,
.mv-ai-msg.bot a.mv-ai-src-title,
.mv-ai-msg.bot button.mv-ai-src-btn {
  text-decoration: none !important;
}

.mv-ai-msg.bot a.mv-ai-src-btn-primary,
.mv-ai-msg.bot a.mv-ai-src-btn-primary:hover,
.mv-ai-msg.bot button.mv-ai-src-btn-primary,
.mv-ai-msg.bot button.mv-ai-src-btn-primary:hover {
  color: #fff !important;
  text-decoration: none !important;
}

.mv-ai-msg.bot a.mv-ai-src-title {
  color: var(--mv-ai-text) !important;
}

.mv-ai-msg.bot a.mv-ai-src-title:hover {
  color: var(--mv-ai-accent) !important;
}

.mv-ai-src-btn-secondary {
  background: transparent;
  border-color: rgba(255,255,255,0.18);
  color: var(--mv-ai-text);
}

.mv-ai-src-btn-secondary.is-saved {
  background: transparent;
  border-color: rgba(229,9,20,0.55);
  color: var(--mv-ai-accent);
}

.mv-ai-followups {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 0 2px;
}

.mv-ai-followups-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mv-ai-text-dim);
}

.mv-ai-followup-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mv-ai-followup {
  border: 1px solid var(--mv-ai-border);
  background: var(--mv-ai-surface);
  color: var(--mv-ai-text);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}

.mv-ai-followup:hover {
  border-color: rgba(229,9,20,0.4);
  background: rgba(229,9,20,0.08);
}

.mv-voice-sources {
  width: 100%;
  max-height: 180px;
  overflow: auto;
  margin: 0;
  padding: 0;
}

.mv-voice-followups {
  width: 100%;
  margin: 0;
  text-align: center;
}

.mv-voice-followups-label {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mv-ai-text-dim);
}

.mv-voice-followup-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.mv-ai-preview {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--mv-ai-border);
  background: var(--mv-ai-source-card-bg);
}

.mv-ai-preview-drawer {
  width: auto;
  margin: 8px 12px 12px;
}

.mv-ai-preview-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: var(--mv-ai-surface2);
  color: var(--mv-ai-text);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.mv-ai-preview-inner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.mv-ai-preview-poster-wrap {
  flex: 0 0 72px;
  width: 72px;
  height: 108px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--mv-ai-surface2);
}

.mv-ai-preview-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mv-ai-preview-body {
  flex: 1;
  min-width: 0;
}

.mv-ai-preview-kicker {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--mv-ai-accent);
}

.mv-ai-preview-title {
  margin: 0 0 4px;
  font-size: 15px;
  line-height: 1.3;
  color: var(--mv-ai-text);
}

.mv-ai-preview-meta,
.mv-ai-preview-reason {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--mv-ai-text-dim);
}

.mv-ai-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

/* ── Compose ────────────────────────────────── */
.mv-ai-compose input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid rgba(220,38,38,0.25);
  border-radius: 999px;
  background: rgba(220,38,38,0.03);
  color: var(--mv-ai-text);
  font-size: 14px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
  box-shadow: 0 0 4px rgba(220,38,38,0.2), inset 0 0 4px rgba(220,38,38,0.04);
}

.mv-ai-compose input::placeholder {
  color: rgba(220,38,38,0.35);
}

body.theme-light .mv-ai-compose input {
  background: rgba(220,38,38,0.02);
  border-color: rgba(220,38,38,0.2);
  color: var(--mv-ai-text);
  box-shadow: 0 0 3px rgba(220,38,38,0.1);
}

body.theme-light .mv-ai-compose input::placeholder {
  color: rgba(220,38,38,0.3);
}

.mv-ai-compose input:focus {
  border-color: rgba(220,38,38,0.55);
  box-shadow: 0 0 10px rgba(220,38,38,0.4), 0 0 20px rgba(220,38,38,0.15), inset 0 0 6px rgba(220,38,38,0.06);
  background: rgba(220,38,38,0.04);
}

.mv-ai-send {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--mv-ai-accent);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s;
  box-shadow: 0 0 8px var(--mv-ai-accent-glow);
  position: relative;
}

.mv-ai-send .mv-ai-send-icon,
.mv-ai-send .mv-ai-stop-icon {
  display: block;
}

.mv-ai-send .mv-ai-stop-icon {
  display: none;
}

.mv-ai-send.is-busy {
  background: #7f1d1d;
  box-shadow: 0 0 10px rgba(127, 29, 29, 0.45);
  animation: mvTextStopPulse 1.4s ease-in-out infinite;
}

.mv-ai-send.is-busy .mv-ai-send-icon {
  display: none;
}

.mv-ai-send.is-busy .mv-ai-stop-icon {
  display: block;
}

.mv-ai-send.is-busy:hover {
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(127, 29, 29, 0.55);
}

@keyframes mvTextStopPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(127, 29, 29, 0.2); }
  50% { box-shadow: 0 0 0 7px rgba(127, 29, 29, 0); }
}

.mv-ai-send:hover {
  box-shadow: 0 0 16px rgba(229,9,20,0.5), 0 0 30px rgba(229,9,20,0.2);
  transform: scale(1.05);
}

.mv-ai-msg.bot.stopped {
  opacity: 0.88;
}

.mv-ai-msg .mv-ai-stopped-note {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--mv-ai-text-dim);
}

/* ── Notification Panel ─────────────────────── */
.mv-ai-notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  max-height: 400px;
  background: var(--mv-ai-panel-bg);
  border: 1px solid var(--mv-ai-border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  display: none;
  overflow: hidden;
  z-index: 100;
  backdrop-filter: blur(18px);
}

body.theme-light .mv-ai-notif-panel {
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.mv-ai-notif-panel.open {
  display: block;
}

.mv-ai-notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--mv-ai-border);
  font-weight: 600;
  font-size: 14px;
}

.mv-ai-notif-head-actions {
  display: flex;
  gap: 8px;
}

.mv-ai-notif-settings,
.mv-ai-notif-dismiss {
  border: none;
  background: transparent;
  color: var(--mv-ai-accent);
  font-size: 12px;
  cursor: pointer;
  font-weight: 500;
  transition: text-shadow 0.2s;
}

.mv-ai-notif-settings:hover,
.mv-ai-notif-dismiss:hover {
  text-shadow: 0 0 8px var(--mv-ai-accent-glow);
}

.mv-ai-notif-list {
  max-height: 340px;
  overflow-y: auto;
  padding: 8px;
}

.mv-ai-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.mv-ai-notif-img {
  width: 44px;
  height: 60px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.mv-ai-notif-body {
  flex: 1;
  min-width: 0;
}

.mv-ai-notif-item:hover {
  background: var(--mv-ai-bot-bg);
}

.mv-ai-notif-item.unread {
  border-left: 3px solid var(--mv-ai-accent);
  background: rgba(229,9,20,0.04);
}

.mv-ai-notif-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}

.mv-ai-notif-msg {
  font-size: 12px;
  color: var(--mv-ai-text-dim);
}

.mv-ai-notif-time {
  font-size: 11px;
  color: var(--mv-ai-text-dim);
  margin-top: 2px;
}

.mv-ai-notif-empty,
.mv-ai-notif-loading {
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--mv-ai-text-dim);
}

/* ── Preferences Drawer ─────────────────────── */
.mv-ai-pref-note {
  font-size: 13px;
  color: var(--mv-ai-text-dim);
  line-height: 1.5;
  margin: 0 0 18px;
}

.mv-ai-pref-group {
  margin-bottom: 20px;
}

.mv-ai-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--mv-ai-text-dim);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.mv-ai-chips {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
}

.mv-ai-chips-wrap {
  flex-wrap: wrap;
}

.mv-ai-chip {
  padding: 4px 11px;
  border: none;
  border-radius: 99px;
  background: linear-gradient(180deg, rgba(255,255,255,0.09) 0%, rgba(255,255,255,0.03) 100%);
  color: var(--mv-ai-text);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 1px 3px rgba(0,0,0,0.2);
  font-family: inherit;
}

.mv-ai-chip.on {
  background: var(--mv-ai-accent);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 1px 4px rgba(229,9,20,0.35);
}

.mv-ai-chip:hover:not(.on) {
  background: linear-gradient(180deg, rgba(229,9,20,0.15) 0%, rgba(229,9,20,0.06) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 0 6px var(--mv-ai-accent-glow);
}

body.theme-light .mv-ai-chip {
  background: rgba(0,0,0,0.04);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  color: var(--mv-ai-text);
}

body.theme-light .mv-ai-chip:hover:not(.on) {
  background: rgba(229,9,20,0.06);
}

.mv-ai-drawer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--mv-ai-border);
  flex-shrink: 0;
  background: var(--mv-ai-drawer-chrome-bg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.mv-ai-btn {
  padding: 8px 18px;
  border: 1px solid var(--mv-ai-border);
  border-radius: 8px;
  background: transparent;
  color: var(--mv-ai-text);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}

.mv-ai-btn:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.15);
}

.mv-ai-btn-primary {
  background: var(--mv-ai-accent);
  border-color: var(--mv-ai-accent);
  color: #fff;
  box-shadow: 0 0 8px var(--mv-ai-accent-glow);
}

.mv-ai-btn-primary:hover {
  box-shadow: 0 0 14px rgba(229,9,20,0.5);
  background: var(--mv-ai-accent);
}

.mv-ai-pref-status {
  font-size: 12px;
  color: var(--mv-ai-accent);
  text-align: center;
  min-height: 18px;
  margin-top: 8px;
  text-shadow: 0 0 6px var(--mv-ai-accent-glow);
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 680px) {
  .mv-ai-drawer {
    width: 100vw;
    max-width: 100vw;
    right: -100vw;
  }

  .mv-ai-header-actions {
    gap: 3px;
  }

  .mv-ai-header-btn {
    width: 30px;
    height: 30px;
  }

  .mv-ai-header-btn svg {
    width: 13px;
    height: 13px;
  }

  .mv-ai-notif-panel {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 60vh;
    border-radius: 16px 16px 0 0;
  }
}

@media (max-width: 420px) {
  .mv-ai-drawer {
    border-radius: 0;
  }
}

/* ── Body lock when drawer open ─────────────── */
body.mv-drawer-open {
  overflow: hidden;
}

/* Desktop: push Movies page content left so the fixed Nnubia drawer
   does not cover the rightmost card column. Mobile keeps full overlay. */
@media (min-width: 681px) {
  .mv-ai-drawer {
    --mv-ai-drawer-width: 380px;
  }

  body.mv-drawer-open .movies-page-wrapper {
    padding-right: var(--mv-ai-drawer-width);
    box-sizing: border-box;
    transition: padding-right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  body.mv-drawer-open .movies-page-wrapper .movies-page-container {
    max-width: 100%;
  }
}

@media (min-width: 681px) and (max-width: 900px) {
  .mv-ai-drawer {
    --mv-ai-drawer-width: min(380px, 42vw);
    width: var(--mv-ai-drawer-width);
  }
}

/* Generative cinema job card (Phase 4) */
.nb-cinema-job-card {
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(229, 9, 20, 0.35);
  background: rgba(229, 9, 20, 0.08);
}
.nb-cinema-job-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #e50914;
  margin-bottom: 4px;
}
.nb-cinema-job-meta {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
}
.nb-cinema-job-error,
.nb-cinema-job-hint {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.4;
}
.nb-cinema-job-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  text-decoration: underline;
}
.nb-cinema-job-reward {
  margin-top: 6px;
  font-size: 12px;
  color: #7dcea0;
}
