.novio-chatbot,
.novio-chatbot * { box-sizing: border-box; }

.novio-chatbot {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 999999;
  font-family: inherit;
  color: var(--novio-primary);
}

.novio-chatbot__launcher {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px 18px 8px 8px;
  border: 0;
  border-radius: 999px;
  background: var(--novio-primary);
  color: #fff;
  box-shadow: 0 10px 30px rgba(32, 54, 44, .28);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.novio-chatbot__launcher-logo {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  color: var(--novio-accent);
  font-size: 23px;
  font-weight: 800;
}

.novio-chatbot__panel {
  position: absolute;
  right: 0;
  bottom: 74px;
  width: min(390px, calc(100vw - 28px));
  max-height: min(690px, calc(100vh - 110px));
  overflow: hidden;
  border: 1px solid rgba(53, 91, 73, .16);
  border-radius: 22px;
  background: var(--novio-bg);
  box-shadow: 0 24px 65px rgba(23, 46, 35, .25);
}

.novio-chatbot__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 18px;
  background: var(--novio-primary);
  color: #fff;
}

.novio-chatbot__brand { font-weight: 800; font-size: 17px; }
.novio-chatbot__status { margin-top: 2px; font-size: 12px; opacity: .9; }
.novio-chatbot__status span { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #86d37a; }
.novio-chatbot__close { border: 0; background: transparent; color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }

.novio-chatbot__body {
  max-height: calc(min(690px, calc(100vh - 110px)) - 117px);
  overflow-y: auto;
  padding: 18px;
}

.novio-chatbot__message {
  margin-bottom: 14px;
  padding: 15px;
  border-radius: 16px 16px 16px 5px;
  background: var(--novio-secondary);
  line-height: 1.45;
}
.novio-chatbot__message p { margin: 6px 0 0; }

.novio-chatbot__step { display: grid; gap: 9px; }
.novio-choice,
.novio-submit {
  display: block;
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--novio-primary);
  border-radius: 12px;
  background: var(--novio-primary);
  color: #fff;
  text-align: left;
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, opacity .15s ease;
}
.novio-choice:hover,
.novio-submit:hover { transform: translateY(-1px); opacity: .94; color: #fff; }
.novio-choice--secondary { background: transparent; color: var(--novio-primary); }
.novio-choice--secondary:hover { color: var(--novio-primary); }

.novio-chatbot__form { display: grid; gap: 12px; }
.novio-chatbot__form-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 2px; }
.novio-back { border: 0; padding: 0; background: transparent; color: var(--novio-primary); cursor: pointer; font: inherit; }

.novio-chatbot__form label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; }
.novio-chatbot__form input,
.novio-chatbot__form select,
.novio-chatbot__form textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(53, 91, 73, .28);
  border-radius: 10px;
  background: #fff;
  color: #223c30;
  font: inherit;
  font-weight: 400;
}
.novio-chatbot__form textarea { resize: vertical; }
.novio-chatbot__form input:focus,
.novio-chatbot__form select:focus,
.novio-chatbot__form textarea:focus { outline: 2px solid color-mix(in srgb, var(--novio-accent) 40%, transparent); border-color: var(--novio-accent); }

.novio-consent { grid-template-columns: auto 1fr !important; align-items: start; font-weight: 400 !important; line-height: 1.35; }
.novio-consent input { width: 18px; min-height: 18px; margin-top: 2px; }
.novio-consent a { color: var(--novio-primary); font-weight: 700; }

.novio-submit { text-align: center; }
.novio-submit[disabled] { opacity: .55; cursor: wait; transform: none; }
.novio-chatbot__error { padding: 10px 12px; border-radius: 10px; background: #fde8e8; color: #8b1e1e; font-size: 13px; }
.novio-chatbot__result { padding: 16px; border-radius: 14px; background: var(--novio-secondary); line-height: 1.5; }
.novio-chatbot__result a { display: inline-block; margin-top: 10px; color: var(--novio-primary); font-weight: 800; }

.novio-chatbot__footer {
  padding: 10px 16px;
  border-top: 1px solid rgba(53, 91, 73, .12);
  background: #fff;
  color: var(--novio-primary);
  text-align: center;
  font-size: 12px;
}

@media (max-width: 520px) {
  .novio-chatbot { right: 12px; bottom: 12px; }
  .novio-chatbot__launcher-text { display: none; }
  .novio-chatbot__launcher { padding: 8px; }
  .novio-chatbot__panel { right: 0; bottom: 68px; width: calc(100vw - 24px); max-height: calc(100vh - 92px); }
  .novio-chatbot__body { max-height: calc(100vh - 209px); }
}
