/* Contextual Help panel — self-service first; support only on explicit request */

.ll-customer-help-root {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 2147483000;
  font-family: Georgia, "Times New Roman", serif;
  color: #1c1917;
}

.ll-customer-help-launch {
  appearance: none;
  border: 1px solid #1e3a5f;
  background: #1e3a5f;
  color: #f8fafc;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(28, 25, 23, 0.18);
}

.ll-customer-help-launch:hover,
.ll-customer-help-launch:focus-visible {
  background: #0f172a;
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.ll-customer-help-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(28, 25, 23, 0.45);
  z-index: 2147483001;
}

.ll-customer-help-dialog {
  position: fixed;
  left: 1rem;
  bottom: 4rem;
  width: min(26rem, calc(100vw - 2rem));
  max-height: min(36rem, calc(100vh - 5rem));
  overflow: auto;
  /* The dialog is appended to <body>, outside .ll-customer-help-root, so it must set its own
     text color or it inherits a host page's dark-theme text (LEW-213: unreadable on Mission Control). */
  color: #1c1917;
  color-scheme: light;
  background: #fafaf9;
  border: 1px solid #44403c;
  z-index: 2147483002;
  box-shadow: 0 16px 40px rgba(28, 25, 23, 0.22);
}

.ll-help-header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem 0.5rem;
  border-bottom: 1px solid #e7e5e4;
  position: sticky;
  top: 0;
  background: #fafaf9;
}

.ll-help-header h2 {
  margin: 0;
  font-size: 1.15rem;
}

.ll-help-sub {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: #57534e;
}

.ll-help-close {
  appearance: none;
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: #44403c;
}

.ll-help-body {
  padding: 0.85rem 1.1rem 1.1rem;
}

.ll-help-search-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.ll-help-search {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid #a8a29e;
  box-sizing: border-box;
  font: inherit;
  color: #1c1917;
  background: #fff;
}

.ll-help-block {
  margin-bottom: 0.95rem;
}

.ll-help-block h3 {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
}

.ll-help-block p,
.ll-help-block li,
.ll-help-faq p {
  font-size: 0.85rem;
  line-height: 1.4;
  color: #292524;
}

.ll-help-block ul {
  margin: 0.25rem 0 0.5rem;
  padding-left: 1.1rem;
}

.ll-help-muted {
  color: #78716c !important;
  font-size: 0.78rem !important;
}

.ll-help-faq {
  border: 1px solid #e7e5e4;
  padding: 0.35rem 0.5rem;
  margin-bottom: 0.35rem;
  background: #fff;
}

.ll-help-faq summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
}

.ll-help-additional {
  border-top: 1px solid #d6d3d1;
  padding-top: 0.75rem;
}

.ll-help-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.5rem 0;
}

.ll-help-actions-wrap {
  gap: 0.35rem 0.65rem;
}

.ll-help-primary,
.ll-help-secondary,
.ll-help-linkish,
.ll-customer-help-form button {
  appearance: none;
  border: 1px solid #44403c;
  background: #fafaf9;
  color: #1c1917;
  padding: 0.4rem 0.7rem;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.ll-help-primary,
.ll-customer-help-form button[type="submit"] {
  background: #1e3a5f;
  border-color: #1e3a5f;
  color: #f8fafc;
  font-weight: 600;
}

.ll-help-linkish {
  border: 0;
  border-bottom: 1px solid #1e3a5f;
  background: transparent;
  color: #1e3a5f;
  padding: 0.15rem 0;
}

.ll-help-context-chip {
  font-size: 0.78rem;
  background: #e7e5e4;
  padding: 0.55rem 0.65rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.ll-customer-help-form label {
  display: block;
  margin-bottom: 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
}

.ll-customer-help-form input,
.ll-customer-help-form textarea,
.ll-customer-help-form select {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid #a8a29e;
  background: #fff;
  color: #1c1917;
  font: inherit;
  font-size: 0.85rem;
  box-sizing: border-box;
}

.ll-customer-help-form textarea {
  min-height: 5rem;
  resize: vertical;
}

.ll-customer-help-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.ll-customer-help-status {
  margin: 0.65rem 0 0;
  font-size: 0.8rem;
}

.ll-customer-help-status[data-kind="ok"] {
  color: #166534;
}

.ll-customer-help-status[data-kind="err"] {
  color: #991b1b;
}

.ll-persona-help {
  border: 1px solid #d6d3d1;
  border-radius: .75rem;
  background: #fff;
  padding: .8rem;
}
.ll-persona-help label { font-size: .85rem; font-weight: 600; }
.ll-persona-help textarea {
  box-sizing: border-box;
  display: block;
  width: 100%;
  margin-top: .35rem;
  padding: .55rem;
  border: 1px solid #78716c;
  border-radius: .35rem;
  font: inherit;
  font-size: .9rem;
  resize: vertical;
}
.ll-persona-help [data-ll-answer] { white-space: pre-wrap; overflow-wrap: anywhere; }
.ll-persona-help [data-ll-answer-status] { font-size: .85rem; color: #44403c; }
.ll-persona-dots { display: inline-flex; gap: .2rem; margin-left: .4rem; }
.ll-persona-dots i {
  width: .3rem; height: .3rem; border-radius: 50%; background: currentColor;
  animation: ll-persona-pulse 1s ease-in-out infinite;
}
.ll-persona-dots i:nth-child(2) { animation-delay: .15s; }
.ll-persona-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ll-persona-pulse { 0%, 70%, 100% { opacity: .3; } 35% { opacity: 1; } }
.ll-help-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.ll-customer-help-dialog button:focus-visible,
.ll-customer-help-dialog textarea:focus-visible,
.ll-customer-help-dialog input:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.ll-customer-help-dialog button:disabled { opacity: .65; cursor: default; }

@media (max-width: 640px) {
  .ll-customer-help-dialog {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 85vh;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ll-persona-dots i { animation: none; }
  .ll-customer-help-launch,
  .ll-customer-help-dialog {
    box-shadow: none;
  }
}

.ll-persona-history { list-style: none; padding: 0; margin: 0 0 1rem; max-height: 16rem; overflow-y: auto; }
.ll-persona-history li { border-bottom: 1px solid #d7dce4; padding: .5rem 0; }
.ll-persona-history li p { margin: .25rem 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ll-persona-history li p:first-child { font-weight: 600; }
