/* AI-bot conversational registration widget — full-page messenger look */

.bot-page {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(197, 29, 56, 0.10), transparent 60%),
    radial-gradient(1000px 500px at -10% 110%, rgba(163, 21, 47, 0.10), transparent 60%),
    linear-gradient(160deg, #faf5f6 0%, #f2eef0 100%);
}

.bot-chat {
  width: 100%;
  height: 100%;
  max-width: 760px;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 60px rgba(80, 20, 35, 0.10);
  overflow: hidden;
}

@media (min-width: 860px) {
  .bot-chat {
    height: calc(100% - 48px);
    margin: 24px auto;
    border-radius: 22px;
    border: 1px solid rgba(197, 29, 56, 0.08);
  }
}

/* ---------- Header ---------- */
.bot-chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: linear-gradient(135deg, #e0364f 0%, #C51D38 55%, #a3152f 100%);
  color: #fff;
  box-shadow: 0 2px 14px rgba(163, 21, 47, 0.28);
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.bot-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.bot-chat-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  border: 2px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.bot-online {
  position: absolute;
  bottom: 0;
  inset-inline-end: -1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #2fd071;
  border: 2px solid #fff;
}

.bot-chat-title {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.bot-chat-subtitle {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  opacity: 0.92;
}

.bot-chat-subtitle .bot-online-text {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2fd071;
  display: inline-block;
}

.bot-progress {
  margin-inline-start: auto;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 4px 12px;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

/* ---------- Messages area ---------- */
.bot-messages {
  flex: 1 1 auto;
  padding: 20px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(197, 29, 56, 0.035), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(197, 29, 56, 0.04), transparent 45%),
    #f7f5f6;
}

.bot-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 82%;
}

.bot-row.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.bot-bubble {
  position: relative;
  padding: 10px 15px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.55;
  word-break: break-word;
  white-space: pre-wrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.bot-row.bot .bot-bubble {
  background: #fff;
  color: #2c2c2c;
  border: 1px solid #f0e7e9;
  border-start-start-radius: 5px;
  border-end-end-radius: 18px;
}

/* bot bubble tail */
.bot-row.bot .bot-bubble::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline-start: -6px;
  border-width: 0 0 12px 12px;
  border-style: solid;
  border-color: transparent transparent #fff transparent;
  transform: scaleX(-1);
}

.bot-row.user .bot-bubble {
  background: linear-gradient(135deg, #d92b46 0%, #C51D38 100%);
  color: #fff;
  border-start-end-radius: 5px;
  border-end-start-radius: 18px;
}

/* user bubble tail */
.bot-row.user .bot-bubble::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline-end: -6px;
  border-width: 0 12px 12px 0;
  border-style: solid;
  border-color: transparent #C51D38 transparent transparent;
  transform: scaleX(-1);
}

/* ---------- Typing indicator ---------- */
.bot-typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 13px 16px;
}

.bot-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c9c2c4;
  animation: botBlink 1.2s infinite ease-in-out;
}

.bot-typing span:nth-child(2) {
  animation-delay: 0.18s;
}

.bot-typing span:nth-child(3) {
  animation-delay: 0.36s;
}

@keyframes botBlink {
  0%, 80%, 100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

/* ---------- Quick replies ---------- */
.bot-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 16px 10px;
  background: #fff;
}

.bot-chip {
  background: #fff;
  color: #C51D38;
  border: 1.5px solid rgba(197, 29, 56, 0.55);
  border-radius: 22px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(197, 29, 56, 0.08);
  transition: all 0.2s ease;
}

.bot-chip:hover {
  background: #C51D38;
  color: #fff;
  border-color: #C51D38;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(197, 29, 56, 0.25);
}

.bot-chip:active {
  transform: translateY(0);
}

.bot-chip:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ---------- Input bar ---------- */
.bot-input-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 14px;
  border-top: 1px solid #f0e7e9;
  background: #fff;
  flex-shrink: 0;
}

.bot-input {
  flex: 1;
  height: 46px;
  border-radius: 24px;
  border: 1px solid #e4dadd;
  background: #faf7f8;
  color: #2c2c2c;
  font-size: 15px;
  font-weight: 500;
  padding: 0 18px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.bot-input::placeholder {
  color: #b3a7ab;
  font-size: 15px;
  font-weight: 400;
}

.bot-input:focus {
  outline: none;
  border-color: #C51D38;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(197, 29, 56, 0.12);
}

.bot-input:disabled {
  background: #f3eff0;
  border-color: #ece3e5;
  color: #b9aeb1;
}

.bot-send {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #d92b46 0%, #C51D38 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(197, 29, 56, 0.3);
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.bot-send:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(197, 29, 56, 0.35);
}

.bot-send:active {
  transform: translateY(0);
}

.bot-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ---------- Success screen ---------- */
.bot-success {
  text-align: center;
  padding: 8px 0 4px;
  max-width: 100% !important;
}

.bot-success .bot-bubble {
  width: 100%;
  background: #fff !important;
  border: 1px solid #f0e7e9 !important;
  border-radius: 22px !important;
  box-shadow: 0 8px 30px rgba(197, 29, 56, 0.10);
  padding: 34px 24px;
}

.bot-success-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff0f3 0%, #ffe1e6 100%);
  border: 1px solid #f6c8d0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
}

.bot-success h4 {
  font-size: 20px;
  font-weight: 800;
  color: #C51D38;
  margin: 0 0 8px;
}

.bot-success p {
  font-size: 14px;
  color: #6b5f62;
  margin: 0 0 22px;
  line-height: 1.6;
}

.bot-login-link {
  display: inline-block;
  background: linear-gradient(135deg, #d92b46 0%, #C51D38 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 38px;
  border-radius: 26px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(197, 29, 56, 0.28);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.bot-login-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(197, 29, 56, 0.35);
}

@media (max-width: 480px) {
  .bot-chat-title { font-size: 15px; }
  .bot-progress { font-size: 11px; padding: 3px 10px; }
  .bot-messages { padding: 16px 10px; }
  .bot-row { max-width: 88%; }
}
