/* WhatsApp-inspired conversation surface for the Orion demo. */
.wa-chat-layout {
    height: 560px;
    border-color: #26343c;
    background: #111b21;
}

.wa-conv-list {
    background: #111b21;
    border-color: #26343c;
}

.wa-conv-item {
    min-height: 70px;
    border-color: #202c33;
}

.wa-conv-item:hover,
.wa-conv-item.active {
    background: #202c33;
}

.wa-conv-item.active {
    box-shadow: inset 3px 0 0 #25d366;
}

.wa-conv-top strong {
    color: #e9edef;
    font-size: 0.88rem;
}

.wa-conv-top span,
.wa-conv-snippet {
    color: #8696a0;
}

.wa-thread {
    position: relative;
    background-color: #0b141a;
}

.wa-thread::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.045;
    background-image:
        radial-gradient(circle at 20% 30%, #d1d7db 0 1px, transparent 1.5px),
        radial-gradient(circle at 75% 68%, #d1d7db 0 1px, transparent 1.5px);
    background-size: 42px 42px, 54px 54px;
}

.wa-thread > * {
    position: relative;
    z-index: 1;
}

.wa-thread-header {
    min-height: 62px;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 9px 16px;
    border-color: #26343c;
    background: #202c33;
}

.wa-contact-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    color: #07140f;
    background: linear-gradient(145deg, #25d366, #00a884);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.wa-contact-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.wa-contact-copy strong {
    color: #e9edef;
    font-size: 0.94rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-contact-copy span,
.wa-contact-copy small {
    color: #8696a0;
    font-size: 0.7rem;
}

.wa-contact-copy small.online {
    color: #53bdeb;
}

.wa-thread-messages {
    padding: 18px clamp(18px, 6vw, 72px);
    gap: 4px;
    scrollbar-color: #374248 transparent;
}

.wa-date-separator {
    display: flex;
    justify-content: center;
    margin: 9px 0 7px;
}

.wa-date-separator span {
    padding: 6px 10px;
    border-radius: 7px;
    color: #d1d7db;
    background: #182229;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.22);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.wa-bubble {
    position: relative;
    max-width: min(76%, 560px);
    padding: 7px 8px 5px 9px;
    border: 0;
    border-radius: 8px;
    color: #e9edef;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.28);
    font-size: 0.81rem;
    line-height: 1.38;
}

.wa-bubble p {
    padding-right: 48px;
    color: #e9edef;
}

.wa-bubble.out {
    margin-left: auto;
    background: #005c4b;
    border-bottom-right-radius: 2px;
}

.wa-bubble.in {
    margin-right: auto;
    background: #202c33;
    border-bottom-left-radius: 2px;
}

.wa-bubble.out::after,
.wa-bubble.in::after {
    content: "";
    position: absolute;
    bottom: 0;
    width: 0;
    height: 0;
    border-style: solid;
}

.wa-bubble.out::after {
    right: -7px;
    border-width: 0 0 8px 8px;
    border-color: transparent transparent #005c4b transparent;
}

.wa-bubble.in::after {
    left: -7px;
    border-width: 0 8px 8px 0;
    border-color: transparent #202c33 transparent transparent;
}

.wa-bubble-meta {
    min-height: 14px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 2px;
    color: #aebac1;
    font-size: 0.61rem;
}

.wa-auto {
    width: 14px;
    height: 14px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: #07140f;
    background: #25d366;
    font-size: 0.55rem;
    cursor: help;
}

.wa-receipt {
    color: #8696a0;
    font-weight: 800;
    letter-spacing: -0.12em;
}

.wa-receipt.read {
    color: #53bdeb;
}

.wa-composer {
    min-height: 58px;
    display: grid;
    grid-template-columns: 52px 1fr 62px;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #202c33;
}

.wa-composer input {
    width: 100%;
    border: 0;
    border-radius: 9px;
    padding: 11px 14px;
    color: #d1d7db;
    background: #2a3942;
    opacity: 1;
}

.wa-composer input:focus {
    outline: 1px solid rgba(37, 211, 102, 0.75);
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.12);
}

.wa-composer input::placeholder {
    color: #8696a0;
}

.wa-composer button {
    border: 0;
    color: #aebac1;
    background: transparent;
    font-size: 0.72rem;
    font-weight: 800;
    opacity: 1;
    cursor: pointer;
}

.wa-composer .wa-voice-btn {
    min-height: 38px;
    border: 1px solid rgba(174, 186, 193, 0.28);
    border-radius: 9px;
}

.wa-composer .wa-voice-btn.recording {
    color: #fff;
    border-color: #ff5a5f;
    background: rgba(255, 90, 95, 0.2);
    animation: wa-voice-pulse 1.2s ease-in-out infinite;
}

.wa-composer .wa-voice-btn.transcribing {
    color: #25d366;
    border-color: rgba(37, 211, 102, 0.55);
}

.wa-composer .wa-open-btn {
    min-height: 38px;
    border-radius: 9px;
    color: #07140f;
    background: #25d366;
}

@keyframes wa-voice-pulse {
    50% { box-shadow: 0 0 0 5px rgba(255, 90, 95, 0.12); }
}

.wa-thread-empty {
    display: grid;
    place-items: center;
}

.wa-empty-state {
    max-width: 300px;
    display: grid;
    gap: 6px;
    padding: 28px;
    text-align: center;
}

.wa-empty-state strong { color: #e9edef; }
.wa-empty-state span { color: #8696a0; font-size: 0.8rem; line-height: 1.5; }

@media (max-width: 900px) {
    .wa-chat-layout { height: auto; }
    .wa-thread { min-height: 470px; }
    .wa-thread-messages { padding-inline: 16px; }
    .wa-bubble { max-width: 88%; }
    .wa-composer { grid-template-columns: 48px 1fr 58px; padding-inline: 8px; }
}
