/* Chat dock. Green headers, not Facebook blue. */
.fb-dock {
  position: fixed;
  right: 8px;
  bottom: 0;
  z-index: 1300;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: #1d2129;
}
body.has-fb-dock { padding-bottom: 28px; }
body.has-fb-dock .support-widget,
body.has-fb-dock .support-widget-restore { display: none !important; }
@media (max-width: 991px) {
  body.has-admin-mobile-nav .fb-dock { bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
}

.fb-win, .fb-panel {
  width: 260px;
  background: #fff;
  border: 1px solid #14532d;
  border-bottom: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
  display: flex;
  flex-direction: column;
  max-height: 70vh;
}
.fb-win { height: 340px; }
.fb-panel { height: 420px; }
.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: #1f8a4c;
  color: #fff;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 4px 0 0;
  user-select: none;
}
.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 28px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: rgba(255,255,255,.16);
  color: #fff;
  font-size: 20px;
  line-height: 26px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}
.fb-x:hover { background: rgba(255,255,255,.32); }
.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: 6px;
  width: calc(100% - 12px);
  border: 1px solid #ccd0d5;
  border-radius: 2px;
  padding: 4px 6px;
  font-size: 12px;
}
.fb-sec {
  padding: 6px 8px 2px;
  color: #8d949e;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.fb-row, .fb-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.fb-row:hover, .fb-alert:hover { background: #f5f6f7; }
.fb-av {
  width: 28px;
  height: 28px;
  border-radius: 2px;
  background: #d8dde6;
  color: #1f8a4c;
  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-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 b { color: #1f8a4c; margin-right: 4px; }
.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;
}

@media (max-width: 767.98px) {
  .fb-dock {
    left: 0;
    right: 0;
    width: 100%;
    bottom: 0;
    gap: 0;
    flex-direction: column-reverse;
    align-items: stretch;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  body.has-fb-dock { padding-bottom: calc(44px + env(safe-area-inset-bottom, 0px)); }
  .fb-win, .fb-panel {
    width: 100%;
    max-width: 100%;
    height: min(68vh, 520px);
    border-left: 0;
    border-right: 0;
    border-radius: 14px 14px 0 0;
  }
  .fb-win.is-min, .fb-panel.is-min {
    height: 40px;
    border-radius: 0;
  }
  .fb-head { min-height: 40px; }
  .fb-x {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
    font-size: 24px;
    line-height: 34px;
  }
  .fb-row, .fb-alert { min-height: 44px; }
  .fb-input input { font-size: 16px; }
}
