.support-widget {
  box-sizing: border-box;
  width: min(100% - 48px, 1680px);
  margin: 0 auto;
  background: #EFEFEF;
  border-radius: 14px;
  font-family: inherit;
  color: #000;
  container-type: inline-size;
}

.support-widget .live-support-online {
  padding: 45px 45px 45px 22px;
}
.support-widget .live-support-offline {
  padding: 45px;
}

.support-widget *,
.support-widget *::before,
.support-widget *::after {
  box-sizing: border-box;
  font-family: inherit;
}

/* [hidden] must beat the reset that forces display:block */
.support-widget [hidden] { display: none !important; }

.support-widget .live-support-title {
  font-weight: 600;
  font-size: 32px;
  line-height: 1.2;
  color: #000;
  margin: 0 0 39px;
}
.support-widget .live-support-title--center { text-align: center; }

.support-widget .live-support-body {
  display: flex;
  gap: 30px;
  align-items: stretch;
  flex-wrap: wrap;
  width: 100%;
}

/* ---- left: free-floating team bubbles (JS positions them) ---- */
.support-widget .live-support-team {
  position: relative;
  flex: 1.4 1 0;
  min-width: 0;
  min-height: 392px;
}
.support-widget .live-support-bubble {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  will-change: transform;
}
.support-widget .live-support-ph {
  width: 105px;
  height: 105px;
  border-radius: 50%;
  background: #D9D9D9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: box-shadow .15s;
}
.support-widget .live-support-ph img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.support-widget .live-support-bubble:hover .live-support-ph {
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}
.support-widget .live-support-bubble[aria-pressed="true"] .live-support-ph {
  box-shadow: 0 0 0 3px #2090FF;
}
.support-widget .live-support-name {
  font-weight: 500;
  font-size: 21px;
  color: #000;
}

.support-widget .live-support-chat {
  flex: 1 1 0;
  min-width: 0;
  max-width: 636px;
  margin-left: auto;
  display: flex;
  flex-direction: column;
  gap: 11px;
}


.support-widget .live-support-msgs {
  background: #FDFDFD;
  border-radius: 14px;
  padding: 20px;
  height: 350px;
  flex: none;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.support-widget .live-support-msgs > .live-support-newgroup {
  margin-top: 18px;
}

.support-widget .live-support-msgs > *:first-child {
  margin-top: auto;
}
.support-widget .live-support-msg {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
  color: #000;
  background: none;
  padding: 0;
  border-radius: 0;
  word-wrap: break-word;
  white-space: pre-wrap;
}
.support-widget .live-support-sys {
  align-self: center;
  font-size: 9px;
  color: #999;
}
.support-widget .live-support-link {
  color: #2090FF;
  text-decoration: underline;
  word-break: break-word;
}
/* agent-triggered collect form */
.support-widget .live-support-collect {
  align-self: stretch;
  max-width: 100%;
  background: #FFFFFF;
  border: 1px solid #ececec;
  border-radius: 14px;
  padding: 16px;
  font-size: 15px;
  color: #000;
}
.support-widget .live-support-collect__lead {
  margin: 0 0 12px;
  font-weight: 500;
}
.support-widget .live-support-collect__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.support-widget .live-support-collect__form input {
  border: 1px solid #e2e2e2;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  outline: none;
}
.support-widget .live-support-collect__btn {
  align-self: flex-start;
  background: #2090FF;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 15px;
  cursor: pointer;
}
.support-widget .live-support-collect__btn:hover {
  background: #1a7fe6;
}

.support-widget .live-support-in {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-self: flex-start;
  max-width: 85%;
}
.support-widget .live-support-out {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-self: flex-end;
  max-width: 85%;
}
.support-widget .live-support-row {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}
.support-widget .live-support-av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: #D9D9D9;
}
.support-widget .live-support-av--spacer {
  background: transparent;
}

.support-widget .live-support-av--guest {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-weight: 600;
  font-size: 15px;
}

.support-widget .live-support-avwrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex: none;
  width: 40px;
}

.support-widget .live-support-avname {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 3px;
  font-size: 9px;
  line-height: 1.1;
  color: #777;
  white-space: nowrap;
}
.support-widget .live-support-avwrap--spacer {
  visibility: hidden;
}


.support-widget .live-support-input {
  position: relative;
  width: 100%;
  background: #FFFFFF;
  border-radius: 14px;
}
.support-widget .live-support-input textarea {
  width: 100%;
  resize: none;
  border: none;
  background: transparent;
  border-radius: 14px;
  padding: 15px 55px 15px 18px;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.4;
  color: #000;
  outline: none;
  min-height: 63px;
}
.support-widget .live-support-input textarea::placeholder {
  color: #8a8a8a;
}

