/* ── Dental chat booking demo (scripted autoplay) ─────────────────────────── */

.dental-chat-demo {
  --demo-accent: #6f9cff;
  --demo-ease: cubic-bezier(0.22, 1, 0.36, 1);
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
}

.dental-chat-demo__frame {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 22px;
  background:
    radial-gradient(circle at 18% 0%, rgba(91, 140, 255, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)),
    rgba(8, 9, 11, 0.94);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: box-shadow 320ms var(--demo-ease), border-color 320ms var(--demo-ease);
}

.dental-chat-demo__chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.025);
}

.dental-chat-demo__traffic {
  display: flex;
  gap: 6px;
}

.dental-chat-demo__traffic span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dental-chat-demo__traffic span:nth-child(1) { background: rgba(255, 95, 86, 0.82); }
.dental-chat-demo__traffic span:nth-child(2) { background: rgba(255, 189, 46, 0.82); }
.dental-chat-demo__traffic span:nth-child(3) { background: rgba(39, 201, 63, 0.82); }

.dental-chat-demo__title {
  flex: 1;
  min-width: 0;
}

.dental-chat-demo__title strong {
  display: block;
  color: rgba(248, 250, 252, 0.96);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dental-chat-demo__title small {
  display: block;
  margin-top: 2px;
  color: rgba(161, 168, 181, 0.88);
  font-size: 0.68rem;
}

.dental-chat-demo__live {
  padding: 3px 8px;
  border-radius: 99px;
  color: #55d38a;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(85, 211, 138, 0.12);
  border: 1px solid rgba(85, 211, 138, 0.22);
}

.dental-chat-demo__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.dental-chat-demo__channels {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 6px;
}

.dental-chat-demo__channel {
  flex: 1;
  padding: 8px 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: rgba(161, 168, 181, 0.88);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  transition:
    color 280ms var(--demo-ease),
    border-color 280ms var(--demo-ease),
    background 280ms var(--demo-ease),
    transform 280ms var(--demo-ease);
}

.dental-chat-demo__channel:hover {
  color: rgba(248, 250, 252, 0.92);
  border-color: rgba(255, 255, 255, 0.14);
}

.dental-chat-demo__channel.is-active {
  color: rgba(248, 250, 252, 0.96);
  border-color: rgba(138, 180, 255, 0.34);
  background: rgba(91, 140, 255, 0.14);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(91, 140, 255, 0.18);
}

.dental-chat-demo__lang {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.03);
  flex-shrink: 0;
}

.dental-chat-demo__lang button {
  min-width: 34px;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  color: rgba(161, 168, 181, 0.88);
  font: inherit;
  font-size: 0.66rem;
  font-weight: 800;
  cursor: pointer;
  background: transparent;
  transition: color 220ms var(--demo-ease), background 220ms var(--demo-ease);
}

.dental-chat-demo__lang button:hover {
  color: rgba(248, 250, 252, 0.92);
}

.dental-chat-demo__lang button.is-active {
  color: rgba(248, 250, 252, 0.96);
  background: rgba(91, 140, 255, 0.22);
}

.dental-chat-demo__messages {
  min-height: 320px;
  max-height: 360px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 12px 8px;
  scroll-behavior: smooth;
}

.dental-chat-demo__messages::-webkit-scrollbar {
  width: 5px;
}

.dental-chat-demo__messages::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
}

.dental-chat-demo__msg {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  opacity: 0;
  transform: translateY(8px);
  animation: demo-msg-in 380ms var(--demo-ease) forwards;
}

.dental-chat-demo__msg.is-user {
  flex-direction: row-reverse;
}

.dental-chat-demo__avatar {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 0.65rem;
  font-weight: 800;
  color: rgba(248, 250, 252, 0.92);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dental-chat-demo__msg:not(.is-user) .dental-chat-demo__avatar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #3e72f4, #6f9cff);
  border-color: rgba(138, 180, 255, 0.24);
}

.dental-chat-demo__bubble {
  max-width: min(82%, 260px);
  padding: 10px 12px;
  border-radius: 16px;
  color: rgba(248, 250, 252, 0.94);
  font-size: 0.8rem;
  line-height: 1.45;
}

