.md-chatbot {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 999999;
  width: calc(100% - 32px);
  max-width: 360px;
}

.md-chatbot__launcher {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-radius: 999px;
  background: #004182;
  color: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.md-chatbot__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex: 1 1 auto;
  border: 0;
  border-radius: 999px 0 0 999px;
  padding: 14px 20px;
  background: transparent;
  color: inherit;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
}

.md-chatbot__toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.md-chatbot__toggle-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  color: #fff;
}

.md-chatbot__toggle-label {
  display: inline-block;
  color: #fff;
}

.md-chatbot__panel {
  margin-top: 12px;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.md-chatbot__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  background: #f2efec;
  color: #231f20;
}

.md-chatbot__header-main {
  flex: 1;
  min-width: 0;
}

.md-chatbot__header-title {
  display: block;
}

.md-chatbot__header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.md-chatbot__language {
  position: relative;
}

.md-chatbot__language--launcher {
  flex: 0 0 auto;
  display: flex;
}

.md-chatbot__language-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0 999px 999px 0;
  padding: 6px 12px;
  background: transparent;
  color: inherit;
}

.md-chatbot__language-menu {
  position: absolute;
  right: 0;
  z-index: 10001;
  display: grid;
  min-width: 150px;
  gap: 4px;
  padding: 8px;
  border: 1px solid #e1dad4;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.md-chatbot:not(.is-open) .md-chatbot__language-menu {
  top: auto;
  bottom: calc(100% + 8px);
}

.md-chatbot.is-open .md-chatbot__language-menu {
  top: calc(100% + 8px);
  bottom: auto;
}

.md-chatbot__language-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
  background: transparent;
  color: #231f20;
  text-align: left;
}

.md-chatbot__language-option.is-active,
.md-chatbot__language-option:hover,
.md-chatbot__language-option:focus {
  background: #f6f4f2;
}

.md-chatbot__language-caret {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: translateY(-1px) rotate(45deg);
}

.md-chatbot__flag {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 2px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 90%;
  /* box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); */
  flex: 0 0 22px;
}

.md-chatbot__flag--bs {
  background-image: url("https://tivat.travel/wp-content/themes/maivdigital/imgs/mne-flag.png");
}

.md-chatbot__flag--en {
  background-image: url("https://tivat.travel/wp-content/themes/maivdigital/imgs/uk-flag.png");
}

.md-chatbot__close {
  border: 0;
  background: transparent;
  color: #231f20;
  font-size: 22px;
  line-height: 1;
}

.md-chatbot__messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 320px;
  padding: 16px;
  overflow-y: auto;
  background: #fcfcfb;
}

.md-chatbot__message {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
}

.md-chatbot__message--bot {
  align-self: flex-start;
  background: #edeae6;
  color: #231f20;
}

.md-chatbot__message--bot a {
  display: inline-block;
  font-weight: bold;
  text-decoration: none;
}

.md-chatbot__message--user {
  align-self: flex-end;
  background: #296647;
  color: #fff;
}

.md-chatbot__suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 16px;
  background: #fcfcfb;
}

.md-chatbot__suggestions[hidden] {
  display: none;
}

.md-chatbot__suggestion {
  border: 1px solid #e1dad4;
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
  color: #231f20;
  font-size: 13px;
  line-height: 1.3;
  transition: all 0.3s ease;
}

.md-chatbot__suggestion:hover,
.md-chatbot__suggestion:focus {
  background: #f6f4f2;
  color: #231f20;
  transition: all 0.3s ease;
}

.md-chatbot__form {
  display: flex;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid #edeae6;
  background: #fff;
}

.md-chatbot__input {
  flex: 1;
  min-width: 0;
  border: 1px solid #e1dad4;
  border-radius: 999px;
  padding: 12px 14px;
  background: #fff;
  color: #231f20;
  font-size: 14px;
}

.md-chatbot__submit {
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  background: #004182;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.md-chatbot__submit:hover,
.md-chatbot__submit:focus {
  background: #004182;
  color: #fff;
  transition: all 0.3s ease;
}

@media (max-width: 767px) {
  .md-chatbot {
    right: 16px;
    bottom: 16px;
    width: calc(100% - 32px);
  }

  .md-chatbot__launcher {
    gap: 0;
  }

  .md-chatbot__toggle {
    padding: 12px 16px;
    font-size: 15px;
  }

  .md-chatbot__language-toggle {
    padding: 6px 10px;
  }

  .md-chatbot__header {
    align-items: flex-start;
  }

  .md-chatbot__header-actions {
    gap: 8px;
  }

  .md-chatbot__messages {
    max-height: 260px;
  }

  .md-chatbot__form {
    flex-wrap: wrap;
  }

  .md-chatbot__submit {
    width: 100%;
  }
}
