/* ── Advisor Drawer (global) ── */

/* Floating launcher pill — bottom-right */
.advisor-pill {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 8000;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--navy);
  border: 1px solid var(--gold);
  color: var(--cream);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  transition: border-color .15s ease, transform .15s ease;
}
.advisor-pill:hover {
  border-color: var(--gold-hover);
  transform: translateY(-2px);
}
.advisor-fab-glyph {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 20px;
  line-height: 1;
  color: var(--gold);
}
.advisor-pill-label {
  white-space: nowrap;
}

/* Inactive launcher pill — pre-offer */
.advisor-pill-inactive {
  border-color: rgba(212,168,75,0.55);
  background: var(--panel2);
  pointer-events: none;
  cursor: default;
}
.advisor-pill-inactive:hover {
  border-color: rgba(212,168,75,0.55);
  transform: none;
}
.advisor-pill-inactive .advisor-fab-glyph {
  color: rgba(212,168,75,0.7);
}
.advisor-pill-inactive .advisor-pill-label {
  color: rgba(253,246,236,0.65);
}

/* Drawer backdrop */
.advisor-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 8500;
  background: rgba(10,11,34,.55);
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}
.advisor-drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Drawer panel — slides from right */
.advisor-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 9000;
  width: 420px;
  max-width: 100vw;
  background: var(--navy-deep);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
}
.advisor-drawer.is-open {
  transform: translateX(0);
}

/* Drawer header */
.advisor-drawer-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
}
.advisor-drawer-diamond {
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--gold);
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.advisor-drawer-diamond-f {
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--gold);
  transform: rotate(-45deg);
  line-height: 1;
}
.advisor-drawer-title {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--cream);
  flex: 1;
}
.advisor-drawer-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  font-size: 20px;
  transition: color .15s;
}
.advisor-drawer-close:hover {
  color: var(--cream);
}

/* Drawer body */
.advisor-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

/* Greeting */
.advisor-greeting {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 24px;
}
.advisor-greeting strong {
  color: var(--cream);
  font-weight: 500;
}

/* Seeded prompt chips */
.advisor-chips {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}
.advisor-chip {
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--cream);
  background: var(--panel);
  border: 1px solid var(--line);
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, background .15s;
}
.advisor-chip:hover {
  border-color: var(--gold-40);
  background: var(--panel2);
}

/* Spacer pushes input to bottom */
.advisor-drawer-spacer {
  flex: 1;
}

/* Stubbed input area */
.advisor-drawer-input {
  border-top: 1px solid var(--line);
  padding: 16px 24px;
}
.advisor-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 12px 16px;
}
.advisor-input-field {
  flex: 1;
  font-size: 14px;
  color: var(--cream);
  background: none;
}
.advisor-input-field::placeholder {
  color: var(--muted2);
}
.advisor-input-send {
  background: none;
  border: none;
  color: var(--gold);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.advisor-input-send:hover {
  color: var(--gold-hover);
}

/* Open-mode thread */
.advisor-thread-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}
.advisor-new-convo {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--gold);
  background: none;
  border: 1px solid var(--line);
  padding: 5px 12px;
  cursor: pointer;
  transition: border-color .15s;
}
.advisor-new-convo:hover {
  border-color: var(--gold-40);
}
.advisor-thread-user,
.advisor-thread-advisor {
  margin-bottom: 16px;
}
.advisor-thread-user .advisor-scoped-text {
  background: var(--panel2);
}

/* Scoped mode — draft sharpen flow */
.advisor-scoped-draft,
.advisor-scoped-result {
  margin-bottom: 16px;
}
.advisor-scoped-label {
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted2);
  margin-bottom: 6px;
  font-weight: 600;
}
.advisor-scoped-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--cream);
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  white-space: pre-wrap;
}
.advisor-scoped-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.advisor-btn-keep,
.advisor-btn-use {
  flex: 1;
  padding: 12px 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background .15s;
}
.advisor-btn-keep {
  background: var(--panel);
  color: var(--cream);
  border: 1px solid var(--line);
}
.advisor-btn-keep:hover {
  background: var(--panel2);
}
.advisor-btn-use {
  background: var(--gold);
  color: var(--navy);
}
.advisor-btn-use:hover {
  background: var(--gold-hover);
}
.advisor-btn-retry {
  flex: 1;
  padding: 12px 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: var(--panel);
  color: var(--gold);
  border: 1px solid var(--line);
  transition: border-color .15s;
}
.advisor-btn-retry:hover {
  border-color: var(--gold-40);
}
.advisor-retry-row {
  margin-top: 10px;
}
.advisor-retry-input {
  width: 100%;
  font-size: 13px;
  padding: 10px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--cream);
  font-family: var(--font-sans);
  box-sizing: border-box;
}
.advisor-retry-input::placeholder {
  color: var(--muted2);
}

@media (max-width: 560px) {
  .advisor-drawer { width: 100vw; }
  .advisor-pill {
    left: 0; right: 0; bottom: 0;
    height: 56px;
    width: auto; padding: 0;
    justify-content: center;
    font-size: 13px;
    background: var(--panel);
    border: 1px solid var(--gold);
    box-shadow: none;
  }
  .advisor-pill::after {
    content: '\2192';
    position: absolute; right: 20px;
    color: var(--gold); font-size: 18px; line-height: 1;
  }
  .advisor-pill:hover { transform: none; }
  .advisor-pill:active { background: var(--panel2); }
  /* Drop "· Inactive" suffix below 560px */
  .advisor-pill-inactive .advisor-pill-label { font-size: 0; }
  .advisor-pill-inactive .advisor-pill-label::before {
    content: 'Consult Your Advisor'; font-size: 13px;
  }
  .advisor-pill-inactive::after { display: none; }
}
