/* Ask LH bubble and full page. Scoped class names so the theme's styles don't collide. */

.asklh-bubble {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 2147483000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  margin: 0;
  padding: 8px 18px 8px 10px;
  border: 0;
  border-radius: 999px;
  background: #ff9500;
  color: #1f2328;
  box-shadow: 0 10px 28px rgba(84, 56, 22, 0.28), 0 2px 6px rgba(84, 56, 22, 0.18);
  font: 700 16px/1.2 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  letter-spacing: -0.01em;
  text-transform: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.asklh-bubble:hover {
  background: #ffa827;
  transform: translateY(-1px);
}
.asklh-bubble:focus-visible {
  outline: 3px solid #8f4700;
  outline-offset: 3px;
}
.asklh-bubble img {
  display: block;
  width: 28px;
  height: 28px;
  margin: 0;
  border-radius: 7px;
  box-shadow: none;
}
.asklh-bubble .asklh-badge {
  display: inline-block;
  margin: 0 0 0 -2px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #1f2328;
  color: #ffffff;
  font: 700 11px/1.3 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.asklh-panel {
  position: fixed;
  right: 20px;
  bottom: 84px;
  z-index: 2147483001;
  width: min(420px, calc(100vw - 40px));
  height: min(700px, calc(100vh - 110px));
  overflow: hidden;
  border-radius: 18px;
  background: #fcfbf9;
  box-shadow: 0 24px 60px rgba(31, 35, 40, 0.28), 0 2px 8px rgba(31, 35, 40, 0.12);
}
.asklh-panel[hidden] {
  display: none;
}
/* A quiet loading shimmer until the chat has loaded. */
.asklh-panel:not(.is-loaded) {
  background: linear-gradient(100deg, #fcfbf9 30%, #fff1dd 50%, #fcfbf9 70%) 0 0 / 300% 100%;
  animation: asklh-loading 1.4s linear infinite;
}
@keyframes asklh-loading {
  to {
    background-position: -300% 0;
  }
}
.asklh-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Phones: the chat takes the whole screen; its own header has the close button. */
@media (max-width: 640px) {
  .asklh-panel {
    inset: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    border-radius: 0;
  }
  .asklh-open .asklh-bubble {
    display: none;
  }
  .asklh-open body {
    overflow: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .asklh-bubble {
    transition: none;
  }
  .asklh-panel:not(.is-loaded) {
    animation: none;
  }
}

/* Ask LH box: top of the main column (Settings → Ask LH box). The theme's link styles are
   overridden on purpose: the whole box is one link. */
/* Two classes: themes set ".entry-content { margin: 0 auto }". 40px lines it up with the sidebar. */
.asklh-box-row.entry-content {
  margin-top: 40px;
  margin-bottom: 0;
}
.asklh-box-row .asklh-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 16px;
  padding: 18px 20px;
  border: 2px solid #ff9500;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff4e3, #ffffff 70%);
  box-shadow: 0 8px 24px rgba(84, 56, 22, 0.12);
  color: #1f2328 !important;
  text-decoration: none !important;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.asklh-box-row .asklh-box:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(84, 56, 22, 0.18);
}
.asklh-box-row .asklh-box:focus-visible {
  outline: 3px solid #8f4700;
  outline-offset: 3px;
}
.asklh-box-row .asklh-box img {
  flex: none;
  width: 48px;
  height: 48px;
  margin: 0;
  border-radius: 10px;
  box-shadow: none;
}
.asklh-box-text {
  display: flex;
  flex: 1 1 220px;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.asklh-box-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}
.asklh-box-badge {
  padding: 2px 7px;
  border-radius: 999px;
  background: #1f2328;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.asklh-box-sub {
  color: #4b525c;
  font-size: 15px;
  line-height: 1.4;
}
.asklh-box-button {
  flex: none;
  padding: 10px 16px;
  border-radius: 999px;
  background: #ff9500;
  color: #1f2328;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.asklh-box-row .asklh-box:hover .asklh-box-button {
  background: #ffa827;
}

@media (prefers-reduced-motion: reduce) {
  .asklh-box-row .asklh-box {
    transition: none;
  }
}

@media print {
  .asklh-bubble,
  .asklh-panel,
  .asklh-box-row {
    display: none !important;
  }
}

/* [ask_lh] full page */
.asklh-page {
  margin: 0 0 24px;
}
/* Wider than a narrow content column, centred on the screen, never wider than the window.
   !important: themes centre content with "margin: auto !important". */
.asklh-page-full {
  width: min(1200px, calc(100vw - 48px));
  max-width: none !important;
  margin-left: calc(50% - min(600px, calc(50vw - 24px))) !important;
  margin-right: 0 !important;
}
.asklh-page-frame {
  display: block;
  width: 100%;
  height: calc(100vh - 140px);
  min-height: 600px;
  border: 0;
  background: #fcfbf9;
}
