/* Chat opens above the bottom social floater. */
.fb-dock {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
  top: auto;
  transform: translateX(-50%);
  z-index: 1045;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: #1d2129;
  max-width: calc(100vw - 1.5rem);
}
.fb-dock:not(:has(.fb-win:not(.is-min), .fb-panel:not(.is-min))) { display: none; }
body.has-fb-dock { padding-bottom: 5.5rem; }
body.page-it-landing.has-fb-dock { padding-bottom: 9.5rem; }
body.page-it-landing .fb-dock {
  bottom: calc(9.25rem + env(safe-area-inset-bottom, 0px));
}
body.has-fb-dock .support-widget,
body.has-fb-dock .support-widget-restore { display: none !important; }

.fb-win, .fb-panel {
  width: min(340px, calc(100vw - 6rem));
  background: #fff;
  border: 0;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
  display: flex;
  flex-direction: column;
  max-height: min(72vh, 560px);
}
.fb-win { height: min(420px, 70vh); }
.fb-panel { height: min(540px, 72vh); }
.fb-win.is-min, .fb-panel.is-min { height: auto; }
.fb-win.is-min .fb-body, .fb-win.is-min .fb-input,
.fb-panel.is-min .fb-body { display: none; }

.fb-head {
  background: linear-gradient(135deg, #1f8a4c 0%, #166534 55%, #d3a62f 100%);
  color: #fff;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 4px 0 0;
  user-select: none;
  border-radius: 22px 22px 0 0;
}
.fb-head-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 6px 8px;
  cursor: pointer;
}
.fb-head strong {
  flex: 1;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fb-x {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: rgba(255,255,255,.16);
  color: #fff;
  font-size: 24px;
  line-height: 34px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}
.fb-x:hover { background: rgba(255,255,255,.32); }
.fb-expand {
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 999px;
  background: rgba(255,255,255,.22);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  white-space: nowrap;
  margin-right: 2px;
}
.fb-expand:hover { background: rgba(255,255,255,.34); }
.fb-head strong { font-size: 0.95rem; letter-spacing: -0.02em; }
.fb-dock.has-fullscreen {
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  transform: none !important;
  max-width: none !important;
  width: 100% !important;
  height: 100dvh !important;
  z-index: 1200;
  align-items: stretch;
  padding: 0;
}
.fb-win.is-fullscreen {
  width: 100% !important;
  height: 100dvh !important;
  max-height: none !important;
  border-radius: 0 !important;
}
.fb-badge {
  background: #fa3e3e;
  color: #fff;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  padding: 0 4px;
}
.fb-body { flex: 1; overflow-y: auto; background: #fff; }
.fb-search {
  margin: 8px 10px;
  width: calc(100% - 20px);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
}
.fb-sec {
  padding: 10px 12px 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.fb-row, .fb-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  min-height: 48px;
}
.fb-row:hover, .fb-alert:hover { background: #f8fafc; }
.fb-av {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #0f172a;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}
.fb-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid #fff;
  background: #b0b3b8;
}
.fb-dot.on { background: #42b72a; }
.fb-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-brand { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 3px; font-size: 10px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; vertical-align: 1px; }
.fb-brand-support { background: #d1e7dd; color: #0f5132; }
.fb-brand-software { background: #cfe2ff; color: #084298; }
.fb-sub { color: #8d949e; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-alert { align-items: flex-start; }
.fb-alert .fb-sub { white-space: normal; }
.fb-msgs { padding: 8px; }
.fb-line { margin: 0 0 6px; line-height: 1.3; word-wrap: break-word; }
.fb-line { cursor: grab; }
.fb-line b { color: #1f8a4c; margin-right: 4px; }
.fb-pic { display: block; max-width: 100%; max-height: 180px; border-radius: 8px; margin-top: 4px; }
.fb-win.is-drop, .fb-row.is-drop { outline: 2px dashed #1f8a4c; outline-offset: -2px; }
.fb-pic-btn {
  border: 0;
  background: transparent;
  color: #334155;
  font-weight: 700;
  padding: 0 8px;
  cursor: pointer;
}
.fb-line.me b { color: #4b4f56; }
.fb-input {
  border-top: 1px solid #e5e5e5;
  display: flex;
}
.fb-input input {
  flex: 1;
  border: 0;
  padding: 7px 8px;
  font-size: 13px;
  outline: none;
}
.fb-empty { padding: 12px; color: #8d949e; font-size: 12px; }
.fb-clear {
  display: block;
  width: calc(100% - 16px);
  margin: 6px 8px 8px;
  border: 1px solid #ccd0d5;
  background: #f5f6f7;
  font-size: 12px;
  padding: 4px;
  cursor: pointer;
}

.fb-launcher {
  display: none;
  position: relative;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .28);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.fb-launcher svg { width: 26px; height: 26px; display: block; }
.fb-launcher .fb-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
}

.fb-win.is-min, .fb-panel.is-min { display: none; }
.fb-launcher { display: none !important; }
@media (max-width: 991.98px) {
  .fb-dock {
    left: 12px;
    right: 12px;
    top: auto;
    bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
    transform: none;
    max-width: none;
  }
  body.page-it-landing .fb-dock {
    bottom: calc(9.5rem + env(safe-area-inset-bottom, 0px));
  }
  body.has-fb-dock { padding-bottom: 5.5rem; }
  .fb-win:not(.is-min), .fb-panel:not(.is-min) {
    width: 100%;
    height: min(68vh, 520px);
  }
  .fb-input input { font-size: 16px; }
}