.dental-chat-demo__msg:not(.is-user) .dental-chat-demo__bubble {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom-left-radius: 6px;
  background: rgba(255, 255, 255, 0.055);
}

.dental-chat-demo__msg.is-user .dental-chat-demo__bubble {
  border-bottom-right-radius: 6px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #3e72f4, #6f9cff);
}

.dental-chat-demo__chips,
.dental-chat-demo__slots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px 36px;
  opacity: 0;
  animation: demo-msg-in 320ms var(--demo-ease) forwards;
}

.dental-chat-demo__chips button,
.dental-chat-demo__slots button {
  padding: 7px 11px;
  border: 1px solid rgba(138, 180, 255, 0.2);
  border-radius: 99px;
  color: rgba(248, 250, 252, 0.9);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 650;
  background: rgba(91, 140, 255, 0.1);
  pointer-events: none;
  transition:
    transform 220ms var(--demo-ease),
    background 220ms var(--demo-ease),
    border-color 220ms var(--demo-ease);
}

.dental-chat-demo__chips button.is-selected,
.dental-chat-demo__slots button.is-selected {
  color: #fff;
  border-color: rgba(138, 180, 255, 0.42);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #3e72f4, #6f9cff);
  transform: scale(1.03);
}

.dental-chat-demo__summary {
  margin: 0 0 10px 36px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  opacity: 0;
  animation: demo-msg-in 380ms var(--demo-ease) forwards;
}

.dental-chat-demo__summary h4 {
  margin: 0 0 8px;
  color: rgba(248, 250, 252, 0.96);
  font-size: 0.78rem;
  font-weight: 700;
}

.dental-chat-demo__summary-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 0;
  color: rgba(161, 168, 181, 0.88);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dental-chat-demo__summary-row strong {
  color: rgba(248, 250, 252, 0.94);
  font-size: 0.76rem;
  font-weight: 650;
  text-transform: none;
  letter-spacing: 0;
  text-align: right;
}

.dental-chat-demo__summary-row.is-empty strong {
  color: rgba(161, 168, 181, 0.5);
}

.dental-chat-demo__submit {
  width: 100%;
  margin-top: 10px;
  min-height: 40px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #3e72f4, #6f9cff);
  opacity: 0.55;
  transition: opacity 280ms var(--demo-ease), transform 280ms var(--demo-ease);
}

.dental-chat-demo__submit.is-ready {
  opacity: 1;
  animation: demo-pulse 1.2s var(--demo-ease) infinite;
}

.dental-chat-demo__submit.is-sent {
  opacity: 1;
  animation: none;
  background: rgba(85, 211, 138, 0.22);
  color: #55d38a;
  border: 1px solid rgba(85, 211, 138, 0.32);
}

.dental-chat-demo__bankid {
  margin: 0 0 10px 36px;
  padding: 12px;
  border: 1px solid rgba(138, 180, 255, 0.2);
  border-radius: 14px;
  background: rgba(91, 140, 255, 0.08);
  opacity: 0;
  animation: demo-msg-in 380ms var(--demo-ease) forwards;
}

.dental-chat-demo__bankid-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.dental-chat-demo__bankid-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #1a4fd6, #3b82f6);
}

.dental-chat-demo__bankid-head strong {
  display: block;
  color: rgba(248, 250, 252, 0.96);
  font-size: 0.78rem;
}

.dental-chat-demo__bankid-head span {
  display: block;
  margin-top: 2px;
  color: rgba(161, 168, 181, 0.88);
  font-size: 0.68rem;
}

.dental-chat-demo__bankid-btn {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 11px;
  color: #fff;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  background: linear-gradient(135deg, #1a4fd6, #3b82f6);
  transition: opacity 280ms var(--demo-ease);
}

.dental-chat-demo__bankid.is-pending .dental-chat-demo__bankid-btn {
  opacity: 0.5;
  pointer-events: none;
}

.dental-chat-demo__bankid.is-verified .dental-chat-demo__bankid-btn {
  background: rgba(85, 211, 138, 0.22);
  color: #55d38a;
  border: 1px solid rgba(85, 211, 138, 0.32);
}

