/* คอนเทนเนอร์หลัก — โล่ง ไม่มีกรอบ/พื้นเทา ลดความซ้ำซ้อนของกรอบซ้อนกรอบ */
.lcbp-dc-wrap {
    max-width: 1200px;
    height: auto;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    font-family: inherit;
    box-sizing: border-box;
}

.lcbp-dc-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 24px;
}

.lcbp-dc-chip {
    border: none !important;
    background: #888888 !important;
    color: #eeeeee !important;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.lcbp-dc-chip:hover,
.lcbp-dc-chip:focus,
.lcbp-dc-chip.is-selected {
    background: #ffb600 !important;
    border: none !important;
    color: #fff !important;
    outline: none;
}
.lcbp-dc-chip-etc { cursor: default; border: none !important; background: none !important; color: #999 !important; }

.lcbp-dc-form {
    margin-bottom: 20px;
}

.lcbp-dc-search-box {
    display: flex;
    align-items: flex-end; /* ปุ่มค้นหาอยู่ล่างสุดเมื่อช่องขยายหลายบรรทัด */
    max-width: 720px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 24px; /* โค้งพอสวยแต่ไม่กลมจนเพี้ยนเมื่อขยายหลายบรรทัด */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    padding: 6px 6px 6px 22px;
    transition: box-shadow .15s ease, border-color .15s ease;
}
.lcbp-dc-search-box:focus-within {
    border-color: #ffb600;
    box-shadow: 0 2px 14px rgba(255, 182, 0, 0.25);
}

/* ข้อความหลายบรรทัด — เปลี่ยนกรอบจากทรงแคปซูลเป็นสี่เหลี่ยมขอบโค้งมน */
.lcbp-dc-search-box.is-multiline {
    border-radius: 18px;
}

/* เอาเมาส์ชี้ช่องค้นหา = แสงส้มกระจายตัวออกเป็นระยะ (pulse) */
@keyframes lcbp-dc-glow {
    0%   { box-shadow: 0 0 0 0 rgba(255, 150, 0, 0.45); }
    70%  { box-shadow: 0 0 0 14px rgba(255, 150, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 150, 0, 0); }
}
.lcbp-dc-search-box:hover {
    border-color: #ffb600;
    animation: lcbp-dc-glow 1.6s ease-out infinite;
}

/* ช่องพิมพ์เป็น textarea ที่ยืดสูงตามข้อความอัตโนมัติ (ดูข้อความยาวได้ทั้งหมด) */
.lcbp-dc-search-input,
.lcbp-dc-search-input:focus,
.lcbp-dc-search-input:focus-visible,
.lcbp-dc-search-input:active {
    flex: 1;
    min-width: 0;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent;
    font-family: inherit;
    font-size: 1em;
    line-height: 1.6;
    padding: 12px 8px;
    resize: none;
    overflow-y: auto;
    max-height: 220px; /* ยาวมากจะเลื่อนดูภายในช่องได้ */
}

.lcbp-dc-search-btn {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: #ffb600;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s ease;
}
.lcbp-dc-search-btn:hover { background: #e6a400; }
.lcbp-dc-search-btn:disabled { opacity: .6; cursor: not-allowed; }
.lcbp-dc-search-btn svg { display: block; }

.lcbp-dc-result {
    min-height: 20px;
    line-height: 1.7;
    padding: 0 4px;
}

/* ช่องคำตอบ — พื้นขาว เส้นเทา (ตัดโทนครีมออก) + เงาบางๆ */
.lcbp-dc-result .lcbp-dc-answer {
    background: #ffffff;
    border: 1px solid #dcdcdc;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 14px rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    padding: 30px 38px; /* เว้นขอบให้คำตอบหายใจ (เพิ่มจากเดิม ~1 ซม.) */
    margin-bottom: 12px;
}

/* หัวข้อย่อยในคำตอบ (แนวทางจากพระสูตร / มุมมองจากงานวิจัย / ข้อเสนอแนะ ฯลฯ)
   — ป้ายวงรีสีส้มธีม (#ffb600) ตัวหนังสือขาวไม่หนา เว้นห่างจากเนื้อหาเล็กน้อย */
.lcbp-dc-answer-heading {
    display: inline-block;
    background: #ffb600;
    color: #ffffff;
    font-weight: 400;
    padding: 1px 16px;
    border-radius: 999px;
    line-height: 1.7;
    margin-bottom: 6px;
}

/* ย่อหน้าปกติในคำตอบ — บรรทัดแรกของทุกย่อหน้าย่อเข้า 2em (เหมือนกด tab) */
.lcbp-dc-answer-p {
    display: inline-block;
    text-indent: 2em;
    max-width: 100%;
}

/* บรรทัดรายการในคำตอบ — จุด • วาดด้วย ::before ที่ตำแหน่งคงที่
   ข้อความบรรทัดแรกและบรรทัดที่ตัดคำจึงเรียงตรงกันเป๊ะ และจุดเริ่มตรงระดับเดียวกับย่อหน้า (2em) */
.lcbp-dc-answer-li {
    display: inline-block;
    position: relative;
    margin-left: 2em;
    padding-left: 1.2em;
    text-indent: 0;
    max-width: calc(100% - 2em);
}
.lcbp-dc-answer-li::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0;
}

.lcbp-dc-result .lcbp-dc-error {
    color: #a33;
    background: #fdecec;
    border: 1px solid #f3caca;
    border-radius: 8px;
    padding: 12px 16px;
}

.lcbp-dc-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    color: #888;
    padding: 16px 0;
}

.lcbp-dc-spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #a78bfa, #60a5fa, #f472b6, #a78bfa);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
            mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
    animation: lcbp-dc-spin 0.9s linear infinite;
}

