/* 
   SITE.CSS - Minimalist Soft Gray Theme
*/


:root {
    --primary-color: #1a202c;
    --bg-card: #ffffff;
    --text-main: #1a202c;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
}

body {
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

/* Container bọc nội dung CKEditor */
.ck-content {
    font-size: 1.05rem !important;
    line-height: 1.75 !important;
    color: var(--text-main) !important;
    word-wrap: break-word !important;
}

/* Heading styles - Flat & Clean */
.ck-content h1 {
    font-size: 1.08rem !important;
    font-weight: 700 !important;
    margin: 0.4rem 0;
    color: #000 !important;
    letter-spacing: -0.3px !important;
}

.ck-content h2 {
    font-size: 1.02rem !important;
    font-weight: 600 !important;
    margin: 0.4rem 0;
    color: #000 !important;
    letter-spacing: -0.3px !important;
}

.ck-content h3 {
    font-size: 0.96rem !important;
    font-weight: 650 !important;
    margin: 0.35rem 0;
    letter-spacing: -0.3px !important;
}

.ck-content h4 {
    font-size: 0.9rem !important;
    font-weight: 650 !important;
    margin: 0.35rem 0;
    letter-spacing: -0.3px !important;
}

@media (min-width: 768px) {
    .ck-content h1 {
        font-size: 1.22rem !important;
        margin: 0.5rem 0;
    }

    .ck-content h2 {
        font-size: 1.12rem !important;
        margin: 0.45rem 0;
    }

    .ck-content h3 {
        font-size: 1.05rem !important;
        margin: 0.4rem 0;
    }

    .ck-content h4 {
        font-size: 0.98rem !important;
        margin: 0.35rem 0;
    }
}

/* Paragraphs */
.ck-content p {
    font-size: 16px !important;
    margin-bottom: 0.8rem !important;
    text-align: justify !important;
    letter-spacing: -0.2px !important;
}

/* Lists */
.ck-content ul,
.ck-content ol {
    margin-bottom: 1rem !important;
    padding-left: 2rem !important;
}

.ck-content ul {
    list-style-type: disc !important;
}

.ck-content ol {
    list-style-type: decimal !important;
}

.ck-content li,
.ck-content ol {
    font-size: 16px !important;
    margin-bottom: 0.2rem !important;
    letter-spacing: -0.2px !important;
}

/* Images - Flat with subtle border */
.ck-content .image {
    margin: 1.5rem 0 !important;
}

.ck-content .image img {
    border-radius: 12px !important;
    border: 1px solid var(--border-color) !important;
    max-width: 100% !important;
    height: auto !important;
}

/* Tables - Minimalist Grey Header */
.ck-content figure.table {
    width: 100% !important;
    margin: 1rem 0 !important;
}

.ck-content table {
    width: 100% !important;
    min-width: 100% !important;
    border-collapse: collapse !important;
    background-color: var(--bg-card) !important;
    margin-bottom: 10px;
}

.ck-content table td,
.ck-content table th {
    padding: 6px 10px !important;
    border: 1px solid var(--border-color) !important;
    font-size: 15.4px;
    letter-spacing: -0.2px !important;
}

.ck-content table th {
    background-color: #f1f5f9 !important;
    font-weight: 600 !important;
    text-align: left !important;
    color: #475569 !important;
}

/* Blockquotes - Soft Gray */
.ck-content blockquote {
    padding: 0.5rem !important;
    border-left: 3px solid #008da5 !important;
    background-color: #e3f2f8 !important;
    font-style: inherit !important;
    color: #2c2c2c !important;
}

/* Links */
.ck-content a {
    color: #2563eb !important;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(37, 99, 235, 0.2) !important;
}

.ck-content a:hover {
    border-bottom: 1px solid rgba(37, 99, 235, 1) !important;
}

/* Custom Slim Scrollbar for Webkit Browsers (Chrome, Safari, Edge, Opera) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f8fafc;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}

/* Firefox scrollbar support */
* {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f8fafc;
}

/* Sticky workspace styles for Quiz / Exam Do page */
@media (min-width: 1024px) {
    .sticky-sidebar {
        position: sticky !important;
        top: 153px !important;
        align-self: start !important;
    }
}

.sticky-topbar {
    position: sticky !important;
    top: 57px !important;
    z-index: 40 !important;
}

/* Align CKEditor elements inline inside option container to prevent paragraph margins from causing vertical misalignment */
.option-content p {
    margin: 0 !important;
    display: inline !important;
}

/* Khóa cuộn trang khi mở Mobile Menu Drawer (Giống Namhahome) */
html.is-menu-open,
body.is-menu-open {
    overflow: hidden !important;
    overflow-x: hidden !important;
    height: 100% !important;
    position: fixed !important;
    width: 100% !important;
}

/* Hiệu ứng dịch chuyển nguyên khối (Push Menu giống Facebook/Namhahome) */
#appMasterWrapper {
    transition: transform 0.12s cubic-bezier(0.4, 0, 0.2, 1) !important;
    width: 100%;
}

