
/* ----------------------------------------------------- the line to staff */

/*
 * A live chat, in the shape people expect one: a round launcher in the corner
 * and a panel over it with the operator at the top, the thread in the middle
 * and the composer at the bottom. It is deliberately not the room chat: it is
 * private, it carries the site's own accent, and it says on its face that a
 * person reads it.
 */
.support-open {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 48;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--lime-soft), var(--lime-dark));
  color: var(--on-lime);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.support-open:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(204, 255, 0, 0.45);
}

.support-open svg {
  width: 26px;
  height: 26px;
}

/* A grid box would ignore the attribute, so it is said out loud. */
.support-badge[hidden] {
  display: none;
}

.support-badge {
  position: absolute;
  right: -2px;
  top: -2px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #d8352a;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.support {
  position: fixed;
  right: 20px;
  bottom: 90px;
  z-index: 48;
  display: flex;
  flex-direction: column;
  width: min(384px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 140px));
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.62);
  overflow: hidden;
  font-family: Poppins, Inter, system-ui, sans-serif;
}

.support[hidden] {
  display: none;
}

/* ------------------------------------------------------------ the header */

.support-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px;
  background: linear-gradient(135deg, var(--lime), var(--lime-dark));
  color: var(--on-lime);
}

.support-agent {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(16, 20, 10, 0.18);
  color: var(--on-lime);
}

.support-agent svg {
  width: 22px;
  height: 22px;
}

.support-who-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.support-who-head b {
  font-size: 14px;
  font-weight: 600;
}

.support-who-head small {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(16, 20, 10, 0.72);
}

.support-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0f2b16;
  box-shadow: 0 0 0 3px rgba(16, 43, 22, 0.25);
}

.support-min {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: rgba(16, 20, 10, 0.16);
  color: var(--on-lime);
  font-size: 12px;
  cursor: pointer;
}

.support-min:hover {
  background: rgba(16, 20, 10, 0.26);
}

/* ------------------------------------------------------------ the thread */

.support-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 16px 14px;
  list-style: none;
  overflow-y: auto;
  flex: 1;
  background:
    radial-gradient(80% 40% at 50% 0%, rgba(204, 255, 0, 0.12), transparent 70%),
    var(--bg-deep);
}

.support-line {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 100%;
}

.support-line.is-mine {
  justify-content: flex-end;
}

.support-face {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--lime-soft), var(--lime-dark));
  color: var(--on-lime);
}

.support-face svg {
  width: 15px;
  height: 15px;
}

.support-bubble {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 76%;
  padding: 9px 12px;
  border-radius: 14px 14px 14px 4px;
  background: #151a25;
  font-size: 12.5px;
}

.support-line.is-mine .support-bubble {
  border-radius: 14px 14px 4px 14px;
  background: linear-gradient(160deg, var(--lime), var(--lime-dark));
  color: var(--on-lime);
}

.support-body {
  line-height: 1.5;
  word-break: break-word;
}

.support-at {
  align-self: flex-end;
  font-size: 9.5px;
  opacity: 0.6;
}

.chat-empty {
  padding: 24px 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
}

/* --------------------------------------------------------- the composer */

.support-say {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}

.support-say input {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-deep);
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  outline: none;
}

.support-say input:focus {
  border-color: var(--lime);
}

.support-send {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--lime-soft), var(--lime-dark));
  color: var(--on-lime);
  cursor: pointer;
  transition: filter 140ms ease;
}

.support-send:hover:not(:disabled) {
  filter: brightness(1.12);
}

.support-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.support-send svg {
  width: 18px;
  height: 18px;
}

.support-foot {
  margin: 0;
  padding: 8px 14px 12px;
  background: var(--panel);
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--text-faint);
}

@media (max-width: 820px) {
  .support-open {
    right: 12px;
    bottom: 76px;
  }

  .support {
    right: 12px;
    bottom: 142px;
    height: min(520px, calc(100vh - 200px));
  }
}
