/* Quixo chat — Material FAB + panel (aligned LTR/RTL, mobile bottom sheet) */

.qm-chat-fab {
  position: fixed !important;
  z-index: 170;
  bottom: 20px !important;
  right: 20px !important;
  left: auto !important;
  inset-inline-start: auto !important;
  inset-inline-end: 20px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 56px;
  min-height: 56px;
  padding: 0 18px;
  border: 0;
  border-radius: 28px;
  background: linear-gradient(135deg, #0A2540 0%, #0842A0 55%, #0B3D91 100%);
  color: #fff;
  font-family: var(--sans, "Inter", "Noto Sans Arabic", sans-serif);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  box-shadow:
    0 1px 2px rgba(60, 64, 67, 0.3),
    0 2px 6px 2px rgba(60, 64, 67, 0.15);
  transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}
html[dir="rtl"] .qm-chat-fab {
  right: auto !important;
  left: 20px !important;
  inset-inline-start: 20px !important;
  inset-inline-end: auto !important;
}
.qm-chat-fab:hover {
  background: #0B3D91;
  box-shadow:
    0 1px 3px rgba(60, 64, 67, 0.3),
    0 4px 8px 3px rgba(60, 64, 67, 0.15);
}
.qm-chat-fab:active {
  background: #061833;
  transform: scale(0.98);
}
.qm-chat-fab svg {
  width: 20px;
  height: 20px;
  display: block;
  flex: none;
}
.qm-chat-fab .qm-chat-close {
  display: none;
}
.qm-chat-fab[data-open="1"] {
  width: 56px;
  padding: 0;
  border-radius: 50%;
}
.qm-chat-fab[data-open="1"] .qm-chat-label,
.qm-chat-fab[data-open="1"] .qm-chat-ico-open {
  display: none;
}
.qm-chat-fab[data-open="1"] .qm-chat-close {
  display: inline-flex;
}

.qm-chat-panel {
  position: fixed !important;
  z-index: 169;
  bottom: 88px !important;
  right: 20px !important;
  left: auto !important;
  inset-inline-start: auto !important;
  inset-inline-end: 20px !important;
  width: min(360px, calc(100% - 40px));
  max-height: min(560px, calc(100dvh - 120px));
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #FFFFFF 0%, #F4F7FC 100%);
  border: 1px solid rgba(10,37,64,.10);
  border-radius: 16px;
  box-shadow:
    0 1px 2px rgba(60, 64, 67, 0.08),
    0 8px 24px rgba(60, 64, 67, 0.12);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 10px, 0);
  transition:
    opacity 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  font-family: var(--sans, "Inter", "Noto Sans Arabic", sans-serif);
}
html[dir="rtl"] .qm-chat-panel {
  right: auto !important;
  left: 20px !important;
  inset-inline-start: 20px !important;
  inset-inline-end: auto !important;
}
.qm-chat-panel[data-open="1"] {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.qm-chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border-bottom: 1px solid rgba(10,37,64,.12);
  flex: none;
}
.qm-chat-head-close {
  margin-inline-start: auto;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(10,22,40,.58);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
  -webkit-tap-highlight-color: transparent;
}
.qm-chat-head-close svg {
  width: 18px;
  height: 18px;
}
.qm-chat-head-close:hover,
.qm-chat-head-close:focus-visible {
  background: #EEF3FA;
  color: #1F1F1F;
  outline: none;
}
.qm-chat-avatar {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #E4EBF7;
  color: #0842A0;
}
.qm-chat-avatar svg {
  width: 18px;
  height: 18px;
}
.qm-chat-title {
  line-height: 1.25;
  min-width: 0;
}
.qm-chat-title b {
  display: block;
  font-size: 14px;
  color: #1F1F1F;
  font-weight: 500;
}
.qm-chat-title span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(10,22,40,.58);
  font-weight: 400;
}
.qm-chat-title span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1E8E3E;
  flex: none;
}

.qm-chat-body {
  padding: 14px 16px;
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
  background: #F4F7FC;
  -webkit-overflow-scrolling: touch;
}
.qm-chat-body p,
.qm-chat-msg-row {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.45;
  color: #1F1F1F;
  background: #fff;
  border: 1px solid rgba(10,37,64,.12);
  border-radius: 12px;
  padding: 10px 12px;
  max-width: 100%;
}

.qm-chat-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px 12px;
  background: #fff;
  border-top: 1px solid rgba(10,37,64,.12);
  flex: none;
  max-height: 132px;
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.qm-chat-chip {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 10px 14px;
  min-height: 40px;
  border-radius: 16px;
  border: 1px solid rgba(10,37,64,.12);
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: #0842A0;
  cursor: pointer;
  line-height: 1.25;
  text-align: start;
  -webkit-tap-highlight-color: transparent;
  flex: none;
}
.qm-chat-chip:hover,
.qm-chat-chip:focus-visible {
  background: #E4EBF7;
  border-color: #C8D7F0;
  outline: none;
}