body.is-menu-open #appMasterWrapper {
    transform: translateX(280px) !important;
}

/* Khóa cuộn khi mở Filter Mobile Bottom Sheet */
body.is-filter-open {
    overflow: hidden !important;
}

/* Custom Input Validation Error Styles */
.input-validation-error {
    border-bottom-color: #ef4444 !important;
}

.field-validation-error {
    font-size: 11px;
    color: #ef4444;
    display: block;
    margin-top: 4px;
}

/* Custom Location Picker Toggle Switch */
#toggle {
    transition: transform 0.25s ease-in-out, border-color 0.25s ease-in-out;
}

#toggle:checked {
    transform: translateX(100%) !important;
    border-color: #ee4d2d !important;
}

#toggle:checked+label {
    background-color: #ee4d2d !important;
}

/* ==========================================================
   PRODUCT SHORTCODE CARD OVERRIDES
   ========================================================== */
.ck-content .product-shortcode-card,
.product-shortcode-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    width: fit-content !important;
    max-width: 500px !important;
    margin: 1rem 0 !important;
    padding: 0 !important;
    border-radius: 5px !important;
    background-color: #ffffff !important;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgb(209, 213, 219) 0px 0px 0px 1px inset;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.ck-content .product-shortcode-card a,
.product-shortcode-card a {
    border-bottom: none !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

.ck-content .product-shortcode-card .product-thumb-link,
.product-shortcode-card .product-thumb-link {
    width: 115px !important;
    min-width: 115px !important;
    max-width: 115px !important;
    min-height: 115px !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    display: block !important;
    align-self: stretch !important;
}

.ck-content .product-shortcode-card .product-thumb-link img,
.product-shortcode-card .product-thumb-link img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 0 !important;
    margin: 0 !important;
    border: none !important;
}

.ck-content .product-shortcode-card .product-info-wrap,
.product-shortcode-card .product-info-wrap {
    flex: 1 !important;
    min-width: 0 !important;
    padding: 10px 14px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    gap: 4px !important;
}

.ck-content .product-shortcode-card a.product-title,
.product-shortcode-card a.product-title {
    color: #0f172a !important;
    font-weight: 500 !important;
    font-size: 15px !important;
    line-height: 1.35 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin: 0 !important;
}


.ck-content .product-shortcode-card .product-price-rating-wrap,
.product-shortcode-card .product-price-rating-wrap {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 6px 14px !important;
}

.ck-content .product-shortcode-card .product-price-wrap,
.product-shortcode-card .product-price-wrap {
    display: flex !important;
    align-items: baseline !important;
    gap: 6px !important;
}

.ck-content .product-shortcode-card .price-current,
.product-shortcode-card .price-current {
    color: #ee4d2d !important;
    font-weight: 700 !important;
    font-size: 17px !important;
}

.ck-content .product-shortcode-card .price-old,
.product-shortcode-card .price-old {
    color: #94a3b8 !important;
    font-size: 13px !important;
    text-decoration: line-through !important;
}

.ck-content .product-shortcode-card .product-rating-wrap,
.product-shortcode-card .product-rating-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.ck-content .product-shortcode-card .stars,
.product-shortcode-card .stars {
    color: #f59e0b !important;
    display: flex !important;
    gap: 2px !important;
    font-size: 12px !important;
}

.ck-content .product-shortcode-card .review-count,
.product-shortcode-card .review-count {
    color: #94a3b8 !important;
    font-size: 12px !important;
}

.ck-content .product-shortcode-card .product-action-wrap,
.product-shortcode-card .product-action-wrap {
    margin-top: 2px !important;
}

.ck-content .product-shortcode-card a.btn-buy-now,
.product-shortcode-card a.btn-buy-now {
    display: inline-block !important;
    background-color: #008da5 !important;
    color: #ffffff !important;
    font-size: 14px !important;
    padding: 5px 18px !important;
    border-radius: 3px !important;
    border: none !important;
    border-bottom: none !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: background-color 0.2s !important;
}

.ck-content .product-shortcode-card a.btn-buy-now:hover,
.product-shortcode-card a.btn-buy-now:hover {
    background-color: #008da5 !important;
    color: #ffffff !important;
}

/* ==========================================================
   CHECKOUT PAGE STYLES
   ========================================================== */
.shopee-border-strip {
    background-position: 0 0;
    background-image: repeating-linear-gradient(45deg, #ef4d2d, #ef4d2d 33px, transparent 33px, transparent 41px, #4687ee 41px, #4687ee 74px, transparent 74px, transparent 82px);
    background-size: 116px 3px;
    height: 3px;
    width: 100%;
}

/* Loại bỏ viền nhấp nháy/vùng đen khi click trên điện thoại hoặc trình duyệt */
#btn-pay-cod,
#btn-pay-bank,
#btn-pay-cod *,
#btn-pay-bank * {
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

#btn-pay-cod:focus,
#btn-pay-bank:focus,
#btn-pay-cod:active,
#btn-pay-bank:active {
    outline: none !important;
    box-shadow: none !important;
}