.chat-app-container {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
    background-color: white;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}
@media (max-width: 768px) {
    .chat-app-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        max-width: 100vw;
        height: 100dvh;
        border-radius: 0;
        box-shadow: none;
    }
}
.chat-header {
    height: 64px;
    padding: 0 16px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    z-index: 10;
}
.back-button {
    text-decoration: none;
    color: var(--color-gray-dark);
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 700;
}
.chat-title-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.chat-agent-name {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--color-primary);
}
.chat-agent-status {
    font-size: 9.5px;
    font-weight: 600;
    color: var(--color-gray-light);
    display: flex;
    align-items: center;
    gap: 4px;
}
.pulse-dot {
    width: 6px;
    height: 6px;
    background-color: #52C41A;
    border-radius: 50%;
}
.close-window-btn {
    background-color: #F0F2F5;
    color: #4E5968;
    border: none;
    padding: 6px 12px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
}
.close-window-btn:hover {
    background-color: #E2E5E9;
}
.chat-messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background-color: #F8FAFC;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.message-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
}
.message-row.bot { align-self: flex-start; }
.message-row.user { align-self: flex-end; flex-direction: row-reverse; }
.message-avatar-wrapper { flex-shrink: 0; }
.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--color-border);
}
.message-content-wrapper { display: flex; flex-direction: column; gap: 3px; max-width: calc(100% - 46px); }
.message-sender-name { font-size: 11px; font-weight: 700; color: var(--color-gray-dark); }
.message-row.user .message-sender-name { text-align: right; }
.message-bubble {
    padding: 10px 14px;
    font-size: 13.5px;
    line-height: 1.45;
    word-break: break-all;
    border-radius: 4px 16px 16px 16px;
    border: 1px solid var(--color-border);
    background-color: white;
    color: var(--color-gray-dark);
}
.message-row.user .message-bubble {
    border-radius: 16px 4px 16px 16px;
    background-color: var(--color-primary);
    color: white;
    border: none;
}
.message-meta {
    font-size: 9.5px;
    color: var(--color-gray-light);
    align-self: flex-end;
}
.partner-promo-banner {
    background: linear-gradient(135deg, #FFF7E6, #FFE7BA);
    border-top: 1px solid #FA8C16;
    border-bottom: 1px solid #FA8C16;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}
.promo-text {
    font-size: 12px;
    font-weight: 700;
    color: #D46B08;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.quick-replies-container {
    height: 48px;
    border-bottom: 1px solid var(--color-border);
    background-color: white;
    display: flex;
    align-items: center;
    overflow: hidden;
    width: 100%;
}
.quick-replies-track {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 16px;
    width: 100%;
}
.quick-replies-track::-webkit-scrollbar { display: none; }
.quick-reply-btn {
    background-color: var(--color-bg-sky-light);
    color: var(--color-primary);
    border: 1px solid rgba(14,74,132,0.08);
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}
.chat-input-area {
    padding: 10px 14px;
    background-color: white;
    border-top: 1px solid var(--color-border);
}
.chat-input-form {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}
.attachment-btn, .mic-btn {
    background: none;
    border: none;
    color: var(--color-gray-light);
    cursor: pointer;
    display: flex;
    align-items: center;
}
.chat-text-input {
    flex: 1;
    height: 36px;
    background-color: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: 18px;
    padding: 0 14px;
    font-size: 13.5px;
    outline: none;
}
.send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--color-primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-card {
    background-color: white;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    width: 220px;
    overflow: hidden;
    margin-top: 6px;
}
.product-img { width: 100%; height: 120px; object-fit: cover; }
.product-info-box { padding: 10px; display: flex; flex-direction: column; gap: 4px; }

/* Welcome Panel Styling */
.welcome-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 8px;
    text-align: center;
    width: 100%;
}
.welcome-avatar-container {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background-color: white;
    border: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}
.welcome-avatar-img {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    object-fit: cover;
}
.welcome-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1.45;
    margin-bottom: 10px;
}
.welcome-subtitle {
    font-size: 12.5px;
    color: var(--color-gray-light);
    line-height: 1.5;
    margin-bottom: 24px;
}
.welcome-categories {
    display: flex;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin-bottom: 24px;
}
.category-chip {
    flex: 1;
    max-width: 100px;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}
.category-chip:hover {
    transform: translateY(-2px);
    border-color: var(--color-accent-sky);
    box-shadow: 0 4px 12px rgba(14,74,132,0.08);
}
.category-icon {
    font-size: 22px;
}
.category-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-gray-dark);
}
.welcome-suggest-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 360px;
}
.suggest-card {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 600;
    color: #4E5968;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, transform 0.1s;
    text-align: left;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}
.suggest-card:hover {
    background-color: var(--color-bg-sky-light);
    border-color: var(--color-accent-sky);
    color: var(--color-primary);
}
.suggest-card:active {
    transform: scale(0.99);
}
