/* Telegram conversation adapted from the Betlyzer Convert website demo. */
.convert-phone-screen {
  overflow: hidden;
  isolation: isolate;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Segoe UI", Roboto, sans-serif !important;
  background-color: #0d1622;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='120'%20height='120'%20viewBox='0%200%20120%20120'%3E%3Cg%20fill='none'%20stroke='%23b9a9e0'%20stroke-width='2'%20stroke-opacity='0.06'%3E%3Ccircle%20cx='20'%20cy='22'%20r='8'/%3E%3Cpath%20d='M58%2010l3%207%207%201-5%205%201%207-6-3-6%203%201-7-5-5%207-1z'/%3E%3Cpath%20d='M95%2028c6-9%2014-1%200%209-14-10-6-18%200-9z'/%3E%3Ccircle%20cx='30'%20cy='72'%20r='5'/%3E%3Cpath%20d='M70%2066h14M77%2059v14'/%3E%3Cpath%20d='M14%2096q10-8%2020%200'/%3E%3Ccircle%20cx='98'%20cy='92'%20r='9'/%3E%3Cpath%20d='M48%2095l4%204%204-4'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 150px;
}

.convert-phone-screen * {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Segoe UI", Roboto, sans-serif !important;
}

.convert-phone-screen::after {
  content: "";
  position: absolute;
  z-index: 5;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(6, 10, 16, 0.95) 0%,
    rgba(6, 10, 16, 0.58) 7%,
    transparent 18%,
    transparent 82%,
    rgba(6, 10, 16, 0.58) 93%,
    rgba(6, 10, 16, 0.95) 100%
  );
}

.convert-tg-feed {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 94px 10px 76px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 4%, #000 96%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 4%, #000 96%, transparent 100%);
}

.convert-tg-header {
  position: absolute;
  z-index: 12;
  top: 48px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
}

.convert-tg-back,
.convert-tg-meta,
.convert-tg-circle,
.convert-tg-input {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(40, 46, 58, 0.46);
  -webkit-backdrop-filter: blur(16px) saturate(165%);
  backdrop-filter: blur(16px) saturate(165%);
  box-shadow:
    inset 0 1px 0.5px rgba(255, 255, 255, 0.16),
    0 2px 10px rgba(0, 0, 0, 0.22);
}

.convert-tg-back,
.convert-tg-avatar {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  box-sizing: border-box;
  border-radius: 50%;
}

.convert-tg-back {
  padding: 0 2px 2px 0;
  color: #fff;
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
}

.convert-tg-meta {
  display: flex;
  flex: 1;
  min-width: 0;
  height: 38px;
  margin: 0 8px;
  padding: 4px 10px;
  box-sizing: border-box;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 19px;
}

.convert-tg-name {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.15;
}

.convert-tg-status {
  color: #54a9eb;
  font-size: 9px;
  line-height: 1.15;
}

.convert-tg-avatar {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, #5ed47e, #21b073);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.25);
  font-size: 16px;
  font-weight: 700;
}

.convert-tg-date {
  align-self: center;
  margin: 2px 0 7px;
  padding: 4px 11px;
  color: rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.38);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-size: 10px;
  font-weight: 600;
}

.convert-tg-bar {
  position: absolute;
  z-index: 12;
  right: 0;
  bottom: 19px;
  left: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
}

.convert-tg-circle {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  box-sizing: border-box;
  color: rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  font-size: 16px;
}

.convert-tg-input {
  display: flex;
  flex: 1;
  min-width: 0;
  height: 34px;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  box-sizing: border-box;
  color: rgba(255, 255, 255, 0.48);
  border-radius: 17px;
  font-size: 11px;
}

.convert-tg-input span { flex: 1; }
.convert-tg-circle svg {
  display: block;
  width: 16px;
  height: 16px;
}
.convert-tg-sticker {
  display: block;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
}

.convert-tg-msg {
  display: flex;
  max-width: 89%;
  animation: convertMsgPop 0.22s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

.convert-tg-msg.bot { align-self: flex-start; }
.convert-tg-msg.user { align-self: flex-end; }

.convert-tg-bubble {
  position: relative;
  padding: 7px 10px 8px;
  color: #fff;
  border-radius: 18px;
  font-size: 11px;
  line-height: 1.4;
  word-break: break-word;
}

.convert-tg-msg.bot .convert-tg-bubble {
  background: rgba(48, 50, 56, 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.convert-tg-msg.user .convert-tg-bubble {
  background: linear-gradient(135deg, #a85ad6 0%, #5b7cf0 100%);
}

.convert-tg-msg .convert-tg-bubble::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 11px;
  height: 17px;
}

.convert-tg-msg.user .convert-tg-bubble::after {
  right: -4px;
  background: var(--convert-tail, #5b7cf0);
  clip-path: polygon(0 0, 100% 100%, 0 84%);
}

.convert-tg-msg.bot .convert-tg-bubble::after {
  left: -4px;
  background: rgba(48, 50, 56, 0.9);
  clip-path: polygon(100% 0, 100% 84%, 0 100%);
}

.convert-tg-msg.no-beak .convert-tg-bubble::after { display: none; }

.convert-tg-time-spacer { display: inline-block; }
.convert-tg-lastword { white-space: nowrap; }

.convert-tg-time {
  position: absolute;
  right: 9px;
  bottom: 5px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 7px;
  white-space: nowrap;
}

.convert-tg-msg.user .convert-tg-time { color: rgba(255, 255, 255, 0.82); }

.convert-tg-msg.btn-row { width: 89%; }

.convert-tg-button {
  position: relative;
  display: flex;
  width: 100%;
  padding: 9px 11px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 13px 13px 17px 17px;
  background: rgba(48, 50, 56, 0.58);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 11px;
  font-weight: 600;
}

.convert-tg-button::after {
  content: "↗";
  position: absolute;
  top: 4px;
  right: 7px;
  opacity: 0.82;
  font-size: 10px;
}

@keyframes convertMsgPop {
  from { opacity: 0; transform: scale(0.88) translateY(5px); }
  to { opacity: 1; transform: none; }
}
