/* =======================================
   AUTO WORLD RENTAL — CHATBOT STYLES
   ======================================= */

/* ── TOGGLE BUTTON ─────────────────────── */

#awr-chatbot-toggle {
  position: fixed;
  right: 40px;
  bottom: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 210px;
  height: 54px;
  padding: 0 22px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #f36b7d, #ef7a58);
  box-shadow: 0 12px 28px rgba(0,0,0,.20);
  z-index: 100000;
  transition: transform .2s ease, box-shadow .2s ease;
  white-space: nowrap;
  animation: awrPulse 3.5s ease-in-out infinite;
}

#awr-chatbot-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(0,0,0,.26);
}

/* ── CHAT WINDOW ────────────────────────── */

#awr-chatbot-box {
  position: fixed;
  right: 24px;
  bottom: 98px;
  width: 384px;
  max-width: calc(100vw - 28px);
  background: #edf0f5;
  border-radius: 24px;
  box-shadow: 0 20px 56px rgba(0,0,0,.18);
  overflow: hidden;
  z-index: 99999;
  display: none;
  flex-direction: column;
  opacity: 0;
  transform: translateY(14px) scale(.97);
  transition: opacity .22s ease, transform .22s ease;
}

#awr-chatbot-box.open {
  display: flex;
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ── HEADER ─────────────────────────────── */

.awr-chatbot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 22px;
  background: linear-gradient(90deg, #5ba8e8, #4388cc);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  flex-shrink: 0;
}

.awr-header-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.awr-header-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #7fffb8;
  box-shadow: 0 0 0 2px rgba(127,255,184,.35);
  flex-shrink: 0;
}

/* Close button — large circular tap target */
.awr-chatbot-close {
  border: none;
  background: rgba(255,255,255,.15);
  color: rgba(255,255,255,.9);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s;
}

.awr-chatbot-close:hover {
  background: rgba(255,255,255,.28);
  color: #fff;
}

/* ── MESSAGES AREA ──────────────────────── */

.awr-chatbot-messages {
  padding: 16px;
  max-height: 480px;
  overflow-y: auto;
  background: #edf0f5;
  flex: 1;
  scroll-behavior: smooth;
}

/* ── CHAT BUBBLES ───────────────────────── */

.awr-msg {
  margin-bottom: 12px;
  border-radius: 20px;
  padding: 14px 18px;
  line-height: 1.55;
  font-size: 15px;
  word-break: break-word;
}

.awr-msg.bot {
  background: #f5f6f8;
  border: 1.5px solid #dde2eb;
  color: #2d3d52;
}

.awr-msg.user {
  background: #4a6fa5;
  color: #fff;
  margin-left: 40px;
  border: none;
}

.awr-msg.bot a {
  color: #2b6cb0;
  font-weight: 700;
  text-decoration: underline;
}

/* ── TYPING INDICATOR ───────────────────── */

.awr-typing {
  display: flex !important;
  align-items: center;
  gap: 5px;
  padding: 16px 20px !important;
  min-width: 60px;
}

.awr-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9aaec4;
  display: inline-block;
  animation: awrBounce 1.2s ease-in-out infinite;
}

.awr-typing span:nth-child(2) { animation-delay: .2s; }
.awr-typing span:nth-child(3) { animation-delay: .4s; }

@keyframes awrBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .6; }
  30%            { transform: translateY(-5px); opacity: 1; }
}

/* ── BOOKING STATE CARD ─────────────────── */

.awr-booking-card {
  margin-top: 12px;
  padding: 10px 14px;
  background: #eef4fb;
  border: 1.5px solid #b8d4ee;
  border-radius: 12px;
}

.awr-booking-card-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #4a7ab5;
  margin-bottom: 8px;
}

.awr-booking-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.awr-booking-table td {
  padding: 3px 0;
  color: #2d3d52;
  vertical-align: top;
}

.awr-booking-table td:first-child {
  color: #6b7f96;
  width: 80px;
  padding-right: 8px;
}

