* {
  box-sizing: border-box;
}

:root {
  --green-950: #184b28;
  --green-900: #1f5c2e;
  --green-800: #2b7a3d;
  --green-700: #329148;
  --green-600: #3ea455;
  --green-100: #e9f5ed;
  --green-050: #f6fbf7;
  --text-900: #1f2a22;
  --text-700: #53655a;
  --border: #d7e7db;
  --white: #ffffff;
  --shadow: 0 14px 40px rgba(31, 92, 46, 0.12);
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background:
    radial-gradient(circle at top left, #edf8ef 0%, #f8fbf9 45%, #f2f6f3 100%);
  color: var(--text-900);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 18px;
}

.app-shell {
  width: 100%;
  max-width: 540px;
}

.chat-app {
  width: 100%;
  height: 92vh;
  max-height: 940px;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(215, 231, 219, 0.9);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(6px);
}

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  background: linear-gradient(180deg, #fbfdfb 0%, #f6faf7 100%);
}

.message-row {
  display: flex;
  margin-bottom: 14px;
}

.message-row.bot {
  justify-content: flex-start;
  align-items: flex-start;
  gap: 8px;
}

.message-avatar {
  width: 30px;
  height: 30px;
  min-width:30px;
  min-height: 30px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  flex-shrink: 0;
  border: 1px solid #d7e7db;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.message-row.user {
  justify-content: flex-end;
}

.bubble {
  max-width: 84%;
  padding: 14px 16px;
  border-radius: 20px;
  line-height: 1.5;
  font-size: 14px;
  white-space: pre-line;
}

.bubble.bot {
  background: linear-gradient(135deg, var(--green-700), var(--green-800));
  color: var(--white);
  border-bottom-left-radius: 8px;
  box-shadow: 0 8px 18px rgba(50, 145, 72, 0.16);
}

.bubble.user {
  background: var(--white);
  color: var(--text-900);
  border: 1px solid var(--border);
  border-bottom-right-radius: 8px;
  box-shadow: 0 6px 16px rgba(31, 42, 34, 0.06);
}

.options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  margin: 4px 0 22px;
}

.option-btn,
.nav-btn,
.submit-btn {
  border: none;
  border-radius: 999px;
  padding: 11px 16px;
  cursor: pointer;
  font-size: 14px;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.option-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  color: var(--green-900);
  border: 1px solid #c9decf;
  box-shadow: 0 6px 12px rgba(50, 145, 72, 0.08);
  font-weight: 600;
}

.option-btn:hover {
  background: var(--green-100);
  transform: translateY(-1px);
}

.option-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green-100);
  color: var(--green-900);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.chat-footer {
  display: flex;
  gap: 10px;
  padding: 14px 16px 16px;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid #e4efe7;
}

.nav-btn,
.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  background: linear-gradient(135deg, var(--green-800), var(--green-950));
  color: var(--white);
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(43, 122, 61, 0.18);
}

.nav-btn.secondary {
  background: #eef5f0;
  color: var(--green-900);
  box-shadow: none;
  border: 1px solid #d7e7db;
}

.nav-btn:hover,
.submit-btn:hover {
  transform: translateY(-1px);
}

.nav-btn:disabled {
  background: #d7e4da;
  color: #7a8d80;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-icon {
  font-size: 14px;
  line-height: 1;
}

.contact-panel {
  border-top: 1px solid #e3eee6;
  background: linear-gradient(180deg, #ffffff 0%, #f9fcfa 100%);
  padding: 16px;
}

.contact-panel h3 {
  margin: 0;
  font-size: 18px;
  color: var(--green-900);
}

.panel-subtitle {
  margin: 6px 0 14px;
  font-size: 13px;
  color: var(--text-700);
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.contact-panel input,
.contact-panel textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #cfe0d4;
  font-size: 14px;
  background: var(--white);
}

.contact-panel input:focus,
.contact-panel textarea:focus {
  outline: none;
  border-color: var(--green-700);
  box-shadow: 0 0 0 3px rgba(50, 145, 72, 0.12);
}

.contact-panel textarea {
  min-height: 96px;
  resize: vertical;
  margin-top: 10px;
}

.submit-btn {
  margin-top: 12px;
  width: 100%;
}

.hidden {
  display: none;
}

#formMessage {
  margin-top: 10px;
  font-size: 14px;
  color: var(--green-900);
}

@media (max-width: 640px) {
  body {
    padding: 0;
  }

  .app-shell {
    max-width: 100%;
  }

  .chat-app {
    height: 100vh;
    max-height: none;
    border-radius: 0;
    border: none;
  }
}

 .chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--green-800), var(--green-950));
  color: var(--white);
  position: relative;
}

.chat-header::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.brand-copy {
  position: relative;
  z-index: 1;
}

.brand-copy h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
}

.brand-copy p {
  margin: 4px 0 0;
  font-size: 13px;
  opacity: 0.92;
}
html.embed-mode .chat-header,
html.embed-mode .welcome-strip {
  display: none !important;
}

html.embed-mode body {
  padding: 0 !important;
}

html.embed-mode .app-shell {
  width: 100% !important;
  max-width: 100% !important;
}

html.embed-mode .chat-app {
  height: 100vh !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
}