.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cpt-chatbot {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  font-family: inherit;
  color: var(--ink, #19231f);
}

.cpt-chatbot * {
  box-sizing: border-box;
}

.cpt-chatbot [hidden] {
  display: none !important;
}

.cpt-chatbot-launcher {
  width: 66px;
  height: 66px;
  position: relative;
  display: block;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  color: #f8e3b6;
  background: #213d34;
  box-shadow: 0 18px 45px rgba(25, 35, 31, 0.24);
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.cpt-chatbot-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 55px rgba(25, 35, 31, 0.3);
}

.cpt-chatbot-launcher:focus-visible,
.cpt-chatbot button:focus-visible,
.cpt-chatbot input:focus-visible {
  outline: 4px solid rgba(242, 192, 108, 0.46);
  outline-offset: 3px;
}

.cpt-launcher-icon {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.22), transparent 34%),
    linear-gradient(135deg, #284a3f, #172820);
}

.cpt-launcher-badge {
  position: absolute;
  top: -6px;
  right: -5px;
  min-width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border: 2px solid #fffdf8;
  border-radius: 999px;
  color: #ffffff;
  background: #d43d3d;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
}

.cpt-launcher-status {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 15px;
  height: 15px;
  border: 2px solid #fffdf8;
  border-radius: 999px;
  background: #1ca96d;
}

.cpt-launcher-hint {
  position: absolute;
  right: 74px;
  bottom: 12px;
  width: max-content;
  max-width: 180px;
  padding: 9px 12px;
  border: 1px solid rgba(33, 61, 52, 0.12);
  border-radius: 999px;
  color: #213d34;
  background: #fffdf8;
  box-shadow: 0 14px 35px rgba(25, 35, 31, 0.14);
  font-size: 0.86rem;
  font-weight: 800;
  white-space: nowrap;
}

.cpt-chatbot-nudge {
  width: min(360px, calc(100vw - 36px));
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid rgba(33, 61, 52, 0.14);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.98);
  box-shadow: 0 24px 70px rgba(25, 35, 31, 0.18);
  animation: cptChatRise 220ms ease both;
}

.cpt-chatbot-nudge p {
  margin: 0 0 12px;
  color: #25322d;
  line-height: 1.45;
}

.cpt-chatbot-nudge div {
  display: flex;
  gap: 8px;
}

.cpt-mini-primary,
.cpt-mini-quiet,
.cpt-chatbot-actions button,
.cpt-chatbot-input button,
.cpt-chatbot-footer button {
  min-height: 40px;
  border: 1px solid rgba(33, 61, 52, 0.14);
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.cpt-mini-primary,
.cpt-primary-action,
.cpt-chatbot-input button {
  color: #141b18;
  background: #f2c06c;
}

.cpt-mini-quiet {
  color: #26342f;
  background: #ffffff;
}

.cpt-chatbot-panel {
  width: min(420px, calc(100vw - 36px));
  max-height: min(720px, calc(100vh - 46px));
  display: grid;
  grid-template-rows: auto minmax(180px, 1fr) auto auto auto;
  overflow: hidden;
  border: 1px solid rgba(33, 61, 52, 0.15);
  border-radius: 18px;
  background: #fffdf8;
  box-shadow: 0 30px 90px rgba(25, 35, 31, 0.28);
  animation: cptChatRise 220ms ease both;
}

.cpt-chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 16px 14px;
  color: #fffdf8;
  background: #213d34;
}

.cpt-chatbot-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cpt-chatbot-header span {
  display: block;
  margin-bottom: 2px;
  color: #f2c06c;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.cpt-chatbot-header h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.05rem;
  line-height: 1.2;
}

.cpt-icon-button {
  width: 40px;
  height: 40px;
  border-color: rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.6rem;
  line-height: 1;
}

.cpt-chatbot-log {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 16px;
  background:
    linear-gradient(rgba(255, 253, 248, 0.94), rgba(255, 253, 248, 0.94)),
    radial-gradient(circle at 20% 0%, rgba(200, 149, 69, 0.12), transparent 34%);
}

