:root {
  --wa-header: #075e54;
  --wa-header-2: #064e46;
  --wa-teal: #128c7e;
  --wa-send: #00a884;
  --wa-bubble-in: #fff;
  --wa-bubble-out: #d9fdd3;
  --wa-meta: #667781;
  --wa-link: #027eb5;
  --wa-composer: #f0f2f5;
  --wa-app-width: 420px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: #0b141a;
  color: #111b21;
}

.wa-shell {
  min-height: 100%;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}

.wa-app {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--wa-app-width);
  height: 100dvh;
  position: relative;
  overflow: hidden;
  background: #e5ddd5;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 18px 50px rgba(0, 0, 0, 0.45);
}

.wa-header {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(180deg, var(--wa-header) 0%, var(--wa-header-2) 100%);
  color: #fff;
  padding: 8px 10px 8px 12px;
  min-height: 62px;
  z-index: 2;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.wa-avatar {
  position: relative;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.wa-avatar-photo {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #e8e8e8;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.25);
}

.wa-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}

.wa-online {
  position: absolute;
  right: 0;
  bottom: 1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #31a24c;
  border: 2px solid var(--wa-header);
}

.wa-header-text {
  flex: 1;
  min-width: 0;
}

.wa-title {
  font-weight: 600;
  font-size: 15.5px;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wa-status {
  font-size: 12.5px;
  opacity: 0.88;
  margin-top: 1px;
}

.wa-thread {
  flex: 1;
  overflow-y: auto;
  padding: 10px 8px 14px;
  background-color: #e5ddd5;
  background-image: url("./wallpaper.png");
  background-repeat: repeat;
  background-size: 420px auto;
}

.wa-day {
  display: flex;
  justify-content: center;
  margin: 6px 0 12px;
}

.wa-day span {
  background: #e1f2fa;
  color: #51656f;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 8px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
}

.wa-row {
  display: flex;
  margin: 3px 0 4px;
  animation: wa-in 0.18s ease-out;
}

@keyframes wa-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.wa-row.bot {
  justify-content: flex-start;
}

.wa-row.user {
  justify-content: flex-end;
}

.wa-cluster {
  max-width: 86%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.wa-bubble {
  position: relative;
  padding: 7px 9px 5px 10px;
  border-radius: 8px;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 14.4px;
  line-height: 1.38;
}

.wa-row.bot .wa-bubble {
  background: var(--wa-bubble-in);
  border-top-left-radius: 0;
}

.wa-row.user .wa-bubble {
  background: var(--wa-bubble-out);
  border-top-right-radius: 0;
}

.wa-row.bot .wa-bubble::before,
.wa-row.user .wa-bubble::before {
  content: "";
  position: absolute;
  top: 0;
  width: 10px;
  height: 10px;
}

.wa-row.bot .wa-bubble::before {
  left: -7px;
  background: radial-gradient(circle at 0 10px, transparent 7px, #fff 7.2px);
}

.wa-row.user .wa-bubble::before {
  right: -7px;
  background: radial-gradient(circle at 10px 10px, transparent 7px, #d9fdd3 7.2px);
}

.wa-time {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  float: right;
  margin: 4px 0 0 10px;
  font-size: 11px;
  color: var(--wa-meta);
  line-height: 1;
}

.wa-ticks {
  color: #53bdeb;
  font-size: 13px;
  letter-spacing: -1px;
}

.wa-bubble img {
  display: block;
  max-width: 220px;
  border-radius: 6px;
  margin: 2px 0 6px;
}

.wa-actions {
  margin-top: 2px;
  background: #fff;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
  border-top: 1px solid #f0f2f5;
}

.wa-cluster .wa-bubble + .wa-actions {
  border-radius: 0 0 8px 8px;
}

.wa-chip,
.wa-list-open,
.wa-cta {
  display: block;
  width: 100%;
  border: none;
  border-bottom: 1px solid #f0f2f5;
  background: #fff;
  color: var(--wa-link);
  padding: 11px 12px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
}

.wa-chip:last-child,
.wa-list-open:last-child,
.wa-cta:last-child {
  border-bottom: none;
}

.wa-chip:active,
.wa-list-open:active,
.wa-cta:active,
.wa-list-row:active {
  background: #f5f6f6;
}

.wa-composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 6px 8px 10px;
  background: var(--wa-composer);
}

.wa-input-wrap {
  flex: 1;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
}

.wa-input {
  width: 100%;
  border: none;
  border-radius: 24px;
  padding: 11px 16px;
  font-size: 15px;
  outline: none;
  background: transparent;
}

.wa-send {
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: var(--wa-send);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
}

.wa-send:disabled {
  opacity: 0.45;
  cursor: default;
}

.wa-typing {
  display: none;
}

.wa-typing-bubble {
  min-width: 56px;
  padding: 12px 14px 10px;
}

.wa-dots {
  display: flex;
  gap: 4px;
  align-items: center;
  height: 14px;
}

.wa-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9aa3a8;
  animation: wa-dot 1.1s infinite ease-in-out;
}

.wa-dots i:nth-child(2) {
  animation-delay: 0.15s;
}

.wa-dots i:nth-child(3) {
  animation-delay: 0.3s;
}

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

.wa-list-sheet {
  position: absolute;
  inset: 0;
  background: rgba(11, 20, 26, 0.45);
  display: none;
  align-items: flex-end;
  z-index: 5;
}

.wa-list-sheet:not([hidden]) {
  display: flex;
}

.wa-list-panel {
  width: 100%;
  max-height: 72%;
  background: #fff;
  border-radius: 16px 16px 0 0;
  overflow: auto;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.18);
}

.wa-list-grab {
  width: 36px;
  height: 4px;
  border-radius: 4px;
  background: #d1d7db;
  margin: 8px auto 0;
}

.wa-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px 10px;
  font-weight: 600;
  color: #111b21;
  border-bottom: 1px solid #f0f2f5;
}

.wa-list-close {
  border: none;
  background: transparent;
  color: var(--wa-teal);
  font-weight: 600;
  cursor: pointer;
}

.wa-list-row {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  border-bottom: 1px solid #f0f2f5;
  background: #fff;
  padding: 13px 16px;
  cursor: pointer;
}

.wa-list-row strong {
  display: block;
  font-size: 15px;
  color: #111b21;
  font-weight: 600;
}

.wa-list-row span {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  color: var(--wa-meta);
  white-space: pre-wrap;
}

@media (min-width: 720px) {
  .wa-shell {
    align-items: center;
    padding: 24px;
  }

  .wa-app {
    height: min(860px, 100dvh - 48px);
    border-radius: 16px;
  }
}
