/* The chat and the last parte of the big screen (/). Loaded before screen.css, so the
   narrow-screen rules there win over these. */

/* The WhatsApp frame keeps WhatsApp's own colours: it imitates that app. */
.phone-frame {
  display: flex;
  flex-direction: column;
  max-width: 460px;
  height: 62vh;
  min-height: 420px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: var(--r-card);
  background: #e5ddd5;
}

.wa-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #075e54;
  color: #ffffff;
}

.wa-bar small {
  display: block;
  opacity: 0.75;
}

.wa-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #25d366;
  color: #06240f;
  font-weight: 800;
}

.chat-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  padding: 14px 12px;
  overflow-y: auto;
}

.msg {
  max-width: 84%;
  padding: 8px 10px 4px;
  border-radius: 10px;
  background: #ffffff;
  color: #111b21;
  font-size: 16px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
}

.msg.in {
  align-self: flex-start;
}

.msg.out {
  align-self: flex-end;
  background: #d9fdd3;
}

.msg p {
  margin: 0;
}

.msg time {
  display: block;
  margin-top: 2px;
  color: #667781;
  font-size: 11px;
  text-align: right;
}

.voice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.play {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--anthracite);
  color: #ffffff;
  font-size: 12px;
}

.bars {
  flex: 1;
  height: 18px;
  opacity: 0.55;
  background: repeating-linear-gradient(90deg, #667781 0 3px, transparent 3px 6px);
}

.dur {
  color: #667781;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.transcript {
  margin-top: 6px !important;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.transcript.pending {
  color: #667781;
  font-style: italic;
}

.typing {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
}

.typing span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #667781;
  animation: blink 1.2s infinite both;
}

.typing span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0%,
  80%,
  100% {
    opacity: 0.25;
  }
  40% {
    opacity: 1;
  }
}

/* ---- last parte card ---- */

.parte-card .empty {
  color: var(--muted);
  font-size: 18px;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin: 0;
}

.facts div {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--soft);
}

.facts dt {
  color: var(--muted);
  font-size: 13px;
}

.facts dd {
  margin: 2px 0 0;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.parte-card h3 {
  margin: 18px 0 6px;
  color: var(--muted);
  font-family: var(--text-font);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.parte-card p {
  margin: 0;
  font-size: 18px;
}

.parte-card .none {
  color: var(--muted);
}

.missing {
  margin-top: 16px;
  padding: 12px 14px;
  border-left: 4px solid var(--anthracite);
  border-radius: 8px;
  background: var(--soft);
}

.parte-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.parte-foot .meta {
  color: var(--muted);
  font-size: 13px;
}