.cpt-message {
  width: fit-content;
  max-width: 92%;
  padding: 11px 13px;
  border-radius: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.cpt-message.is-bot {
  align-self: flex-start;
  border: 1px solid rgba(33, 61, 52, 0.12);
  color: #26342f;
  background: #ffffff;
}

.cpt-message.is-user {
  align-self: flex-end;
  color: #ffffff;
  background: #527568;
}

.cpt-message pre {
  margin: 0;
  font: inherit;
  white-space: pre-wrap;
}

.cpt-chatbot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(33, 61, 52, 0.1);
  background: #fbfaf6;
}

.cpt-chatbot-actions.is-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cpt-chatbot-actions button {
  flex: 1 1 auto;
  padding: 10px 12px;
  color: #213d34;
  background: #ffffff;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.cpt-chatbot-actions button:hover {
  transform: translateY(-1px);
  border-color: rgba(200, 149, 69, 0.45);
  box-shadow: 0 10px 24px rgba(25, 35, 31, 0.08);
}

.cpt-chatbot-actions button.is-selected {
  border-color: #c89545;
  background: #f6ead3;
}

.cpt-contact-fields {
  width: 100%;
  display: grid;
  gap: 8px;
}

.cpt-contact-fields label,
.cpt-consent-check {
  width: 100%;
  display: grid;
  gap: 6px;
  color: #33433c;
  font-size: 0.92rem;
  font-weight: 800;
}

.cpt-contact-fields input {
  min-height: 44px;
  width: 100%;
  border: 1px solid rgba(33, 61, 52, 0.16);
  border-radius: 8px;
  padding: 10px 12px;
  color: #19231f;
  background: #ffffff;
}

.cpt-consent-check {
  grid-template-columns: auto 1fr;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid rgba(33, 61, 52, 0.12);
  border-radius: 10px;
  background: #ffffff;
  line-height: 1.4;
}

.cpt-chatbot-input {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 0 16px 14px;
  background: #fbfaf6;
}

.cpt-chatbot-input[hidden] {
  display: none;
}

.cpt-chatbot-input input {
  min-height: 44px;
  min-width: 0;
  border: 1px solid rgba(33, 61, 52, 0.16);
  border-radius: 8px;
  padding: 10px 12px;
  color: #19231f;
  background: #ffffff;
}

.cpt-chatbot-input button {
  padding: 0 14px;
}

.cpt-chatbot-footer {
  display: grid;
  gap: 8px;
  padding: 12px 16px 14px;
  border-top: 1px solid rgba(33, 61, 52, 0.1);
  color: #65726b;
  background: #fffdf8;
}

.cpt-chatbot-footer p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.35;
}

.cpt-chatbot-footer button {
  min-height: 34px;
  padding: 6px 10px;
  color: #213d34;
  background: #ffffff;
}

.cpt-chatbot-footer button:disabled {
  opacity: 0.72;
  cursor: default;
}

@keyframes cptChatRise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .cpt-chatbot {
    right: 10px;
    bottom: 86px;
    left: 10px;
  }

  .cpt-chatbot-launcher {
    width: 60px;
    height: 60px;
    margin-left: auto;
  }

  .cpt-launcher-hint {
    right: 66px;
    bottom: 10px;
    max-width: 142px;
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  .cpt-chatbot-nudge {
    width: 100%;
    margin-left: auto;
  }

  .cpt-chatbot-panel {
    width: 100%;
    max-height: calc(100vh - 176px);
    border-radius: 18px 18px 12px 12px;
    grid-template-rows: auto minmax(180px, 1fr) auto auto auto;
  }

  .cpt-chatbot-log {
    padding: 14px;
  }

  .cpt-chatbot-actions {
    padding: 10px 14px;
  }

  .cpt-chatbot-actions button {
    min-height: 46px;
  }

  .cpt-chatbot-actions.is-summary {
    grid-template-columns: 1fr;
  }

  .cpt-chatbot-input {
    padding: 0 14px 12px;
  }
}

@media (max-width: 380px) {
  .cpt-launcher-hint {
    display: none;
  }
}
