#chat-widget {
  position: relative;
  z-index: 9999999999;
}

#userform-container {
  position: fixed;
  z-index: 9999999999;
  right: 40px;
  bottom: 0px;
  margin-bottom: 30px;
  color: var(--base-accent);
}

.hide {
  display: none;
}

#userform {
  display: flex;
  padding: 32px;
  flex-direction: column;
  gap: 16px;
  background: var(--accent-10);
  width: 450px;
  border-radius: 12px;
  margin-bottom: 20px;
  box-sizing: border-box;
}

#userform,
#userform * {
  box-sizing: border-box;
}

#userform.hide {
  display: none;
}

#userform h2 {
  color: var(--accent-contrast);
  text-align: center;
  font-family: var(--launcher-font-family);
  font-size: 18px;
  font-style: normal;
  font-weight: 700;
  line-height: 19.84px;
  text-align: start;
  margin-bottom: 16px;
  /*    resets global styling;*/
  margin-top: unset;
  border-bottom: unset;
  text-transform: unset;
}

#userform label {
  /*    resets global styling;*/
  width: unset;
  margin: unset;
  vertical-align: unset;
}

#userform input {
  display: flex;
  padding: 8px 10px;
  flex-direction: column;
  align-items: inherit;
  gap: 8px;
  align-self: stretch;
  border-radius: 3px;
  border: 1px solid transparent;
  width: 100%;
  color: var(--muted-color);
  font-family: var(--launcher-font-family);
  font-size: 12px;
  font-style: normal;
  line-height: normal;
  font-weight: 400;
  /*    resets global styling;*/
  height: unset;
  line-height: unset;
}

#userform select {
  display: flex;
  padding: 8px 30px 8px 10px;
  flex-direction: column;
  align-items: inherit;
  gap: 8px;
  align-self: stretch;
  border-radius: 3px;
  border: 1px solid transparent;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  color: var(--muted-color);
  font-family: var(--launcher-font-family);
  font-size: 12px;
  font-style: normal;
  line-height: normal;
  font-weight: 400;
  appearance: none;
  -moz-appearance: none;
  -webkit-appearance: none;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 4.5L6 8L9.5 4.5' stroke='%23838383' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  /*    resets global styling;*/
  height: unset;
  line-height: unset;
}

#userform input::placeholder,
#userform select:has(> option[value=""]:checked) {
  color: var(--muted-color, #636c72);
}

#userform option {
  font-size: 12px;
  color: var(--muted-color);
  box-sizing: border-box;
  max-width: 100%;
  width: 100%;
}

#userform button {
  border-radius: var(--size-2, 12px);
  background: var(--general-button-default-background);
  min-width: 192px;
  padding: 4px 14px;
  color: var(--general-button-default-color, var(--accent-contrast));
  text-align: center;
  font-family: var(--launcher-font-family);
  font-size: var(--font-size-3, 14px);
  font-style: normal;
  font-weight: 600;
  line-height: 32px;
  width: 100%;
  /*    resets global styling;*/
  height: unset;
  margin: unset;
  border: unset;
  text-transform: unset;
}

#userform button:hover {
  background: var(--general-button-hover-background);
  color: var(--general-button-hover-color);
}

#userform-button {
  width: 80px;
  height: 80px;
  float: right;
}

#userform-button button {
  width: 100%;
  height: 100%;
  cursor: pointer;
  outline: none;
  padding: 0;
  border-radius: 40px;
  border: 6px solid var(--launcher-default-border-color);
  background: var(--launcher-default-background);
  /*    resets global styling;*/
  min-width: unset;

  /* launcher/shadow */
  box-shadow:
    0 0 1px 0 rgba(0, 0, 0, 0.04),
    0 2px 6px 0 rgba(0, 0, 0, 0.04),
    5px 10px 20px 0 rgba(0, 0, 0, 0.05),
    5px 10px 10px 0 rgba(0, 0, 0, 0.05);
}

/*  resets global styling for button shadow*/
#userform-button button:focus:before,
#userform-button button:hover:before {
  background-color: unset;
}

#userform-button svg {
  fill: var(--launcher-default-color);
  background: var(--launcher-default-background);
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  vertical-align: middle;
}

#userform-button.minimized svg#chat {
  transform: scale(0.46);
  opacity: 1;
}

#userform-button.minimized svg#minimize {
  transform: scale(0);
  opacity: 0;
  display: none;
}

#userform-button.show-form svg#chat {
  transform: scale(0);
  opacity: 0;
  display: none;
}

#userform-button.show-form svg#minimize {
  transform: scale(0.46);
  opacity: 1;
}

#userform-button svg#loader {
  display: none;
}

#userform-button.loading svg#chat,
#userform-button.loading svg#minimize {
  display: none !important;
  opacity: 0;
}

#userform-button.loading svg#loader {
  display: block;
  width: 50%;
  height: 50%;
  margin: 25% auto;
  stroke: var(--launcher-default-color, #000);
}

.fixed {
  position: fixed;
  bottom: 50px;
  right: 50px;
}

@media (max-width: 600px), (max-height: 600px) {
  #userform {
    width: 260px;
    max-width: calc(100vw - 40px);
    padding: 20px;
    box-sizing: border-box;
  }

  #userform input {
    font-size: 16px;
    padding: 4px 5px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
  }

  #userform select {
    font-size: 16px;
    padding: 4px 30px 4px 5px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
  }

  #userform option {
    font-size: 16px;
    box-sizing: border-box;
    max-width: 100%;
    width: 100%;
  }

  html.chat-open,
  body.chat-open {
    overflow: hidden;
    /* iOS ignores overflow:hidden when the keyboard is open  */
    position: fixed;
    width: 100%;
  }

  body.chat-open #chat-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    pointer-events: all;
  }
}

/* Fix cookie control dialog overlap */
#ccc:not(:has(#ccc-module)) {
  z-index: 99998 !important;
}

/* Fallback for browsers that don't support :has() selector */
@supports not (selector(:has(*))) {
  #ccc {
    z-index: 99998 !important;
  }
}
