.rk-chatbot {
  position: fixed;
  right: 24px;
  bottom: 76px;
  z-index: 1100;
  color: var(--rk-text);
  font-family: "Poppins", Arial, Helvetica, sans-serif;
}

.rk-chatbot-launcher {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 18px 10px 11px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: var(--rk-green-dark);
  box-shadow: var(--rk-shadow-md);
  color: var(--rk-cream);
  font-size: 0.96rem;
  font-weight: 600;
  cursor: pointer;
}

.rk-chatbot-launcher:hover,
.rk-chatbot-launcher:focus-visible {
  background: var(--rk-green);
  color: #fff;
}

.rk-chatbot-launcher-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--rk-gold);
  color: var(--rk-green-deep);
  font-size: 1.1rem;
  font-weight: 700;
}

.rk-chatbot-panel {
  position: absolute;
  right: 0;
  bottom: 66px;
  display: flex;
  width: min(390px, calc(100vw - 32px));
  max-height: min(650px, calc(100vh - 120px));
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--rk-border);
  border-radius: var(--rk-radius);
  background: var(--rk-surface);
  box-shadow: 0 20px 52px rgba(7, 53, 35, 0.24);
}

.rk-chatbot-panel[hidden] {
  display: none;
}

.rk-chatbot-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 16px;
  border-bottom: 3px solid var(--rk-gold);
  background: var(--rk-green-dark);
}

.rk-chatbot-header h2,
.rk-chatbot-header p {
  margin: 0;
  color: var(--rk-cream);
}

.rk-chatbot-header h2 {
  font-size: 1.28rem;
}

.rk-chatbot-header .rk-chatbot-eyebrow {
  margin-bottom: 2px;
  color: #e7c47e;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-transform: uppercase;
}

.rk-chatbot-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
}

.rk-chatbot-close:hover,
.rk-chatbot-close:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

.rk-chatbot-messages {
  min-height: 170px;
  overflow-y: auto;
  padding: 18px;
  background: var(--rk-cream);
}

.rk-chatbot-message {
  width: fit-content;
  max-width: 88%;
  margin-bottom: 12px;
  padding: 11px 13px;
  border: 1px solid var(--rk-border);
  border-radius: 12px;
  background: #fff;
}

.rk-chatbot-message p {
  margin: 0;
  color: var(--rk-text);
  font-size: 0.94rem;
  line-height: 1.55;
}

.rk-chatbot-message a {
  color: var(--rk-green-dark);
  font-weight: 600;
  text-decoration: underline;
}

.rk-chatbot-message--visitor {
  margin-left: auto;
  border-color: rgba(23, 107, 69, 0.25);
  background: var(--rk-green-soft);
}

.rk-chatbot-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 12px 16px 4px;
  background: var(--rk-surface);
}

.rk-chatbot-questions button {
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid rgba(23, 107, 69, 0.28);
  border-radius: 999px;
  background: var(--rk-cream);
  color: var(--rk-green-dark);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.rk-chatbot-questions button:hover,
.rk-chatbot-questions button:focus-visible {
  border-color: var(--rk-gold);
  background: var(--rk-cream-deep);
}

.rk-chatbot-form {
  padding: 12px 16px 8px;
}

.rk-chatbot-form label {
  display: block;
  margin-bottom: 6px;
  color: var(--rk-text);
  font-size: 0.88rem;
  font-weight: 600;
}

.rk-chatbot-form-row {
  display: flex;
  gap: 8px;
}

.rk-chatbot-form-row input {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 8px 12px;
  border: 1px solid #bbb5a9;
  border-radius: var(--rk-radius-sm);
  background: #fff;
  color: var(--rk-text);
  font-size: 1rem;
}

.rk-chatbot-form-row button {
  min-width: 76px;
  min-height: 46px;
  padding: 8px 14px;
  border: 1px solid var(--rk-green-dark);
  border-radius: var(--rk-radius-sm);
  background: var(--rk-green-dark);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.rk-chatbot-form-row button:hover,
.rk-chatbot-form-row button:focus-visible {
  background: var(--rk-green);
}

.rk-chatbot-form-row button:disabled,
.rk-chatbot-form-row input:disabled {
  cursor: wait;
  opacity: 0.68;
}

.rk-chatbot-status {
  min-height: 20px;
  margin: 5px 0 0;
  color: var(--rk-muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.rk-chatbot-privacy {
  margin: 0;
  padding: 0 16px 14px;
  color: var(--rk-muted);
  font-size: 0.74rem;
  line-height: 1.45;
}

@media only screen and (max-width: 575px) {
  .rk-chatbot {
    right: 12px;
    bottom: 70px;
  }

  .rk-chatbot-panel {
    position: fixed;
    right: 12px;
    bottom: 136px;
    left: 12px;
    width: auto;
    max-height: calc(100vh - 156px);
  }

  .rk-chatbot-launcher {
    min-height: 50px;
  }

  .rk-chatbot-messages {
    min-height: 140px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rk-chatbot *,
  .rk-chatbot *::before,
  .rk-chatbot *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
