.db-listen {
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-family: "Libre Franklin", system-ui, sans-serif;
    color: var(--db-charcoal);
}

.db-listen *,
.db-listen *::before,
.db-listen *::after {
    box-sizing: border-box;
}

.db-listen [hidden] {
    display: none !important;
}

/* ---------- Conversation demo ---------- */

.db-chat-demo {
    overflow: hidden;
    border: 1px solid #EADFDA;
    border-radius: 20px;
    background: var(--db-background-cream);
}

.db-chat-demo__header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: #FFFFFF;
    border-bottom: 1px solid #EADFDA;
}

.db-chat-demo__avatars {
    display: flex;
    flex-shrink: 0;
}

.db-chat-demo__avatars img {
    display: block;
    width: 44px;
    height: 44px;
    border: 2px solid #FFFFFF;
    border-radius: 50%;
    object-fit: cover;
}

.db-chat-demo__avatars img + img {
    margin-left: -10px;
}

.db-chat-demo__names {
    margin: 0;
    font-size: 15px;
    line-height: 20px;
    font-weight: 600;
}

.db-chat-demo__delay {
    margin: 2px 0 0;
    font-size: 13px;
    line-height: 18px;
    color: #5E5F62;
}

/* "Example" label, centred like a date separator in a messaging app */
.db-chat-demo__system {
    align-self: center;
    margin: 0 0 2px;
    padding: 2px 10px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.7);
    color: #5E5F62;
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.db-chat-demo__thread {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
}

.db-bubble {
    max-width: 80%;
    margin: 0;
    padding: 12px 16px;
    font-size: 16px;
    line-height: 24px;
}

.db-bubble--in {
    align-self: flex-start;
    border-radius: 16px 16px 16px 4px;
    background: #FFFFFF;
    color: var(--db-charcoal);
}

/* Typing indicator: three dots */
.db-bubble--typing {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 16px 18px;
}

.db-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #A9A4A2;
    animation: db-dot 1.2s infinite ease-in-out;
}

.db-dot:nth-of-type(3) { animation-delay: 0.15s; }
.db-dot:nth-of-type(4) { animation-delay: 0.3s; }

@keyframes db-dot {
    0%, 60%, 100% { opacity: 0.35; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
    .db-dot { animation: none; opacity: 0.6; }
}

.db-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.db-bubble--out {
    align-self: flex-end;
    border-radius: 16px 16px 4px 16px;
    background: var(--db-accent-blue);
    color: #FFFFFF;
}

/* ---------- Starters ---------- */

.db-listen__label {
    margin: 4px 0 0;
    font-size: 16px;
    line-height: 22px;
    font-weight: 600;
    color: var(--db-accent-blue);
}

/* ---------- Call to action ---------- */

.db-listen__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 24px;
    margin-top: 8px;
}

/* Action: rounded */
.db-listen__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 28px;
    border-radius: 999px;
    background: var(--db-pink-link);
    color: #FFFFFF;
    font-size: 15px;
    line-height: 20px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
}

.db-listen__cta:hover {
    background: #833F31;
    color: #FFFFFF;
}

.db-listen__cta:focus-visible {
    outline: 2px solid var(--db-pink-link);
    outline-offset: 2px;
}

.db-listen__reassure {
    margin: 0;
    font-size: 14px;
    line-height: 20px;
    color: #5E5F62;
}

.db-listen__reassure a {
    color: var(--db-pink-link);
    font-weight: 600;
}

/* ---------- Smartphone ---------- */

@media (max-width: 600px) {
    .db-chat-demo__header {
        padding: 14px 16px;
    }
    
    .db-chat-demo__thread {
        padding: 16px;
    }
    
    .db-bubble {
        max-width: 85%;
        font-size: 15px;
        line-height: 22px;
    }
    
    .db-listen__label {
        font-size: 15px;
    }
    
    .db-listen .db-chip {
        font-size: 14px;
    }
    
    .db-listen__actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .db-listen__reassure {
        text-align: center;
    }
}