:root {
  --yatraone-shell-radius-sm: 14px;
  --yatraone-shell-radius-md: 18px;
  --yatraone-shell-radius-lg: 22px;
  --yatraone-shell-radius-xl: 26px;
  --yatraone-shell-line-soft: rgba(129, 190, 255, 0.18);
  --yatraone-shell-line-strong: rgba(129, 190, 255, 0.3);
  --yatraone-shell-surface: rgba(255, 255, 255, 0.92);
  --yatraone-shell-surface-strong: rgba(255, 255, 255, 0.97);
  --yatraone-shell-surface-dark: rgba(9, 21, 38, 0.82);
  --yatraone-shell-surface-glass: rgba(247, 250, 255, 0.86);
  --yatraone-shell-text: #13233c;
  --yatraone-shell-muted: #65778f;
  --yatraone-shell-accent: #315efb;
  --yatraone-shell-accent-soft: rgba(49, 94, 251, 0.1);
  --yatraone-shell-success: #167c5b;
  --yatraone-shell-success-soft: rgba(22, 124, 91, 0.1);
  --yatraone-shell-warning: #b26b00;
  --yatraone-shell-warning-soft: rgba(178, 107, 0, 0.1);
  --yatraone-shell-danger: #b42318;
  --yatraone-shell-danger-soft: rgba(180, 35, 24, 0.1);
  --yatraone-shell-shadow-soft: 0 14px 34px rgba(15, 23, 42, 0.1);
  --yatraone-shell-shadow-strong: 0 28px 56px rgba(15, 23, 42, 0.18);
  --yatraone-shell-blur: blur(18px);
}

[data-yatraone-shell="global"],
.assistant-widget,
.copilot-dock,
.yatraone-dashboard-shell-panel {
  color: var(--yatraone-shell-text);
}

.assistant-popup,
.copilot-dock,
.yatraone-dashboard-shell-panel {
  border-radius: var(--yatraone-shell-radius-xl);
  border: 1px solid var(--yatraone-shell-line-soft);
  box-shadow: var(--yatraone-shell-shadow-strong);
  backdrop-filter: var(--yatraone-shell-blur);
}

.assistant-popup-header,
.copilot-dock-header,
.yatraone-dashboard-shell-panel .panel-header {
  border-bottom: 1px solid rgba(129, 190, 255, 0.12);
}

.assistant-system-card,
.copilot-dock-card,
.yatraone-dashboard-shell-panel .summary-card {
  border-radius: var(--yatraone-shell-radius-md);
  border: 1px solid rgba(129, 190, 255, 0.14);
  box-shadow: var(--yatraone-shell-shadow-soft);
}

.assistant-response-panel,
.copilot-dock-latest,
.yatraone-dashboard-shell-panel .detail-card {
  border-radius: var(--yatraone-shell-radius-md);
}

.assistant-response-preview,
.copilot-answer,
.dashboard-shell-response {
  line-height: 1.55;
}

.detail-list,
.assistant-transcript-shell,
.chat-messages,
.voice-transcript {
  border-radius: var(--yatraone-shell-radius-md);
}

.assistant-section-heading,
.detail-top,
.feed-top,
.action-top {
  align-items: flex-start;
}

.assistant-launcher,
.copilot-fab,
.yatraone-dashboard-orb__button,
.yatraone-orb__button {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.assistant-launcher:focus-visible,
.copilot-fab:focus-visible,
.yatraone-dashboard-orb__button:focus-visible,
.yatraone-orb__button:focus-visible {
  outline: 2px solid var(--yatraone-shell-accent);
  outline-offset: 4px;
}

.assistant-launcher-orb-shell,
.yatraone-orb__cluster,
.yatraone-dashboard-orb {
  position: relative;
}

.yatraone-orb__halo,
.yatraone-orb__ring,
.yatraone-orb__core,
.yatraone-dashboard-orb__halo,
.yatraone-dashboard-orb__ring,
.yatraone-dashboard-orb__core {
  transition: transform 180ms ease, opacity 180ms ease, box-shadow 220ms ease, border-color 220ms ease, background 220ms ease;
}

.yatraone-orb__transcript,
.yatraone-dashboard-orb__transcript {
  border-radius: var(--yatraone-shell-radius-lg);
  box-shadow: var(--yatraone-shell-shadow-strong);
}

.yatraone-orb__label,
.yatraone-dashboard-orb__label,
.assistant-launcher-text,
.copilot-fab-copy {
  letter-spacing: 0.01em;
}

.status-chip,
.pill,
.status-pill,
.chat-status {
  border-radius: 999px;
}

.status-chip[data-tone="high"],
.status-pill.danger {
  background: var(--yatraone-shell-danger-soft);
  color: var(--yatraone-shell-danger);
}

.status-chip[data-tone="medium"],
.status-pill.warning {
  background: var(--yatraone-shell-warning-soft);
  color: var(--yatraone-shell-warning);
}

.status-chip[data-tone="low"],
.status-chip[data-tone="stable"],
.status-pill.success {
  background: var(--yatraone-shell-success-soft);
  color: var(--yatraone-shell-success);
}

.assistant-confirmation-panel,
.guided-flow,
.copilot-dock-footnote,
.voice-command-note {
  border-radius: var(--yatraone-shell-radius-md);
}

@media (prefers-reduced-motion: reduce) {
  .assistant-launcher,
  .copilot-fab,
  .yatraone-dashboard-orb__button,
  .yatraone-orb__button,
  .yatraone-orb__halo,
  .yatraone-orb__ring,
  .yatraone-orb__core,
  .yatraone-dashboard-orb__halo,
  .yatraone-dashboard-orb__ring,
  .yatraone-dashboard-orb__core {
    transition: none !important;
    animation: none !important;
  }
}

.assistant-widget.finance-universal-shell {
  position: fixed;
  right: max(24px, env(safe-area-inset-right, 0px) + 16px);
  bottom: calc(98px + env(safe-area-inset-bottom, 0px));
  /* Quote Desk uses sticky layers up to 10090; the assistant must remain actionable above them. */
  z-index: 11020;
}

.assistant-widget.finance-universal-shell .assistant-popup {
  position: fixed;
  right: max(24px, env(safe-area-inset-right, 0px) + 16px);
  bottom: calc(98px + env(safe-area-inset-bottom, 0px));
  z-index: 11022;
  width: min(410px, calc(100vw - 32px));
  max-height: min(74vh, 720px);
  overflow: auto;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(49, 94, 251, 0.14);
  background:
    radial-gradient(circle at top right, rgba(49, 94, 251, 0.12), transparent 32%),
    rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 52px rgba(15, 23, 42, 0.2);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 28px, 0) scale(0.98);
  transform-origin: bottom right;
  transition: opacity 220ms ease, transform 240ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 220ms ease;
}