.support-widget .live-support-send {
  position: absolute;
  right: 11px;
  bottom: 11px;
  width: 39px;
  height: 39px;
  border-radius: 50%;
  border: none;
  background: #2090FF;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: background .2s;
}
.support-widget .live-support-send:hover {
  background: #1a7fe6;
}

/* ---- offline  ---- */
.support-widget .live-support-offline .live-support-body {
  justify-content: center;
}
.support-widget .live-support-offline .live-support-chat {
  flex: 0 1 636px;
  max-width: 636px;
  margin: 0 auto;
}
.support-widget .live-support-offline-lead {
  text-align: center;
  font-weight: 400;
  font-size: 25px;
  line-height: 1.2;
  color: #000;
  margin: 39px 0;
}

.support-widget .live-support-leave {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.support-widget .live-support-field {
  width: 100%;
  border: none;
  background: #FFFFFF;
  border-radius: 14px;
  padding: 14px 17px;
  font-size: 17px;
  font-weight: 500;
  color: #000;
  outline: none;
  resize: none;
}
.support-widget .live-support-field::placeholder {
  color: #8a8a8a;
}
.support-widget .live-support-leave-msg {
  position: relative;
}
.support-widget .live-support-leave-msg .live-support-field {
  min-height: 98px;
  padding-right: 59px;
}

.support-widget .live-support-leave__note {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 7px;
  font-size: 15px;
  color: #1a8f4a;
  text-align: center;
}

@container (max-width: 960px) {
  .support-widget .live-support-ph {
    width: 85px;
    height: 85px;
  }
  .support-widget .live-support-name {
    font-size: 18px;
  }
  .support-widget .live-support-online .live-support-team {
    flex: 1 1 0;
  }
  .support-widget .live-support-online .live-support-chat {
    flex: 1 1 0;
    max-width: none;
  }
}

@container (max-width: 500px) {
  .support-widget .live-support-offline {
    padding: 45px 25px 15px;
  }
  .support-widget .live-support-online {
    padding: 20px 20px 25px 11px;
  }
  .support-widget .live-support-title {
    font-size: 20px;
    margin: 0 0 20px;
  }
}

@container (max-width: 650px) {
  .support-widget .live-support-body {
    gap: 16px;
  }
  .support-widget .live-support-name {
    font-size: 13px;
  }
  .support-widget .live-support-msgs > .live-support-newgroup {
    margin-top: 8px;
  }

  .support-widget .live-support-msgs > *:first-child {
    margin-top: auto;
  }
  .support-widget .live-support-msg {
    font-size: 13px;
  }
  .support-widget .live-support-av--guest {
    font-size: 11px;
  }
  .support-widget .live-support-input textarea {
    font-size: 11px;
  }
  .support-widget .live-support-offline-lead {
    font-size: 15px;
    margin: 14px 0;
  }
  .support-widget .live-support-field {
    font-size: 11px;
  }
  .support-widget .live-support-leave__note {
    font-size: 12px;
  }

  .support-widget .live-support-offline .live-support-chat {
    flex: none;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }

  .support-widget .live-support-online .live-support-body {
    position: relative;
    display: block;
  }

  .support-widget .live-support-online .live-support-chat {
    width: 100%;
    max-width: 100%;
    margin: 0;
  }
  .support-widget .live-support-online .live-support-team {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    min-height: 0;
    margin: 0;
    pointer-events: none;
    z-index: 2;
  }
  .support-widget .live-support-online .live-support-bubble {
    pointer-events: auto;
  }
  .support-widget .live-support-ph {
    width: 45px;
    height: 45px;
  }
  .support-widget .live-support-msgs {
    height: 350px;
  }

  .support-widget .live-support-leave__note {
    margin-top: 3px;
  }
}

.support-tile .support-widget {
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.support-tile .support-widget .live-support-online,
.support-tile .support-widget .live-support-offline {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.support-tile .support-widget .live-support-title {
  margin-bottom: 16px;
}
.support-tile .support-widget .live-support-body {
  flex: 1;
  min-height: 0;
}
.support-tile .support-widget .live-support-chat {
  height: 100%;
  min-height: 0;
}
.support-tile .support-widget .live-support-msgs {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
}
.support-tile .support-widget .live-support-offline .live-support-chat {
  flex: 1;
  height: auto;
  justify-content: center;
}
/* offline in the tile: tighter lead (kills the big gap) + smaller fields so the form isn't clipped by the short tile height */
.support-tile .support-widget .live-support-offline-lead {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.25;
}
.support-tile .support-widget .live-support-leave {
  gap: 8px;
}
.support-tile .support-widget .live-support-leave-msg .live-support-field {
  min-height: 64px;
}