@keyframes lcbp-dc-spin {
    to { transform: rotate(360deg); }
}

.lcbp-dc-recent {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 720px;
    margin: 10px auto 20px;
    font-size: 0.85em;
}

.lcbp-dc-recent-label {
    color: #888;
}

.lcbp-dc-recent-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.lcbp-dc-recent-chip {
    border: 1px dashed #bbb !important;
    background: transparent !important;
    color: #666 !important;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.95em;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.lcbp-dc-recent-chip:hover,
.lcbp-dc-recent-chip:focus {
    background: #ffb600 !important;
    border-color: #ffb600 !important;
    color: #fff !important;
    outline: none;
}

/* หมายเหตุ — กล่องพื้นครีม เส้นครีม + ไอคอนตกใจวงกลมสีส้ม */
.lcbp-dc-disclaimer-static,
.lcbp-dc-answer-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.8em;
    color: #7a6a4f;
    background: #fdf7e7;
    border: 1px solid #f0e3bf;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 14px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 12px 16px;
    margin-top: 18px;
    line-height: 1.6;
}
.lcbp-dc-disclaimer-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    border-radius: 50%;
    background: #f0821e;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    line-height: 20px;
    text-align: center;
}
.lcbp-dc-disclaimer-text { flex: 1; }

/* disclaimer แบบเก่าที่ฝังเป็น <p class="lcbp-qa-disclaimer"> ในหน้าคำถาม-คำตอบที่เผยแพร่ไปแล้ว
   — แต่งให้เป็นกล่องพื้นครีม + ไอคอนตกใจวงกลมส้ม (ผ่าน ::before) หน้าตาเดียวกับหน้าแรก
   โดยไม่ต้องไล่แก้เนื้อหาหน้าเก่าทีละหน้า (หน้าใหม่ฝัง markup กล่องแบบเดียวกับหน้าแรกอยู่แล้ว) */
.lcbp-qa-disclaimer {
    position: relative;
    font-size: 0.8em;
    color: #7a6a4f;
    background: #fdf7e7;
    border: 1px solid #f0e3bf;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 14px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 12px 16px 12px 46px;
    margin-top: 18px;
    line-height: 1.6;
}
.lcbp-qa-disclaimer::before {
    content: "!";
    position: absolute;
    left: 16px;
    top: 14px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f0821e;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    line-height: 20px;
    text-align: center;
}