.assistant-widget.finance-universal-shell.assistant-widget-open .assistant-popup {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
  box-shadow: 0 34px 60px rgba(15, 23, 42, 0.24);
}

.assistant-widget.finance-universal-shell.assistant-widget-open .assistant-popup.hidden {
  display: block !important;
  opacity: 1;
  pointer-events: auto;
}

.assistant-widget.finance-universal-shell.assistant-widget-open .assistant-launcher {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.assistant-widget.finance-universal-shell .assistant-popup-header {
  display: grid;
  gap: 14px;
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.assistant-widget.finance-universal-shell .assistant-popup-title {
  display: grid;
  gap: 6px;
}

.assistant-widget.finance-universal-shell .assistant-popup-title h3 {
  font-size: 22px;
  line-height: 1.1;
}

.assistant-widget.finance-universal-shell .assistant-popup-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.assistant-widget.finance-universal-shell .assistant-popup-body {
  padding: 0;
  display: grid;
  gap: 14px;
}

.assistant-widget.finance-universal-shell .assistant-launcher {
  position: fixed;
  right: max(24px, env(safe-area-inset-right, 0px) + 16px);
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 11021;
  min-height: 72px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(49, 94, 251, 0.14);
  box-shadow: 0 22px 40px rgba(15, 23, 42, 0.18);
}

.assistant-widget.finance-universal-shell .assistant-launcher:hover,
.assistant-widget.finance-universal-shell .assistant-launcher:focus-visible {
  transform: translateY(-2px);
}

.assistant-widget.finance-universal-shell .assistant-launcher-text small {
  color: var(--yatraone-shell-muted);
}

@media (max-width: 760px) {
  .assistant-widget.finance-universal-shell {
    right: 12px;
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }

  .assistant-widget.finance-universal-shell .assistant-launcher {
    right: 12px;
    left: 12px;
    bottom: max(12px, env(safe-area-inset-bottom, 0px) + 8px);
    justify-content: space-between;
    width: auto;
    border-radius: 20px;
  }

  .assistant-widget.finance-universal-shell .assistant-popup {
    right: 12px;
    left: 12px;
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-height: min(72vh, 680px);
    border-radius: 28px 28px 18px 18px;
    transform: translate3d(0, 38px, 0) scale(0.985);
    transform-origin: bottom center;
  }

  .assistant-widget.finance-universal-shell.assistant-widget-open .assistant-popup {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

/*
 * The CRM assistant uses the conversation-first v2 surface. Keep these rules
 * after the shared finance shell so the legacy 410px command-deck layout
 * cannot override the new assistant presentation.
 */
.assistant-widget.assistant-widget-v2.finance-universal-shell .assistant-popup {
  width: min(640px, calc(100vw - 28px));
  max-height: min(82vh, 760px);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 24px;
  background: #0b1822;
  box-shadow: 0 28px 80px rgba(2, 8, 23, 0.48);
}

.assistant-widget.assistant-widget-v2.finance-universal-shell .assistant-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 66px;
  margin: 0;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: #0b1822;
}

.assistant-widget.assistant-widget-v2.finance-universal-shell .assistant-popup-title {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.assistant-widget.assistant-widget-v2.finance-universal-shell .assistant-popup-title h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  color: #f8fafc;
}

.assistant-widget.assistant-widget-v2.finance-universal-shell .assistant-popup-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.assistant-widget.assistant-widget-v2.finance-universal-shell .assistant-popup-body {
  display: grid;
  gap: 0;
  max-height: calc(min(82vh, 760px) - 66px);
  padding: 0;
  overflow: hidden;
  background: #0b1822;
}

@media (max-width: 720px) {
  .assistant-widget.assistant-widget-v2.finance-universal-shell .assistant-popup {
    right: 8px;
    left: 8px;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-height: 76vh;
    border-radius: 20px;
  }

  .assistant-widget.assistant-widget-v2.finance-universal-shell .assistant-popup-body {
    max-height: calc(76vh - 66px);
  }
}
