/* =============================================================
   Khesaca Content Structure
   1. Hop tom tat bai
   2. Muc luc dropdown
   3. Khoi ket luan
   Tien to khs- de khong dung vao style cua Flatsome hay PDP.
   ============================================================= */

/* ---------- Hop tom tat bai ---------- */

.khs-summary {
    background: #faf6f2;
    border: 1px solid #eadfd4;
    border-left: 4px solid #a52f21;
    border-radius: 12px;
    padding: 18px 20px;
    margin: 0 0 22px;
}

.khs-summary__label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #a52f21;
    margin-bottom: 8px;
}

.khs-summary__text {
    margin: 0;
    font-size: 16.5px;
    line-height: 1.7;
    color: #3a2b25;
}

/* ---------- Muc luc dropdown ---------- */

.khs-toc {
    --khs-toc-red: #a52f21;
    --khs-toc-soft: #fbeae7;
    --khs-toc-line: #eadfd4;
    --khs-toc-ink: #241713;
    --khs-toc-muted: #6f625c;
    background: #fff;
    border: 1px solid var(--khs-toc-line);
    border-radius: 12px;
    margin: 0 0 28px;
    overflow: hidden;
}

.khs-toc summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    user-select: none;
}

.khs-toc summary::-webkit-details-marker {
    display: none;
}

.khs-toc summary:hover {
    background: #faf6f2;
}

.khs-toc__label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--khs-toc-ink);
}

.khs-toc__bars {
    width: 18px;
    height: 18px;
    color: var(--khs-toc-red);
}

.khs-toc__count {
    margin-left: auto;
    font-size: 12px;
    font-weight: 600;
    color: var(--khs-toc-muted);
}

.khs-toc__chevron {
    width: 18px;
    height: 18px;
    flex: none;
    color: var(--khs-toc-red);
    transition: transform 0.2s ease;
}

.khs-toc[open] .khs-toc__chevron {
    transform: rotate(180deg);
}

.khs-toc__list {
    list-style: none;
    margin: 0;
    padding: 0 18px 14px;
    border-top: 1px solid var(--khs-toc-line);
}

.khs-toc__item {
    border-top: 1px solid var(--khs-toc-line);
}

.khs-toc__item:first-child {
    border-top: none;
}

.khs-toc__item a {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 9px 0;
    color: var(--khs-toc-ink);
    text-decoration: none;
}

.khs-toc__item a:hover {
    color: var(--khs-toc-red);
}

.khs-toc__num {
    flex: 0 0 26px;
    height: 26px;
    border-radius: 8px;
    background: var(--khs-toc-soft);
    color: var(--khs-toc-red);
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.khs-toc__text {
    color: inherit;
    line-height: 1.5;
}

/* ---------- Khoi ket luan ---------- */

.khs-conclusion {
    background: #fff;
    border: 1px solid #eadfd4;
    border-top: 3px solid #a52f21;
    border-radius: 12px;
    padding: 22px 24px 24px;
    margin: 30px 0 0;
}

.khs-conclusion::before {
    content: "Kết luận";
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #a52f21;
    margin-bottom: 10px;
}

.khs-conclusion > *:first-child {
    margin-top: 0;
}

.khs-conclusion > *:last-child {
    margin-bottom: 0;
}

/* An tieu de "Kết luận" trong than bai vi da co nhan rieng o tren */
.khs-conclusion > h2:first-child,
.khs-conclusion > h3:first-child,
.khs-conclusion > h4:first-child {
    display: none;
}

/* ---------- Nhac nguoi viet ---------- */

.khs-editor-notice {
    background: #fff5e6;
    border: 1px dashed #d9a44a;
    border-radius: 10px;
    padding: 12px 16px;
    margin: 0 0 20px;
    font-size: 14px;
    color: #7a4c00;
}

/* ---------- Nhay toi heading ---------- */

.entry-content h1[id],
.entry-content h2[id],
.entry-content h3[id],
.entry-content h4[id],
.entry-content h5[id],
.entry-content h6[id] {
    scroll-margin-top: 90px;
}

body.admin-bar .entry-content h1[id],
body.admin-bar .entry-content h2[id],
body.admin-bar .entry-content h3[id],
body.admin-bar .entry-content h4[id],
body.admin-bar .entry-content h5[id],
body.admin-bar .entry-content h6[id] {
    scroll-margin-top: 122px;
}

@media only screen and (max-width: 48em) {
    .khs-summary {
        padding: 16px 16px;
        margin-bottom: 18px;
    }

    .khs-toc summary {
        padding: 12px 14px;
    }

    .khs-toc__list {
        padding: 0 14px 12px;
    }

    .khs-conclusion {
        padding: 18px 16px 20px;
    }
}
