.support-widget {
  position: fixed;
  z-index: 40;
  inset-inline-end: max(1rem, env(safe-area-inset-left, 0px));
  bottom: calc(max(1rem, env(safe-area-inset-bottom, 0px)) + var(--support-keyboard, 0px));
  color: #102e35;
  font-size: .94rem;
  line-height: 1.7;
}

.support-widget [hidden],
.support-admin [hidden] {
  display: none !important;
}

.support-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.support-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: .55rem;
}

.support-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-width: 3.25rem;
  min-height: 3.25rem;
  padding: .6rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #123840;
  color: #fff;
  font: inherit;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 .3rem 1rem #0c2a352e;
}

.support-action svg,
.support-close svg {
  width: 1.52rem;
  height: 1.52rem;
  flex: none;
}

.support-trigger {
  padding-inline: .85rem 1rem;
}

.support-trigger:hover,
.support-trigger[aria-expanded="true"] {
  background: #19505a;
}

.support-whatsapp {
  background: #146b46;
}

.support-whatsapp:hover {
  background: #105739;
}

.support-widget :focus-visible,
.support-admin :focus-visible {
  outline: 3px solid #187b8a;
  outline-offset: 3px;
}

.support-panel {
  position: absolute;
  inset-inline-end: 0;
  bottom: calc(100% + .65rem);
  display: flex;
  flex-direction: column;
  width: min(24rem, calc(100vw - 2rem));
  max-height: min(38rem, calc(var(--support-viewport, 100dvh) - 5.15rem - env(safe-area-inset-bottom, 0px)));
  overflow: auto;
  border: 1px solid #cbd9d8;
  border-radius: 1.05rem;
  background: #fff;
  box-shadow: 0 .8rem 2.8rem #12384038;
}

.support-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .7rem;
  flex: none;
  padding: .75rem 1rem;
  background: #123840;
  color: #fff;
}

.support-heading h2,
.support-heading p {
  margin: 0;
  color: inherit;
}

.support-heading h2 {
  font-size: 1rem;
  line-height: 1.6;
}

.support-heading p {
  font-size: .75rem;
  color: #d8eceb;
}

.support-close {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  flex: none;
  border: 1px solid #78a0a3;
  border-radius: .55rem;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.support-close:hover {
  background: #ffffff20;
}

.support-close:focus-visible {
  outline-color: #fff;
}

.support-conversation {
  min-height: 4.5rem;
  padding: .8rem 1rem;
  overflow: auto;
  overscroll-behavior: contain;
  background: #f5f8f7;
}

.support-log {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.support-message {
  align-self: flex-start;
  max-width: 95%;
  margin: 0;
  padding: .55rem .7rem;
  border: 1px solid #e0e8e6;
  border-radius: .65rem;
  background: #fff;
  color: #17363a;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.support-message-visitor {
  align-self: flex-end;
  border-color: #c9e2dd;
  background: #e4f1ef;
}

.support-answer-links {
  display: grid;
  gap: .25rem;
  margin-top: .65rem;
  padding-top: .45rem;
  border-top: 1px solid #e0e8e6;
  font-size: .8rem;
}

.support-answer-links a {
  color: #14544d;
  text-decoration: underline;
  text-underline-offset: .15em;
}

.support-legal-notice {
  display: block;
  margin-top: .55rem;
  color: #425c60;
  font-size: .76rem;
}

.support-quick {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.support-quick:not(:empty) {
  margin-top: .6rem;
}

.support-choice {
  min-height: 2.45rem;
  padding: .24rem .65rem;
  border: 1px solid #97b7b2;
  border-radius: .7rem;
  background: #fff;
  color: #184d48;
  font: inherit;
  font-size: .84rem;
  text-align: start;
  cursor: pointer;
}

.support-choice:hover {
  background: #e4f1ef;
}

.support-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .45rem;
  padding: .65rem 1rem .3rem;
}

.support-suggestions {
  grid-column: 1 / -1;
  max-height: min(14rem, calc(var(--support-viewport, 100dvh) / 3));
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #94b0b0;
  border-radius: .6rem;
  background: #fff;
}

.support-suggestion {
  display: block;
  width: 100%;
  min-height: 2.75rem;
  padding: .45rem .7rem;
  border: 0;
  border-bottom: 1px solid #e0e8e6;
  background: transparent;
  color: #17363a;
  font: inherit;
  font-size: .84rem;
  text-align: start;
  cursor: pointer;
}

.support-suggestion:hover,
.support-suggestion[aria-selected="true"] {
  background: #e4f1ef;
}

.support-form input,
.support-admin input:not([type="checkbox"]),
.support-admin textarea,
.support-admin select {
  box-sizing: border-box;
  width: 100%;
  min-height: 2.75rem;
  padding: .48rem .65rem;
  border: 1px solid #94b0b0;
  border-radius: .55rem;
  background: #fff;
  color: #102e35;
  font: inherit;
}

.support-form input {
  font-size: 1rem;
}

.support-send {
  min-height: 2.75rem;
  padding: .4rem .85rem;
  border: 0;
  border-radius: .55rem;
  background: #123840;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.support-send:disabled,
.support-admin button:disabled {
  opacity: .6;
  cursor: wait;
}

.support-note {
  margin: .15rem 1rem;
  color: #425c60;
  font-size: .73rem;
}

.support-contact {
  display: flex;
  flex-wrap: wrap;
  column-gap: .8rem;
  padding: .2rem 1rem .5rem;
}

.support-contact a {
  display: inline-flex;
  align-items: center;
  min-height: 2.35rem;
  color: #14544d;
  font-size: .84rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .15em;
}

.support-admin {
  max-width: 55rem;
}

.support-admin-toolbar,
.support-admin-form {
  display: grid;
  gap: .65rem;
}

.support-admin-toolbar {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.support-admin-toolbar label {
  grid-column: 1 / -1;
}

.support-admin-form {
  margin-top: 1.2rem;
  padding: clamp(.9rem, 3vw, 1.5rem);
  border: 1px solid #cbd9d8;
  border-radius: .8rem;
  background: #f5f8f7;
}

.support-admin-form .button {
  justify-self: start;
}

.support-admin textarea {
  resize: vertical;
}

.support-admin label {
  font-weight: 700;
}

.support-admin-hint {
  margin: 0;
  color: #456367;
  font-size: .86rem;
}

.support-admin-options {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: .7rem 1.25rem;
  margin-block: .25rem;
}

.support-admin-options div {
  width: 8rem;
}

.support-admin-options input[type="number"] {
  margin-top: .25rem;
}

.support-admin-check {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  gap: .45rem;
}

.support-admin-status {
  min-height: 1.75rem;
  margin-top: .6rem;
  color: #13533e;
}

.support-admin-error {
  color: #9a2020;
}

@media (max-width: 520px) {
  .support-widget {
    inset-inline-end: max(.75rem, env(safe-area-inset-left, 0px));
  }

  .support-action {
    min-width: 3rem;
    min-height: 3rem;
    padding-inline: .65rem;
  }

  .support-panel {
    width: min(24rem, calc(100vw - 1.5rem));
  }

  .support-choice {
    min-height: 2.75rem;
  }
}

@media (max-width: 375px) {
  .support-trigger span {
    display: none;
  }

  .support-admin-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }
}
