﻿/* ==== Base Style chỉ áp dụng trong #tiny-css ==== */
#tiny-css {
    font-family: 'Inter', sans-serif !important;
    line-height: 1.6;
    font-size: 16px;
    /*color: #333;*/
    word-wrap: break-word;
}
    #tiny-css * {
        color: inherit; /* kế thừa màu từ phần tử cha hoặc inline style */
    }

    #tiny-css p {
        margin: 0 0 1em;
    }

    #tiny-css h1,
    #tiny-css h2,
    #tiny-css h3,
    #tiny-css h4,
    #tiny-css h5,
    #tiny-css h6 {
        text-align: left;
        font-family: 'Inter', sans-serif !important;
        margin-top: 0.6em; /* giảm khoảng cách trên */
        margin-bottom: 0.4em; /* giảm khoảng cách dưới */
        font-weight: bold;
        line-height: 1.25; /* vừa đủ, không quá cao */
        word-spacing: normal; /* bỏ giãn chữ */
        text-justify: auto; /* bỏ ép justify */
    }
    #tiny-css p {
        margin-top: 0;
        margin-bottom: 0.6em; /* giảm bớt để không bị cách quá xa */
        line-height: 1.5; /* dễ đọc, không quá dày */
    }
    #tiny-css img {
        max-width: 100%;
        height: auto;
        display: block;
        margin: 0 auto;
    }
    #tiny-css figure.image {
        display: table;
        margin: 0 auto;
    }

    #tiny-css figure.image img {
        display: block;
        margin: 0 auto;
    }

    #tiny-css figure.image figcaption {
        text-align: center;
        font-size: 0.9em;
        color: #666;
    }
    #tiny-css table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 1em;
    }

    #tiny-css table,
    #tiny-css th,
    #tiny-css td {
        border: 1px solid #ccc;
    }

    #tiny-css th,
    #tiny-css td {
        padding: 8px;
        text-align: left;
    }

    #tiny-css table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    #tiny-css ul,
    #tiny-css ol {
        margin: 0 0 1em 1.5em;
    }

    #tiny-css li {
        margin-bottom: 0.5em;
    }

    #tiny-css blockquote {
        border-left: 4px solid #ccc;
        padding-left: 1em;
        color: #666;
        margin: 1em 0;
    }

    #tiny-css .video-wrapper {
        position: relative;
        padding-bottom: 56.25%;
        height: 0;
    }

        #tiny-css .video-wrapper iframe {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }

/* ==== Responsive ==== */
@media screen and (max-width: 767px) {
    #tiny-css {
        font-size: 14px;
    }

        #tiny-css h1 {
            font-size: 1.3em;
        }
        #tiny-css h2 {
            font-size: 1.2em;
        }
        #tiny-css h3 {
            font-size: 1.1em;
        }
        #tiny-css h4 {
            font-size: 0.9em;
        }

        #tiny-css h5 {
            font-size: 0.8em;
        }

        #tiny-css h6 {
            font-size: 0.7em;
        }
        #tiny-css blockquote {
            font-size: 0.95em;
        }
        #tiny-css p {
            font-size: 1em;
        }
}

@media screen and (min-width: 768px) and (max-width: 1023px) {
    #tiny-css {
        font-size: 15px;
    }

        #tiny-css h1 {
            font-size: 1.6em;
        }
        #tiny-css h2 {
            font-size: 1.5em;
        }
        #tiny-css h3 {
            font-size: 1.4em;
        }
        #tiny-css h4 {
            font-size: 1.2em;
        }

        #tiny-css h5 {
            font-size: 1em;
        }

        #tiny-css h6 {
            font-size: 0.9em;
        }
}

@media screen and (min-width: 1024px) {
    #tiny-css {
        font-size: 16px;
    }

        #tiny-css h1 {
            font-size: 2em;
        }
        #tiny-css h2 {
            font-size: 1.7em;
        }
        #tiny-css h3 {
            font-size: 1.4em;
        }
        #tiny-css h4 {
            font-size: 1.2em;
        }
        #tiny-css h5 {
            font-size: 1em;
        }
        #tiny-css h6 {
            font-size: 0.9em;
        }
}