.lcbp-dc-permalink {
    font-size: 0.8em;
    margin-top: -4px;
    margin-bottom: 12px;
}
.lcbp-dc-permalink a { color: #8a5a1f; text-decoration: underline; }

/* บล็อกแหล่งอ้างอิงในหน้าตอบคำถามสด — ให้หน้าตาเหมือนหน้า SEO (พระสูตรอ้างอิง / งานวิจัยอ้างอิง)
   เว้นระยะห่างจากกรอบคำตอบ และย่อขนาดทั้งก้อนลง ~10% ให้เป็นส่วนประกอบรอง ไม่แย่งความเด่นจากคำตอบ */
.lcbp-dc-refs {
    margin: 28px 0 12px;
    font-size: 0.9em;
}
.lcbp-dc-refs .lcbp-refs-block {
    margin-bottom: 10px;
}
.lcbp-dc-refs .lcbp-refs-heading {
    font-size: 1.15em;
    font-weight: 700;
    color: #7a3b12;
    margin: 14px 0 8px;
}
.lcbp-dc-refs .lcbp-qa-refs {
    margin: 0;
    padding-left: 1.4em;
    line-height: 1.7;
}
.lcbp-dc-refs .lcbp-qa-refs li {
    margin-bottom: 8px;
}
.lcbp-dc-refs .lcbp-qa-refs a {
    color: #8a5a1f;
    text-decoration: underline;
}
.lcbp-dc-refs .lcbp-qa-refs a:hover {
    color: #c8791f;
}

/* แผงหมวด (เปิดเมื่อกดชิป) + รายการคำถามที่ตอบแล้ว / คำถามไกด์ */
.lcbp-dc-cat-panels {
    margin: 4px 0 8px;
}
.lcbp-dc-cat-panel {
    background: #ffffff;
    border: 1px solid #dcdcdc;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 14px rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 10px;
}
.lcbp-dc-cat-title {
    font-weight: 700;
    color: #7a3b12;
    margin-bottom: 8px;
    font-size: 0.98em;
}
.lcbp-dc-qa-list {
    margin: 0;
    padding-left: 1.3em;
    line-height: 1.75;
}
.lcbp-dc-qa-list li { margin-bottom: 4px; }
.lcbp-dc-qa-list a {
    color: #8a5a1f;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}
.lcbp-dc-qa-list a:hover {
    color: #c8791f;
    border-bottom-color: #c8791f;
}

.lcbp-dc-seed-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
/* ปุ่มคำถามไกด์ — ใช้ธีมเดียวกับชิปหมวดด้านบน (เทา #888 → ส้ม #ffb600 ตอน hover) */
.lcbp-dc-seed {
    display: block;
    width: 100%;
    text-align: left;
    background: #888888;
    border: none;
    border-radius: 10px;
    padding: 11px 16px;
    font-size: 0.95em;
    color: #eeeeee;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.lcbp-dc-seed:hover,
.lcbp-dc-seed:focus {
    background: #ffb600;
    color: #fff;
    outline: none;
}
.lcbp-dc-seed::before {
    content: "❝ ";
    opacity: .6;
}

/* คำถามที่ตอบแล้ว (รวมทุกหมวด) */
.lcbp-dc-faq {
    margin: 18px 0 8px;
    padding-top: 14px;
    border-top: 1px solid #eee;
}
.lcbp-dc-faq-title {
    font-weight: 700;
    color: #7a3b12;
    margin-bottom: 8px;
}


/* รายการค้นในคลัง (ฟรี) */
.lcbp-dc-list-block{margin-top:18px;padding:14px 16px;background:#faf7f0;border:1px solid #ece3d0;border-radius:10px}
.lcbp-dc-list-title{font-weight:700;color:#7a5c1e;margin-bottom:8px}
.lcbp-dc-list-h{font-weight:600;color:#5a4a2a;margin:10px 0 4px}
.lcbp-dc-list-ul{margin:0 0 6px;padding-left:20px}
.lcbp-dc-list-ul li{margin:3px 0;line-height:1.55}
.lcbp-dc-list-ref{color:#a08a5a;font-size:.92em}
.lcbp-dc-list-block a{color:#2a6a9a}


/* Overlay ระหว่างกำลังค้นหา — พื้นหลังเบลอเหมือนกระจกฝ้า + การ์ดขาวขอบมน */
.lcbp-dc-overlay{
    position:fixed; inset:0; z-index:99999;
    display:flex; align-items:center; justify-content:center;
    background:rgba(110,110,120,.30);
    -webkit-backdrop-filter:blur(7px); backdrop-filter:blur(7px);
    animation:lcbp-dc-fade .2s ease;
}
@keyframes lcbp-dc-fade{ from{opacity:0} to{opacity:1} }
.lcbp-dc-loading-card{
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    gap:24px;
    background:#fff; border-radius:24px;
    padding:48px 60px;
    box-shadow:0 20px 55px rgba(0,0,0,.20);
    min-width:250px; max-width:80vw;
    animation:lcbp-dc-pop .25s ease;
}
@keyframes lcbp-dc-pop{ from{transform:scale(.92); opacity:0} to{transform:scale(1); opacity:1} }
.lcbp-dc-loading-card .lcbp-dc-spinner{
    width:64px; height:64px;
    -webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 6px),#000 calc(100% - 6px));
            mask:radial-gradient(farthest-side,transparent calc(100% - 6px),#000 calc(100% - 6px));
}
.lcbp-dc-loading-text{
    color:#8a8a8a; font-size:16px; line-height:1.5; text-align:center;
}
