/* —— ADVISER booking chat —— */
#adviser-jordan-chat-root {
  --ajc-navy: #194172;
  --ajc-blue: #0362c1;
  --ajc-ink: #3f3e50;
  --ajc-soft: #eaf3fb;
  --ajc-line: rgba(3, 98, 193, 0.18);
  --ajc-gold: #0362c1;
  font-family: "Barlow Semi Condensed", "Cairo", "Segoe UI", sans-serif;
}
.ajc-fab {
  position: fixed;
  z-index: 99960;
  inset-inline-end: 22px;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  cursor: pointer;
  padding: 8px 18px 8px 8px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(145deg, #0362c1, #024a91 55%, #194172);
  box-shadow: 0 14px 36px rgba(3, 98, 193, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.ajc-fab:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 18px 44px rgba(3, 98, 193, 0.45);
}
.ajc-fab-pulse {
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 2px solid rgba(3, 98, 193, 0.45);
  animation: ajc-pulse 2.4s ease-out infinite;
  pointer-events: none;
  opacity: 0;
}
#adviser-jordan-chat-root.ajc-emphasize .ajc-fab-pulse {
  opacity: 1;
}
@keyframes ajc-pulse {
  0% { transform: scale(0.92); opacity: 0.7; }
  100% { transform: scale(1.18); opacity: 0; }
}
.ajc-fab-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  background: transparent;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 0 0 2px rgba(3, 98, 193, 0.2);
  flex-shrink: 0;
}
.ajc-fab-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  line-height: 1.1;
}
.ajc-fab-text {
  font-family: "Barlow Semi Condensed", sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  white-space: nowrap;
}
.ajc-fab-online {
  font-size: 11px;
  color: #b7e4c7;
  letter-spacing: 0.02em;
}
.ajc-backdrop[hidden],
.ajc-panel-chat[hidden],
.ajc-quick[hidden] {
  display: none !important;
}
.ajc-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99970;
  background: rgba(25, 65, 114, 0.48);
  backdrop-filter: blur(6px);
}
.ajc-panel-chat {
  position: fixed;
  z-index: 99980;
  inset-inline-end: 18px;
  bottom: 18px;
  width: min(400px, calc(100vw - 24px));
  height: min(680px, calc(100vh - 36px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  color: var(--ajc-ink);
  background: linear-gradient(180deg, #ffffff 0%, #f3f7fb 100%);
  box-shadow: 0 24px 64px rgba(25, 65, 114, 0.28);
  border: 1px solid var(--ajc-line);
  animation: ajc-rise 0.35s ease;
}
@keyframes ajc-rise {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.ajc-chat-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 14px 18px;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(135deg, #0362c1, #194172);
}
.ajc-chat-head::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.14;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Ccircle cx='4' cy='4' r='1.2' fill='%23ffffff'/%3E%3Ccircle cx='24' cy='20' r='1' fill='%23ffffff'/%3E%3Ccircle cx='36' cy='32' r='0.9' fill='%23ffffff'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 40px 40px;
}
.ajc-chat-head::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.18;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(255, 255, 255, 0.22), transparent 55%),
    radial-gradient(90% 70% at 100% 100%, rgba(0, 0, 0, 0.18), transparent 50%);
}
.ajc-chat-head > * {
  position: relative;
  z-index: 1;
}
.ajc-chat-head h2,
.ajc-chat-head #ajc-title,
.ajc-agent-role,
.ajc-call-status,
.ajc-chat-head .ajc-agent-role,
.ajc-chat-head .ajc-call-status {
  color: #fff !important;
}
.ajc-agent-role {
  margin: 3px 0 0;
  font-size: 0.78rem;
  opacity: 0.92;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.ajc-call-status {
  margin: 4px 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  opacity: 0.9;
}
.ajc-call-status[data-mode="speaking"],
.ajc-call-status[data-mode="listening"] {
  color: #fff !important;
  opacity: 1;
}
.ajc-agent {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.ajc-agent-photo-wrap {
  position: relative;
  flex-shrink: 0;
}
.ajc-agent-photo {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  background: transparent;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}
#adviser-jordan-chat-root.ajc-speaking .ajc-agent-photo {
  animation: ajc-speak-glow 0.9s ease-in-out infinite;
}
@keyframes ajc-speak-glow {
  0%, 100% { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2); }
  50% { box-shadow: 0 0 0 5px rgba(91, 160, 224, 0.45); }
}
.ajc-agent-dot {
  position: absolute;
  inset-inline-end: 2px;
  bottom: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #2ecc71;
  border: 2px solid #152a45;
}
.ajc-chat-head h2 {
  margin: 0;
  font-family: "Barlow Semi Condensed", sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.1;
  color: #fff !important;
}
.ajc-progress {
  position: relative;
  padding: 6px 14px 10px;
  background: linear-gradient(135deg, #0362c1, #194172);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
}
.ajc-progress i {
  display: block;
  margin-top: 6px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #8ec5f0, #ffffff);
  transition: width 0.25s ease;
}
#adviser-jordan-chat-root.ajc-fast .ajc-row {
  animation-duration: 0.15s;
}
#adviser-jordan-chat-root.ajc-fast .ajc-bubble-bot {
  font-size: 0.98rem;
  line-height: 1.5;
}
body.adviser-rtl #adviser-jordan-chat-root.ajc-fast .ajc-bubble-bot {
  font-family: "Segoe UI", Tahoma, "Arabic Typesetting", sans-serif;
}
.ajc-wave {
  display: none;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 22px;
  padding: 0 14px 6px;
  background: linear-gradient(135deg, #0362c1, #194172);
}
#adviser-jordan-chat-root.ajc-speaking .ajc-wave,
#adviser-jordan-chat-root.ajc-listening .ajc-wave {
  display: flex;
}
.ajc-wave span {
  width: 3px;
  height: 8px;
  border-radius: 2px;
  background: var(--ajc-gold);
  animation: ajc-wave 0.9s ease-in-out infinite;
}
#adviser-jordan-chat-root.ajc-listening .ajc-wave span {
  background: #ff7b7b;
}
.ajc-wave span:nth-child(2) { animation-delay: 0.1s; height: 12px; }
.ajc-wave span:nth-child(3) { animation-delay: 0.2s; height: 16px; }
.ajc-wave span:nth-child(4) { animation-delay: 0.3s; height: 12px; }
.ajc-wave span:nth-child(5) { animation-delay: 0.4s; height: 8px; }
@keyframes ajc-wave {
  0%, 100% { transform: scaleY(0.55); opacity: 0.55; }
  50% { transform: scaleY(1.35); opacity: 1; }
}
.ajc-head-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  align-items: center;
}
.ajc-voice-talk {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #02356d;
  background: linear-gradient(135deg, #f2d58a, #c9a227);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
  white-space: nowrap;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.ajc-voice-talk:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}
.ajc-voice-talk.is-on {
  color: #fff;
  background: linear-gradient(135deg, #ce1126, #9b1020);
}
#adviser-jordan-chat-root.ajc-speaking .ajc-agent-photo {
  animation: ajc-speak-glow 0.9s ease-in-out infinite;
}
@media (max-width: 575px) {
  .ajc-voice-talk-label {
    display: none;
  }
  .ajc-voice-talk {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
  }
}
.ajc-voice-pick {
  max-width: 118px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  outline: none;
  cursor: pointer;
}
.ajc-voice-pick option {
  color: #02356d;
}
.ajc-icon-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  font-size: 18px;
  line-height: 1;
  display: grid;
  place-items: center;
}
.ajc-icon-btn.is-on {
  background: rgba(201, 162, 39, 0.45);
}
.ajc-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}
.ajc-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 92%;
  animation: ajc-msg-in 0.28s ease;
}
@keyframes ajc-msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.ajc-row-bot { align-self: flex-start; }
.ajc-row-user { align-self: flex-end; }
.ajc-row-sys {
  align-self: center;
  max-width: 100%;
}
.ajc-bubble-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(2, 53, 109, 0.08);
}
.ajc-pkg-cards {
  display: grid;
  gap: 8px;
  min-width: min(260px, 72vw);
}
.ajc-pkg-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: center;
  text-align: start;
  border: 1px solid rgba(2, 53, 109, 0.12);
  background: #f7f9fc;
  border-radius: 12px;
  padding: 6px;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.ajc-pkg-card:hover {
  border-color: var(--ajc-blue);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(3, 98, 193, 0.12);
}
.ajc-pkg-card__img {
  display: block;
  width: 56px;
  height: 48px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
}
.ajc-pkg-card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ajc-pkg-card__body strong {
  font-size: 0.88rem;
  color: var(--ajc-navy);
  line-height: 1.25;
}
.ajc-pkg-card__body em {
  font-style: normal;
  font-size: 0.75rem;
  color: #6b7c8a;
}
.ajc-pkg-hint {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: #6b7c8a;
}
#adviser-jordan-chat-root.ajc-live .ajc-bubble-bot {
  font-size: 0.98rem;
  line-height: 1.5;
}
body.adviser-rtl #adviser-jordan-chat-root.ajc-live .ajc-bubble-bot {
  font-family: "Segoe UI", Tahoma, "Arabic Typesetting", sans-serif;
}
.ajc-mini-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  background: transparent;
  padding: 0;
  border: 1.5px solid var(--ajc-blue);
  flex-shrink: 0;
}
.ajc-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.45;
  box-shadow: 0 4px 14px rgba(3, 98, 193, 0.08);
}
.ajc-bubble-bot {
  background: #fff;
  color: var(--ajc-ink);
  border: 1px solid var(--ajc-line);
  border-end-start-radius: 5px;
}
.ajc-bubble-user {
  background: linear-gradient(135deg, #0362c1, #194172);
  color: #fff;
  border-end-end-radius: 5px;
}
.ajc-bubble-sys {
  background: transparent;
  box-shadow: none;
  font-size: 0.78rem;
  color: #6a7d8a;
  padding: 2px 8px;
}
.ajc-typing {
  display: inline-flex;
  gap: 5px;
  padding: 14px 16px;
  min-width: 54px;
}
.ajc-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9aabb8;
  animation: ajc-dot 1.2s ease-in-out infinite;
}
.ajc-typing span:nth-child(2) { animation-delay: 0.15s; }
.ajc-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes ajc-dot {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
  40% { transform: translateY(-4px); opacity: 1; }
}
.ajc-summary {
  background: rgba(3, 98, 193, 0.06);
  border: 1px solid var(--ajc-line);
  border-radius: 12px;
  padding: 10px 12px;
  min-width: 200px;
}
.ajc-summary-title {
  font-family: "Barlow Semi Condensed", sans-serif;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ajc-blue);
  margin-bottom: 6px;
}
.ajc-summary ul {
  margin: 0;
  padding-inline-start: 18px;
  font-size: 0.88rem;
}
.ajc-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 14px 4px;
  flex-shrink: 0;
}
.ajc-chip-btn {
  border: 1px solid rgba(2, 53, 109, 0.15);
  background: #fff;
  color: var(--ajc-navy);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.86rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.ajc-chip-btn:hover {
  border-color: var(--ajc-blue);
  transform: translateY(-1px);
}
.ajc-chip-btn.is-selected,
.ajc-chip-btn.is-primary {
  background: linear-gradient(135deg, #0362c1, #194172);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}
.ajc-chip-btn.is-selected:not(.is-primary) {
  background: rgba(3, 98, 193, 0.12);
  border-color: rgba(3, 98, 193, 0.45);
  color: var(--ajc-navy);
}
.ajc-composer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px 14px;
  background: rgba(255, 255, 255, 0.9);
  border-top: 1px solid var(--ajc-line);
  flex-shrink: 0;
}
.ajc-composer input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--ajc-line);
  border-radius: 999px;
  padding: 11px 14px;
  font-size: 0.95rem;
  outline: none;
  background: #fff;
  color: var(--ajc-ink);
}
.ajc-composer input:focus {
  border-color: var(--ajc-blue);
  box-shadow: 0 0 0 3px rgba(3, 98, 193, 0.18);
}
.ajc-mic,
.ajc-send {
  border: 0;
  cursor: pointer;
  flex-shrink: 0;
}
.ajc-mic {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ajc-navy);
  background: rgba(2, 53, 109, 0.08);
}
.ajc-mic.is-listening {
  background: #ce1126;
  color: #fff;
  animation: ajc-mic-pulse 1s ease infinite;
}
@keyframes ajc-mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(206, 17, 38, 0.45); }
  50% { box-shadow: 0 0 0 10px rgba(206, 17, 38, 0); }
}
.ajc-send {
  padding: 11px 16px;
  border-radius: 999px;
  font-family: "Barlow Semi Condensed", sans-serif;
  letter-spacing: 0.02em;
  text-transform: none;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #0362c1, #194172);
}
.ajc-voice-talk {
  display: none !important;
}
body.ajc-open {
  overflow: hidden;
}
#adviser-jordan-chat-root.ajc-rtl,
#adviser-jordan-chat-root.ajc-rtl .ajc-panel-chat,
#adviser-jordan-chat-root.ajc-rtl .ajc-fab {
  direction: rtl;
}
#adviser-jordan-chat-root.ajc-rtl .ajc-fab-meta {
  align-items: flex-end;
}
@media (max-width: 575px) {
  .ajc-fab-meta {
    display: none;
  }
  .ajc-fab {
    padding: 8px;
  }
  .ajc-panel-chat {
    inset: 8px;
    width: auto;
    height: auto;
    border-radius: 18px;
  }
  .adviser-dest-chat span:last-child {
    display: none;
  }
  .adviser-dest-chat {
    padding: 10px;
  }
}

/* Adviser Express PWA — float above bottom tabs */
body.ae-app .ajc-fab {
  bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  z-index: 55;
}
body.ae-app .ajc-panel-chat {
  z-index: 99980;
}
@media (max-width: 575px) {
  body.ae-app .ajc-panel-chat {
    inset: 8px;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    height: auto;
  }
  body.ae-app.ajc-open .ajc-panel-chat {
    bottom: 8px;
  }
}