.qm-chat-send {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 20px;
  background: #0842A0;
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.qm-chat-send:hover {
  background: #0B3D91;
}
.qm-chat-msg {
  margin: 0;
  font-size: 12px;
  color: rgba(10,22,40,.58);
  min-height: 0;
}
.qm-chat-msg.err {
  color: #D93025;
}

.qm-chat-done {
  padding: 8px 0;
  text-align: start;
}
.qm-chat-done h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 500;
  color: #1F1F1F;
}
.qm-chat-done p {
  margin: 0 0 12px;
  font-size: 13px;
  color: rgba(10,22,40,.58);
  line-height: 1.45;
  background: none;
  border: 0;
  padding: 0;
}
.qm-chat-done-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.qm-chat-wa,
.qm-chat-mail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 20px;
  background: #0842A0;
  color: #fff !important;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none !important;
}
.qm-chat-wa:hover,
.qm-chat-mail:hover {
  background: #0B3D91;
}
.qm-chat-wa--ghost,
.qm-chat-mail {
  background: #fff;
  color: #0842A0 !important;
  border: 1px solid rgba(10,37,64,.12);
}
.qm-chat-wa--ghost:hover,
.qm-chat-mail:hover {
  background: #E4EBF7;
}
.qm-chat-typing {
  font-size: 13px;
  color: rgba(10,22,40,.58);
  padding: 4px 0;
}

.qm-chat-foot {
  padding: 10px 12px;
  border-top: 1px solid rgba(10,37,64,.12);
  background: #fff;
  display: flex;
  gap: 8px;
  flex: none;
}
.qm-chat-foot input {
  flex: 1;
  border: 1px solid rgba(10,37,64,.12);
  border-radius: 20px;
  padding: 10px 14px;
  font: inherit;
  font-size: 14px;
  outline: none;
}
.qm-chat-foot input:focus {
  border-color: #0842A0;
  box-shadow: 0 0 0 2px #C8D7F0;
}
.qm-chat-foot button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 20px;
  background: #0842A0;
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  border: 0;
}

.qm-chat-compose {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid rgba(10,37,64,.12);
  background: #fff;
  flex: none;
}
.qm-chat-compose[hidden] { display: none !important; }
.qm-chat-compose input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(10,37,64,.12);
  border-radius: 20px;
  padding: 10px 14px;
  font: inherit;
  font-size: 14px;
  outline: none;
  background: #F4F7FC;
  color: #1F1F1F;
}
.qm-chat-compose input:focus {
  border-color: #0842A0;
  box-shadow: 0 0 0 2px #C8D7F0;
  background: #fff;
}
.qm-chat-compose .qm-chat-send:disabled {
  opacity: 0.55;
  cursor: default;
}

.qbub {
  max-width: 92%;
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.qbub--bot {
  background: #fff;
  border: 1px solid rgba(10,37,64,.12);
  color: #1F1F1F;
  border-end-start-radius: 4px;
  margin-inline-end: auto;
}
.qbub--me {
  background: #E4EBF7;
  border: 1px solid #C8D7F0;
  color: #0B3D91;
  border-end-end-radius: 4px;
  margin-inline-start: auto;
  text-align: start;
}
.qbub a {
  color: #0842A0;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.qm-chat-chip--mute {
  color: rgba(10,22,40,.58);
  border-color: rgba(10,37,64,.12);
}
.qm-chat-typing {
  margin: 0 0 10px;
  font-size: 13px;
  color: rgba(10,22,40,.58);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.qm-chat-typing::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0842A0;
  animation: qm-chat-pulse 1s ease-in-out infinite;
}
@keyframes qm-chat-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1); }
}

/* Lock page scroll while chat sheet is open (mobile) */
html.qm-chat-open {
  overflow: hidden;
  overscroll-behavior: none;
}
html.qm-chat-open body {
  overflow: hidden;
  position: relative;
}

/* Mobile: near full-screen bottom sheet + FAB pinned to bottom-end */
@media (max-width: 640px) {
  .qm-chat-fab {
    bottom: max(16px, env(safe-area-inset-bottom)) !important;
    right: 16px !important;
    left: auto !important;
    inset-inline-end: 16px !important;
    inset-inline-start: auto !important;
    min-width: 52px;
    min-height: 52px;
    padding: 0 16px;
  }
  html[dir="rtl"] .qm-chat-fab {
    right: auto !important;
    left: 16px !important;
    inset-inline-start: 16px !important;
    inset-inline-end: auto !important;
  }
  .qm-chat-fab .qm-chat-label {
    display: none;
  }
  .qm-chat-fab[data-open="1"] {
    display: none; /* head close handles dismiss on small screens */
  }

  .qm-chat-panel,
  html[dir="rtl"] .qm-chat-panel {
    left: 0 !important;
    right: 0 !important;
    inset-inline-start: 0 !important;
    inset-inline-end: 0 !important;
    bottom: var(--qm-kb, 0px) !important;
    top: auto;
    width: 100%;
    max-width: none;
    height: min(92dvh, calc(100dvh - env(safe-area-inset-top, 0px) - 8px));
    max-height: min(92dvh, calc(100dvh - env(safe-area-inset-top, 0px) - 8px));
    border-radius: 16px 16px 0 0;
    margin: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .qm-chat-panel[data-open="1"] {
    transform: translate3d(0, 0, 0);
  }
  .qm-chat-choices {
    max-height: 148px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 14px;
  }
  .qm-chat-chip {
    white-space: nowrap;
  }
  .qm-chat-compose {
    padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
  }
  .qm-chat-compose input {
    font-size: 16px; /* avoid iOS zoom */
  }
}

@media (prefers-reduced-motion: reduce) {
  .qm-chat-fab,
  .qm-chat-panel {
    transition: none;
  }
}
/* align deploy 20260806151819 */
/* ai chat diag 153316 */
