/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1; 
}
::-webkit-scrollbar-thumb {
    background: #ccc; 
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #aaa; 
}

/* Markdown Styles within Chat Bubbles */
.markdown-body {
    white-space: pre-wrap; /* ช่วยให้แสดงผลบรรทัดใหม่ที่ส่งมาจาก AI ได้แม่นยำขึ้น */
    word-break: break-word;
}
.markdown-body p {
    margin-bottom: 0.5em;
}
.markdown-body p:last-child {
    margin-bottom: 0;
}
.markdown-body strong {
    font-weight: 700;
    color: inherit;
}
.markdown-body ul, .markdown-body ol {
    margin-left: 1.2em;
    list-style-type: disc;
    margin-bottom: 0.5em;
}
.markdown-body a {
    color: #2E7D32;
    text-decoration: underline;
    font-weight: 500;
}

/* Affiliate Links / Buttons styling */
.markdown-body a.p-link, 
.markdown-body a.btn-link {
    display: inline-block;
    background-color: #fff;
    border: 1px solid #2E7D32;
    color: #2E7D32;
    padding: 4px 12px;
    border-radius: 16px;
    text-decoration: none;
    margin-top: 4px;
    font-size: 0.9em;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.markdown-body a.p-link:hover,
.markdown-body a.btn-link:hover {
    background-color: #2E7D32;
    color: white;
}

.p-link {
    color: #2E7D32;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid #2E7D32;
    transition: all 0.3s;
}

.p-link:hover {
    background-color: #E8F5E9;
    border-radius: 4px;
    padding: 2px 4px;
}

#b-container {
    width: 100%;
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.b-content {
    height: 120px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
}

.b-overlay {
    background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, transparent 100%);
    width: 100%;
    padding: 12px;
}

.b-title {
    color: white;
    font-weight: bold;
    font-size: 1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

#b-container a {
    transition: transform 0.2s ease-in-out;
}

#b-container a:hover {
    transform: scale(1.02); /* ขยายใหญ่ขึ้นนิดหน่อยเวลาเอาเมาส์วาง */
}