.dental-chat-demo__bankid-status {
  margin-top: 8px;
  color: rgba(161, 168, 181, 0.88);
  font-size: 0.68rem;
  text-align: center;
  min-height: 1em;
}

.dental-chat-demo__bankid.is-verified .dental-chat-demo__bankid-status {
  color: #55d38a;
}

.dental-chat-demo__typing {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 10px 0;
  padding: 8px 12px;
  opacity: 0;
  animation: demo-msg-in 280ms var(--demo-ease) forwards;
}

.dental-chat-demo__typing-dots {
  display: inline-flex;
  gap: 4px;
}

.dental-chat-demo__typing-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(138, 180, 255, 0.75);
  animation: demo-dot 1.1s var(--demo-ease) infinite;
}

.dental-chat-demo__typing-dots span:nth-child(2) { animation-delay: 0.12s; }
.dental-chat-demo__typing-dots span:nth-child(3) { animation-delay: 0.24s; }

.dental-chat-demo__typing-label {
  color: rgba(161, 168, 181, 0.88);
  font-size: 0.68rem;
}

.dental-chat-demo__footer {
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(161, 168, 181, 0.72);
  font-size: 0.66rem;
  line-height: 1.4;
  text-align: center;
}

@keyframes demo-msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes demo-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

@media (max-width: 640px) {
  .dental-chat-demo {
    max-width: none;
  }

  .dental-chat-demo__messages {
    min-height: 280px;
    max-height: 320px;
  }

  .dental-chat-demo__chips,
  .dental-chat-demo__slots,
  .dental-chat-demo__summary,
  .dental-chat-demo__bankid {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dental-chat-demo__msg,
  .dental-chat-demo__chips,
  .dental-chat-demo__slots,
  .dental-chat-demo__summary,
  .dental-chat-demo__bankid,
  .dental-chat-demo__typing {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .dental-chat-demo__submit.is-ready {
    animation: none !important;
  }

  .dental-chat-demo__typing-dots span {
    animation: none !important;
  }
}

/* ── Channel shells ─────────────────────────────────────────────────────── */

.dental-chat-demo__frame.is-channel-whatsapp .dental-chat-demo__traffic {
  display: none;
}

.dental-chat-demo__frame.is-channel-whatsapp .dental-chat-demo__chrome {
  background: linear-gradient(135deg, #0f7a4f, #128c7e);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dental-chat-demo__frame.is-channel-whatsapp .dental-chat-demo__title small,
.dental-chat-demo__frame.is-channel-whatsapp .dental-chat-demo__live {
  color: rgba(255, 255, 255, 0.88);
}

.dental-chat-demo__frame.is-channel-whatsapp .dental-chat-demo__live {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
}

.dental-chat-demo__frame.is-channel-whatsapp .dental-chat-demo__channel.is-active {
  border-color: rgba(37, 211, 102, 0.45);
  background: rgba(37, 211, 102, 0.16);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.18);
}

.dental-chat-demo__frame.is-channel-whatsapp .dental-chat-demo__messages {
  background:
    radial-gradient(circle at 100% 0%, rgba(37, 211, 102, 0.06), transparent 38%),
    #0b141a;
}

.dental-chat-demo__frame.is-channel-whatsapp .dental-chat-demo__avatar {
  display: none;
}

.dental-chat-demo__frame.is-channel-whatsapp .dental-chat-demo__msg:not(.is-user) .dental-chat-demo__bubble {
  color: #111827;
  background: #fff;
  border-color: rgba(255, 255, 255, 0.08);
  border-bottom-left-radius: 4px;
}

.dental-chat-demo__frame.is-channel-whatsapp .dental-chat-demo__msg.is-user .dental-chat-demo__bubble {
  background: #005c4b;
  border-bottom-right-radius: 4px;
}

.dental-chat-demo__frame.is-channel-whatsapp .dental-chat-demo__chips,
.dental-chat-demo__frame.is-channel-whatsapp .dental-chat-demo__slots,
.dental-chat-demo__frame.is-channel-whatsapp .dental-chat-demo__summary,
.dental-chat-demo__frame.is-channel-whatsapp .dental-chat-demo__bankid {
  margin-left: 0;
}

.dental-chat-demo__frame.is-channel-whatsapp .dental-chat-demo__chips button.is-selected,
.dental-chat-demo__frame.is-channel-whatsapp .dental-chat-demo__slots button.is-selected {
  background: #005c4b;
  border-color: rgba(37, 211, 102, 0.45);
}

.dental-chat-demo__frame.is-channel-telegram .dental-chat-demo__traffic {
  display: none;
}

.dental-chat-demo__frame.is-channel-telegram .dental-chat-demo__chrome {
  background: linear-gradient(135deg, #2481cc, #2aabee);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.dental-chat-demo__frame.is-channel-telegram .dental-chat-demo__title small,
.dental-chat-demo__frame.is-channel-telegram .dental-chat-demo__live {
  color: rgba(255, 255, 255, 0.9);
}

.dental-chat-demo__frame.is-channel-telegram .dental-chat-demo__live {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
}

.dental-chat-demo__frame.is-channel-telegram .dental-chat-demo__channel.is-active {
  border-color: rgba(42, 171, 238, 0.45);
  background: rgba(42, 171, 238, 0.16);
  box-shadow: 0 8px 24px rgba(42, 171, 238, 0.18);
}

.dental-chat-demo__frame.is-channel-telegram .dental-chat-demo__messages {
  background:
    radial-gradient(circle at 0% 0%, rgba(42, 171, 238, 0.08), transparent 40%),
    #17212b;
}

.dental-chat-demo__frame.is-channel-telegram .dental-chat-demo__avatar {
  display: none;
}

.dental-chat-demo__frame.is-channel-telegram .dental-chat-demo__msg:not(.is-user) .dental-chat-demo__bubble {
  background: #182533;
  border-color: rgba(255, 255, 255, 0.06);
  border-bottom-left-radius: 4px;
}

.dental-chat-demo__frame.is-channel-telegram .dental-chat-demo__msg.is-user .dental-chat-demo__bubble {
  background: linear-gradient(135deg, #2b5278, #3478b3);
  border-bottom-right-radius: 4px;
}

.dental-chat-demo__frame.is-channel-telegram .dental-chat-demo__chips,
.dental-chat-demo__frame.is-channel-telegram .dental-chat-demo__slots,
.dental-chat-demo__frame.is-channel-telegram .dental-chat-demo__summary,
.dental-chat-demo__frame.is-channel-telegram .dental-chat-demo__bankid {
  margin-left: 0;
}

.dental-chat-demo__frame.is-channel-telegram .dental-chat-demo__chips button.is-selected,
.dental-chat-demo__frame.is-channel-telegram .dental-chat-demo__slots button.is-selected {
  background: linear-gradient(135deg, #2b5278, #3478b3);
  border-color: rgba(42, 171, 238, 0.45);
}

.dental-chat-demo__frame.is-channel-telegram .dental-chat-demo__lang button.is-active {
  background: rgba(42, 171, 238, 0.28);
}

.dental-chat-demo__frame.is-channel-whatsapp .dental-chat-demo__lang button.is-active {
  background: rgba(37, 211, 102, 0.24);
}

@media (max-width: 640px) {
  .dental-chat-demo__controls {
    flex-direction: column;
    align-items: stretch;
  }

  .dental-chat-demo__lang {
    align-self: center;
  }
}

/* ── Channel cards (ai-assistant page) ──────────────────────────────────── */

.dental-channel-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.dental-channel-card {
  padding: 18px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.dental-channel-card__icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  border-radius: 12px;
  font-size: 1.1rem;
  background: rgba(91, 140, 255, 0.12);
  border: 1px solid rgba(138, 180, 255, 0.18);
}

.dental-channel-card h3 {
  margin: 0 0 8px;
  color: rgba(248, 250, 252, 0.96);
  font-size: 0.92rem;
}

.dental-channel-card p {
  margin: 0;
  color: rgba(161, 168, 181, 0.88);
  font-size: 0.78rem;
  line-height: 1.45;
}

@media (max-width: 820px) {
  .dental-channel-cards {
    grid-template-columns: 1fr;
  }
}