/* ── QUICK BUTTONS ──────────────────────── */

.awr-quick-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}

.awr-qbtn {
  border: none;
  border-radius: 999px;
  padding: 9px 14px;
  background: #f0f3f8;
  color: #345d94;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 0 0 1.5px #cfd8e8;
  transition: background .15s, transform .15s;
  white-space: nowrap;
}

.awr-qbtn:hover {
  background: #e3ecf8;
  transform: translateY(-1px);
}

/* ── FORM / INPUT ───────────────────────── */

.awr-chatbot-form {
  display: flex;
  gap: 10px;
  padding: 14px 16px 10px;
  background: #fff;
  border-top: 1px solid #dce2ec;
  flex-shrink: 0;
}

#awr-chatbot-input {
  flex: 1;
  border: 1.5px solid #d0d8e8;
  border-radius: 20px;
  padding: 13px 16px;
  font-size: 15px;
  outline: none;
  background: #f9fafb;
  transition: border-color .15s;
  min-width: 0;
}

#awr-chatbot-input:focus { border-color: #7aaedd; background: #fff; }

#awr-chatbot-send {
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: #e87558;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, transform .1s;
}

#awr-chatbot-send:hover { background: #d96844; transform: scale(1.06); }
#awr-chatbot-send:active { transform: scale(.97); }
#awr-chatbot-send:disabled { background: #ccc; cursor: not-allowed; transform: none; }

/* ── FOOTER HINT ────────────────────────── */

.awr-chatbot-hint {
  padding: 0 18px 14px;
  background: #fff;
  color: #8898aa;
  font-size: 12px;
  text-align: center;
}

/* ── SCROLLBAR ──────────────────────────── */

.awr-chatbot-messages::-webkit-scrollbar        { width: 5px; }
.awr-chatbot-messages::-webkit-scrollbar-track  { background: transparent; }
.awr-chatbot-messages::-webkit-scrollbar-thumb  { background: #c0c9d6; border-radius: 3px; }

/* ── MOBILE — full-width bottom sheet ──── */

@media (max-width: 640px) {
  #awr-chatbot-box {
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    max-height: 90vh;
    border-radius: 22px 22px 0 0;
  }

  #awr-chatbot-toggle {
    right: 14px;
    bottom: 14px;
    min-width: 180px;
    height: 50px;
    padding: 0 16px;
    font-size: 14px;
  }

  .awr-chatbot-header { font-size: 16px; padding: 18px 20px; }

  .awr-chatbot-close {
    width: 52px;
    height: 52px;
    font-size: 26px;
  }

  .awr-chatbot-messages {
    max-height: none;
    flex: 1;
    padding: 14px;
    -webkit-overflow-scrolling: touch;
  }

  .awr-msg { font-size: 14px; padding: 12px 15px; }
  .awr-msg.user { margin-left: 20px; }

  .awr-chatbot-form {
    padding: 12px 14px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    gap: 8px;
    flex-shrink: 0;
  }

  #awr-chatbot-input { font-size: 15px; padding: 12px 14px; }

  #awr-chatbot-send { width: 44px; height: 44px; }

  .awr-chatbot-hint { flex-shrink: 0; }
}

/* ── ANIMATIONS ─────────────────────────── */

@keyframes awrPulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.035); }
}

/* ── AUTOCOMPLETE SUGGESTIONS ─────────── */

.awr-suggestion {
  padding: 10px 16px;
  font-size: 14px;
  color: var(--awr-text, #2d3d52);
  cursor: pointer;
  border-bottom: 0.5px solid #e5e7eb;
  transition: background .12s;
}

.awr-suggestion:last-child { border-bottom: none; }

.awr-suggestion:hover { background: #eef4fb; }

/* ── BOOKING PROGRESS DOTS ─────────────── */

.awr-booking-card .awr-progress {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 0.5px solid #d1d8ee;
}
