/* Hubert guided walkthrough — left guide panel + optional spotlight tour */

:root {
  --hub-guide-width: 340px;
}

body.hub-flow-tour-active {
  overflow: hidden;
}

body.hub-hubert-help-open {
  overflow: auto;
}

.hub-flow-tour {
  position: fixed;
  inset: 0;
  z-index: 10050;
  pointer-events: none;
}

.hub-flow-tour:not([hidden]) {
  display: block;
}

.hub-flow-tour.is-open .hub-flow-tour-backdrop {
  pointer-events: auto;
}

.hub-flow-tour.is-help-open .hub-hubert-guide-panel {
  pointer-events: auto;
}

.hub-flow-tour-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 35, 45, 0.45);
  pointer-events: none;
}

.hub-flow-tour.is-questions-only .hub-flow-tour-backdrop,
.hub-flow-tour.is-help-open .hub-flow-tour-backdrop {
  display: none;
}

.hub-flow-tour-spotlight {
  position: fixed;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(15, 35, 45, 0.45);
  pointer-events: none;
  z-index: 1;
  transition: top 0.2s, left 0.2s, width 0.2s, height 0.2s;
}

.hub-flow-tour.is-questions-only .hub-flow-tour-spotlight,
.hub-flow-tour.is-help-open .hub-flow-tour-spotlight {
  display: none;
}

.hub-hubert-guide-panel {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--hub-guide-width);
  max-height: none;
  z-index: 2;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid #cfe4ea;
  box-shadow: 4px 0 24px rgba(15, 35, 45, 0.12);
  pointer-events: auto;
}

body:not(.ee-embed-drawer).hub-hubert-help-open .ee-wrap,
body:not(.ee-embed-drawer).hub-hubert-guide-active .ee-wrap,
body:not(.ee-embed-drawer).hub-flow-tour-active .ee-wrap {
  margin-left: var(--hub-guide-width);
}

body.ee-embed-drawer .hub-hubert-guide-panel {
  top: 0;
  left: auto;
  right: 0;
  border-right: none;
  border-left: 1px solid #cfe4ea;
  box-shadow: -4px 0 24px rgba(15, 35, 45, 0.12);
}

.hub-hubert-guide-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid #e8edf0;
  background: linear-gradient(180deg, #f4eef9 0%, #fff 100%);
  flex-shrink: 0;
}

.hub-hubert-guide-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #0d0d12;
  object-fit: cover;
  flex-shrink: 0;
}

.hub-hubert-guide-brand {
  min-width: 0;
  flex: 1;
}

.hub-hubert-guide-name {
  margin: 0;
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 400;
  color: #1a2e3b;
}

.hub-hubert-guide-tagline {
  margin: 2px 0 0;
  font-size: 12px;
  color: #7a94a3;
}

.hub-hubert-guide-collapse {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 1px solid #cfe4ea;
  border-radius: 8px;
  background: #fff;
  color: #4a6272;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.hub-hubert-guide-collapse:hover {
  border-color: #9eb8c4;
  color: #1a2e3b;
}

.hub-hubert-guide-step {
  flex-shrink: 0;
  padding: 16px 16px 14px;
  border-bottom: 1px solid #e8edf0;
  background: #f8fbfc;
}

.hub-flow-tour.is-questions-only .hub-hubert-guide-step,
.hub-flow-tour.is-help-open .hub-hubert-guide-step {
  display: none;
}

.hub-flow-tour-step {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7a94a3;
}

.hub-flow-tour-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a2e3b;
}

.hub-flow-tour-body {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.55;
  color: #4a6272;
}

.hub-flow-tour-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.hub-flow-tour-actions .ee-btn {
  font-size: 12px;
  padding: 8px 14px;
}

.hub-hubert-guide-chat {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.hub-hubert-guide-chat-label {
  margin: 0;
  padding: 12px 16px 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7a94a3;
  flex-shrink: 0;
}

.hub-hubert-guide-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 120px;
}

.hub-hubert-guide-messages .hubert-bubble {
  font-size: 13px;
  max-width: 95%;
}

.hub-hubert-guide-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 10px;
  flex-shrink: 0;
}

.hub-hubert-guide-suggestions[hidden] {
  display: none !important;
}

.hub-hubert-guide-suggestions .hubert-chip {
  font-size: 11px;
  padding: 6px 10px;
}

.hub-hubert-guide-form {
  padding: 12px 14px 14px;
  border-top: 1px solid #e8edf0;
  background: #fff;
  flex-shrink: 0;
}

.hub-hubert-guide-form .hubert-form-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
}

.hub-hubert-guide-form textarea {
  width: 100%;
  min-width: 0;
  resize: none;
  min-height: 40px;
  max-height: 96px;
  border: 1px solid #cfe4ea;
  border-radius: 10px;
  padding: 9px 11px;
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
  color: #1a2e3b;
}

.hub-hubert-guide-form textarea:focus {
  outline: 2px solid rgba(91, 47, 153, 0.22);
  outline-offset: 1px;
  border-color: rgba(91, 47, 153, 0.35);
}

.hub-hubert-guide-form .ee-btn {
  min-height: 40px;
  font-size: 12px;
  padding: 8px 14px;
  white-space: nowrap;
}

.hub-hubert-guide-reset {
  display: block;
  margin: 0 14px 8px;
  border: 0;
  background: none;
  color: #7a94a3;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  padding: 0;
}

.hub-hubert-guide-reset[hidden] {
  display: none !important;
}

.hub-hubert-guide-reset:hover {
  color: #4a6272;
}

.ee-hubert-help-btn {
  margin-left: auto;
  border: 1px solid #cfe4ea;
  border-radius: 999px;
  background: #fff;
  color: #4a6272;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  white-space: nowrap;
}

.ee-hubert-help-btn:hover {
  border-color: #9eb8c4;
  color: #1a2e3b;
  background: #f8fbfc;
}

.ee-back-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ee-top-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  :root {
    --hub-guide-width: min(300px, 88vw);
  }

  body:not(.ee-embed-drawer).hub-hubert-help-open .ee-wrap,
  body:not(.ee-embed-drawer).hub-hubert-guide-active .ee-wrap,
  body:not(.ee-embed-drawer).hub-flow-tour-active .ee-wrap {
    margin-left: var(--hub-guide-width);
  }

  .hub-hubert-guide-form .hubert-form-compose {
    grid-template-columns: 1fr;
  }

  .hub-hubert-guide-form .ee-btn {
    width: 100%;
  }
}
