/* Contextual help: scoped UI. The selectors are intentionally specific to avoid theme collisions. */
.cs-help-trigger,
.cs-help-fab {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin: 0 0 0 5px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 50%;
  background: #161616;
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .32);
  cursor: pointer;
  vertical-align: middle;
  flex: 0 0 auto;
  line-height: 1;
  opacity: .82;
  touch-action: manipulation;
  transition: transform .14s ease, background-color .14s ease, opacity .14s ease;
}

.cs-help-trigger:hover,
.cs-help-trigger:focus-visible,
.cs-help-fab:hover,
.cs-help-fab:focus-visible {
  background: #d81b68;
  opacity: 1;
  outline: 2px solid #fff;
  outline-offset: 1px;
  transform: scale(1.08);
}

.cs-help-trigger svg,
.cs-help-fab svg {
  display: block;
  width: 12px;
  height: 12px;
  pointer-events: none;
  fill: currentColor;
}

.cs-help-trigger--corner {
  position: absolute !important;
  top: 5px;
  right: 5px;
  margin: 0 !important;
  z-index: 6;
}

.cs-help-host {
  position: relative !important;
}

.cs-help-fab {
  position: fixed !important;
  right: 16px;
  bottom: 16px;
  z-index: 2147483000;
  width: 48px;
  height: 48px;
  margin: 0;
  border: 2px solid #fff;
  background: #d81b68;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .34);
  opacity: 1;
}

.cs-help-fab svg {
  width: 22px;
  height: 22px;
}

.cs-help-fab::after {
  content: "?";
  position: absolute;
  right: -3px;
  top: -4px;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font: 700 11px/1 Arial, Helvetica, sans-serif;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}

#cs-help-popover {
  all: initial;
  position: fixed;
  top: 76px;
  right: 18px;
  z-index: 2147483001;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: min(390px, calc(100vw - 24px));
  max-height: min(72vh, 610px);
  overflow: hidden;
  border: 1px solid #d7d7d7;
  border-radius: 16px;
  background: #fff;
  color: #1c1c1c;
  box-shadow: 0 18px 55px rgba(0, 0, 0, .38);
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
  text-align: left !important;
  direction: ltr;
}

#cs-help-popover[hidden] {
  display: none !important;
}

#cs-help-popover.is-dragging {
  user-select: none;
  box-shadow: 0 22px 65px rgba(0, 0, 0, .46);
}

.cs-help-popover__head {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  min-height: 48px;
  padding: 7px 8px 7px 10px;
  background: #171717;
  color: #fff;
  cursor: move;
  touch-action: none;
}

.cs-help-popover__speak,
.cs-help-popover__close {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid #4d4d4d;
  border-radius: 50%;
  background: #292929;
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
}

.cs-help-popover__speak:hover,
.cs-help-popover__speak:focus-visible,
.cs-help-popover__close:hover,
.cs-help-popover__close:focus-visible {
  background: #d81b68;
  outline: 2px solid #fff;
  outline-offset: 1px;
}

.cs-help-popover__speak svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.cs-help-popover__speak.is-speaking {
  background: #d81b68;
  animation: cs-help-pulse 1.3s ease-in-out infinite;
}

@keyframes cs-help-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(216, 27, 104, .45); }
  50% { box-shadow: 0 0 0 7px rgba(216, 27, 104, 0); }
}

.cs-help-popover__title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  color: #fff !important;
  font: 700 14px/1.25 Arial, Helvetica, sans-serif !important;
  text-align: left !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cs-help-popover__close {
  border-color: transparent;
  background: transparent;
  font: 700 25px/1 Arial, Helvetica, sans-serif;
}

.cs-help-popover__lang {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 8px 12px;
  border-bottom: 1px solid #e6e6e6;
  background: #f5f5f5;
  color: #333;
}

.cs-help-popover__flag {
  display: inline-grid;
  place-items: center;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px #ddd;
  font-size: 16px;
  line-height: 1;
}

.cs-help-popover__select {
  all: unset;
  box-sizing: border-box;
  flex: 1 1 auto;
  min-width: 0;
  height: 32px;
  padding: 0 30px 0 9px;
  border: 1px solid #c8c8c8;
  border-radius: 8px;
  background-color: #fff;
  background-image: linear-gradient(45deg, transparent 50%, #666 50%), linear-gradient(135deg, #666 50%, transparent 50%);
  background-position: calc(100% - 16px) 13px, calc(100% - 11px) 13px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  color: #111;
  font: 13px/1 Arial, Helvetica, sans-serif;
  cursor: pointer;
}

.cs-help-popover__select:focus-visible {
  outline: 2px solid #d81b68;
  outline-offset: 1px;
}

.cs-help-popover__body {
  flex: 1 1 auto;
  min-height: 84px;
  overflow-y: auto;
  padding: 15px 16px 18px;
  color: #222 !important;
  background: #fff;
  font: 14px/1.55 Arial, Helvetica, sans-serif !important;
  text-align: left !important;
  overflow-wrap: anywhere;
}

.cs-help-popover__body p {
  margin: 0 0 10px !important;
  padding: 0 !important;
  color: #222 !important;
  font: inherit !important;
  text-align: left !important;
}

.cs-help-popover__body p:last-child {
  margin-bottom: 0 !important;
}

.cs-help-popover__body strong {
  color: #111 !important;
  font-weight: 700 !important;
}

.cs-help-popover__body .cs-help-topic {
  border-left: 4px solid #d81b68;
  padding: 1px 0 1px 10px;
  color: #242424 !important;
}

.cs-help-popover__body .cs-help-safe {
  margin-top: 12px !important;
  color: #5a5a5a !important;
  font-size: 12.5px !important;
}

.cs-help-popover__body .cs-help-status {
  display: block;
  margin-top: 10px;
  border-radius: 7px;
  padding: 7px 9px;
  background: #fff2f7;
  color: #7c103e !important;
  font-size: 12px !important;
}

.cs-help-popover__foot {
  flex: 0 0 auto;
  padding: 8px 12px 9px;
  border-top: 1px solid #e9e9e9;
  background: #fafafa;
  color: #6a6a6a;
  font: 11.5px/1.35 Arial, Helvetica, sans-serif;
}

.cs-help-popover__resize {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  background: linear-gradient(135deg, transparent 48%, #bdbdbd 49%, #bdbdbd 56%, transparent 57%);
}

@media (max-width: 600px) {
  .cs-help-trigger {
    width: 22px;
    height: 22px;
    margin-left: 4px;
  }
  .cs-help-trigger svg {
    width: 13px;
    height: 13px;
  }
  .cs-help-fab {
    right: 12px;
    bottom: 12px;
    width: 46px;
    height: 46px;
  }
  #cs-help-popover {
    right: 8px !important;
    left: 8px !important;
    top: auto !important;
    bottom: 68px !important;
    width: auto;
    max-height: min(70vh, 560px);
  }
  .cs-help-popover__head {
    cursor: default;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cs-help-trigger,
  .cs-help-fab,
  .cs-help-popover__speak {
    animation: none !important;
    transition: none !important;
  }
}
