/* Chat intake shared styles — bubbles, summary card, and form layout used by
   the project-scoping chat page (get-quote.html) and the thank-you page's
   package badge. Reuses the theme's existing CSS custom properties instead
   of inventing new colors. */

.chat-bubble {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-bubble--assistant {
    align-self: flex-start;
    background: var(--white-color);
    color: var(--title-color);
    border: 1px solid var(--th-border-color);
    border-bottom-left-radius: 4px;
}

.chat-bubble--user {
    align-self: flex-end;
    background: var(--theme-color2);
    color: var(--white-color);
    border-bottom-right-radius: 4px;
}

.chat-typing {
    align-self: flex-start;
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.chat-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--light-color);
    display: inline-block;
    animation: chatTypingBlink 1.2s infinite ease-in-out;
}

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

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

@keyframes chatTypingBlink {
    0%, 80%, 100% {
        opacity: 0.2;
    }
    40% {
        opacity: 1;
    }
}

.chat-summary-card {
    background: var(--white-color);
    border: 1px solid var(--th-border-color);
    border-radius: 14px;
    padding: 16px;
    align-self: stretch;
}

.chat-summary-card h4 {
    margin: 0 0 8px;
    font-size: 16px;
    color: var(--title-color);
}

.chat-summary-card p {
    margin: 0;
    font-size: 14px;
    color: var(--body-color);
}

.chat-summary-card ul {
    margin: 10px 0 0;
    padding-left: 18px;
    font-size: 13px;
    color: var(--body-color);
}

.chat-summary-card .chat-summary-next {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--th-border-color);
    font-size: 13px;
    font-weight: 500;
    color: var(--title-color);
}

.chat-summary-next i {
    margin-right: 6px;
    color: var(--theme-color2);
}

.chat-package-badge {
    display: inline-block;
    background: var(--theme-color2);
    color: var(--white-color);
    border-radius: 999px;
    padding: 3px 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.chat-drawer-form,
.chat-contact-form {
    display: flex;
    gap: 10px;
}

.chat-contact-form {
    flex-direction: column;
}

.chat-drawer-form input,
.chat-contact-form input {
    flex: 1 1 auto;
    width: 100%;
}

.chat-deposit-btn {
    width: 100%;
    text-align: center;
}

/* Stripe's Payment Element mounts here once name + email are submitted, so
   card details sit inside the same form instead of a separate checkout page. */
.chat-payment {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chat-payment[hidden] {
    display: none;
}

.chat-payment-edit {
    align-self: flex-start;
    padding: 0;
    border: 0;
    background: none;
    font-size: 13px;
    color: var(--theme-color);
    text-decoration: underline;
}

.chat-contact-form input[readonly] {
    background: var(--smoke-color2);
    color: var(--body-color);
}

/* The checkout flow shows a neutral "Loading..." message with no
   .success/.error modifier, so it needs display forced on unconditionally
   here — the global .form-messages rule (style.css) defaults to display:none. */
.chat-contact-form .form-messages {
    display: block;
    margin: 0; /* the form's flex gap already spaces it from the button */
    font-size: 13px;
}

/* Until there's a message, take no space — otherwise the empty line plus the
   flex gap leaves a big blank strip under the button. */
.chat-contact-form .form-messages:empty {
    display: none;
}
