/* Minimal customizable styles for the Help Widget */
:root {
  --jw-accent: #ffffff;
  --jw-bg: #0b0b0c; /* near-black */
  --jw-bg-soft: rgba(22,22,23,0.72);
  --jw-border: rgba(255,255,255,0.12);
  --jw-radius: 18px;
  --jw-transition: 220ms cubic-bezier(.4,.14,.3,1);
  --jw-shadow: 0 4px 12px rgba(0,0,0,.4), 0 2px 4px rgba(0,0,0,.3);
  --jw-blur: 18px;
  --jw-font-stack: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.jw-help-widget * { box-sizing: border-box; }

.jw-help-widget {
  position: fixed;
  z-index: 2147483000; /* high but below most cookie widgets */
  bottom: 24px;
  right: 24px;
  font-family: var(--jw-font-stack);
  color: var(--jw-accent);
  -webkit-font-smoothing: antialiased;
}

.jw-help-widget__fab {
  appearance: none;
  cursor: pointer;
  border: 1px solid var(--jw-border);
  background: #141415;
  color: var(--jw-accent);
  padding: 12px 20px 12px 20px;
  font-size: 14px;
  line-height: 1.25;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--jw-shadow);
  transition: background var(--jw-transition), transform var(--jw-transition), box-shadow var(--jw-transition);
  position: relative;
  font-weight: 500;
}

.jw-help-widget__fab:before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(160deg,rgba(255,255,255,0.18),rgba(255,255,255,0) 60%);
  pointer-events: none;
}

.jw-help-widget__fab:hover { background: #171718; }
.jw-help-widget__fab:active { transform: scale(.96); }
.jw-help-widget__fab:focus-visible { outline: 2px solid #555; outline-offset: 2px; }

.jw-help-widget__icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.jw-help-widget__content {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.jw-help-widget__label {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  text-align: left;
}

.jw-help-widget__status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  opacity: 0.85;
}

.jw-help-widget__status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.jw-help-widget__status-dot--online {
  background: #00ff40;
  box-shadow: 0 0 4px rgb(0 255 64);
}

.jw-help-widget__status-dot--offline {
  background: #ff0000;
  box-shadow: 0 0 4px rgb(255 59 48);
}

.jw-help-widget__panel-wrapper {
  position: absolute;
  bottom: 74px; /* fab height + spacing */
  right: 0;
  width: min(320px, calc(100vw - 32px));
  pointer-events: none; /* enable toggling via inner */
}

.jw-help-widget__panel {
  pointer-events: auto;
  background: var(--jw-bg-soft);
  backdrop-filter: saturate(180%) blur(var(--jw-blur));
  -webkit-backdrop-filter: saturate(180%) blur(var(--jw-blur));
  border: 1px solid var(--jw-border);
  border-radius: var(--jw-radius);
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--jw-shadow);
  transform-origin: 100% 100%;
  transform: scale(.85) translateY(8px);
  opacity: 0;
  visibility: hidden;
  transition: transform var(--jw-transition), opacity var(--jw-transition), visibility var(--jw-transition);
}

.jw-help-widget--open .jw-help-widget__panel {
  transform: scale(1) translateY(0);
  opacity: 1;
  visibility: visible;
}

.jw-help-widget__header {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.25px;
}

.jw-help-widget__text {
  font-size: 13px;
  line-height: 1.5;
  color: #e5e5e7;
  margin-bottom: 0px;
}

.jw-help-widget__schedule {
  font-size: 12px;
  line-height: 1.4;
  color: #a1a1a3;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 8px;
  margin-top: -3px;
}

.jw-help-widget__actions { display: flex; gap: 10px; }

.jw-help-widget__btn-telegram {
  all: unset;
  cursor: pointer;
  background: #0088cc; /* Telegram brand color */
  color: #fff;
  padding: 10px 16px;
  font-size: 14px;
  border-radius: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1.2;
  position: relative;
  transition: background var(--jw-transition), transform var(--jw-transition), box-shadow var(--jw-transition);
  box-shadow: 0 2px 6px rgba(0,136,204,0.4), 0 0 0 1px rgba(255,255,255,0.06) inset;
}
.jw-help-widget__btn-telegram:before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(145deg,rgba(255,255,255,.35),rgba(255,255,255,0) 60%);
  mix-blend-mode: overlay;
  pointer-events: none;
}
.jw-help-widget__btn-telegram:hover { background: #0398e5; }
.jw-help-widget__btn-telegram:active { transform: translateY(1px); }
.jw-help-widget__btn-telegram:focus-visible { outline: 2px solid rgba(255,255,255,0.6); outline-offset: 2px; }

.jw-help-widget__close {
  all: unset;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #bbb;
  transition: background var(--jw-transition), color var(--jw-transition);
  position: absolute;
  top: 6px;
  right: 6px;
}
.jw-help-widget__close:hover { background: rgba(255,255,255,0.06); color: #fff; }
.jw-help-widget__close:focus-visible { outline: 2px solid #555; outline-offset: 2px; }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .jw-help-widget__panel { transition: none; transform: none !important; }
  .jw-help-widget__fab { transition: none; }
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .jw-help-widget { right: 16px; bottom: 16px; }
  .jw-help-widget__fab { padding: 12px 16px; font-size: 13px; }
  .jw-help-widget__panel-wrapper { bottom: 66px; }
}