/* Converted from html-convert-to-theme/single-post.html. Do not edit IDs/classes unless the source HTML changes. */

/* #pgv-progress-css */
#pgv-read-progress {
            position: fixed;
            top: 0;
            left: 0;
            width: 0%;
            height: 3px;
            background: #f47b20;
            z-index: 9999;
            transition: width 0.08s linear;
            border-radius: 0 2px 2px 0;
            box-shadow: 0 0 8px rgba(244, 123, 32, 0.45);
        }

/* #pgv-parallax-css */
/* Post content stays above pallet background */
        body.single article,
        body.single .post-content,
        body.home .site-main,
        body.category .site-main,
        body.single-post header,
        #site-header {
            position: relative;
            z-index: 1;
        }

        #pgv-pallet-bg {
            position: fixed;
            top: 50%;
            left: 50%;
            width: clamp(500px, 88vw, 1500px);
            opacity: 0.13;
            z-index: 0;
            pointer-events: none;
            transform-origin: center center;
            will-change: transform, opacity;
        }

        @media(max-width:1023px) {
            #pgv-pallet-bg {
                width: clamp(380px, 95vw, 900px);
                opacity: 0.10;
            }
        }

        @media(max-width:767px) {
            #pgv-pallet-bg {
                width: 110vw;
                opacity: 0.08;
            }
        }

/* #pgv-toc-css */
/* â•â•â• DESKTOP TOC â€“ centered in left gap â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
        #pgv-toc-wrap {
            position: fixed;
            top: 50%;
            transform: translateY(-50%);
            /* Content max-width = 800px. Center TOC in the left gap:
           gap = (100vw - 800px)/2   |   center = gap/2   |   left = center - toc_w/2 */
            width: min(290px, calc((100vw - 800px) / 2 - 28px));
            left: max(12px, calc((100vw - 800px) / 4 - 145px));
            z-index: 800;
            display: none;
            opacity: 0;
            transition: opacity 0.3s;
        }

        #pgv-toc-inner {
            background: #fff;
            border-radius: 12px;
            box-shadow: 0 6px 32px rgba(0, 48, 135, 0.12), 0 1px 4px rgba(0, 0, 0, 0.06);
            overflow: hidden;
            border: 1px solid #e0e8f8;
        }

        #pgv-toc-head {
            padding: 13px 18px 11px;
            background: linear-gradient(135deg, #003087 0%, #1a4faa 100%);
            color: #fff;
            font-size: 12px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            user-select: none;
        }

        #pgv-toc-head-label {
            display: flex;
            align-items: center;
            gap: 7px;
        }

        #pgv-toc-head-label svg {
            opacity: 0.9;
            flex-shrink: 0;
        }

        #pgv-toc-arrow {
            font-size: 9px;
            opacity: 0.85;
            transition: transform 0.22s;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 5px;
            width: 22px;
            height: 22px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        #pgv-toc-body {
            overflow-y: auto;
            max-height: 58vh;
            padding: 10px 0 6px;
        }

        #pgv-toc-body::-webkit-scrollbar {
            width: 3px;
        }

        #pgv-toc-body::-webkit-scrollbar-track {
            background: transparent;
        }

        #pgv-toc-body::-webkit-scrollbar-thumb {
            background: #d1d5db;
            border-radius: 2px;
        }

        #pgv-toc-list {
            list-style: none !important;
            margin: 0 !important;
            padding: 0 !important;
            counter-reset: toc-h2;
        }

        #pgv-toc-list li {
            margin: 0 !important;
            padding: 0 !important;
        }

        #pgv-toc-list li.pgv-h2 {
            counter-increment: toc-h2;
        }

        #pgv-toc-list a {
            display: flex;
            align-items: flex-start;
            gap: 9px;
            padding: 7px 18px 7px 14px;
            color: #374151 !important;
            text-decoration: none !important;
            font-size: 14px;
            line-height: 1.45;
            border-left: 3px solid transparent;
            transition: all 0.15s;
        }

        #pgv-toc-list li.pgv-h2>a::before {
            content: counter(toc-h2);
            font-size: 10.5px;
            font-weight: 700;
            color: #9ca3af;
            background: #f3f4f6;
            border-radius: 50%;
            min-width: 20px;
            height: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            line-height: 1;
            transition: all 0.15s;
        }

        #pgv-toc-list li.pgv-h2>a .pgv-toc-text {
            flex: 1;
            white-space: normal;
            word-break: break-word;
            line-height: 1.4;
        }

        #pgv-toc-list a:hover {
            color: #003087 !important;
            background: #f0f5ff;
            border-left-color: #b8c8e8;
        }

        #pgv-toc-list li.pgv-h2>a.pgv-active {
            color: #003087 !important;
            background: #eef3ff;
            border-left-color: #f47b20;
            font-weight: 600;
        }

        #pgv-toc-list li.pgv-h2>a.pgv-active::before {
            background: #f47b20;
            color: #fff;
        }

        #pgv-toc-list li.pgv-h3>a {
            padding-left: 42px;
            font-size: 13px;
            color: #6b7280 !important;
        }

        #pgv-toc-list li.pgv-h3>a .pgv-toc-text {
            flex: 1;
            white-space: normal;
            word-break: break-word;
            line-height: 1.4;
        }

        #pgv-toc-list li.pgv-h3>a:hover {
            color: #1a5fd4 !important;
            background: #f8faff;
        }

        #pgv-toc-list li.pgv-h3>a.pgv-active {
            color: #1a5fd4 !important;
            background: #f0f5ff;
            border-left-color: #f47b20;
        }

        /* Progress footer */
        #pgv-toc-footer {
            padding: 8px 18px;
            border-top: 1px solid #f1f3f8;
            display: flex;
            align-items: center;
            gap: 9px;
        }

        #pgv-toc-progress-track {
            flex: 1;
            height: 4px;
            background: #f1f3f8;
            border-radius: 2px;
            overflow: hidden;
        }

        #pgv-toc-progress-fill {
            height: 100%;
            width: 0%;
            background: #f47b20;
            border-radius: 2px;
            transition: width 0.2s;
        }

        #pgv-toc-fraction {
            font-size: 11px;
            color: #9ca3af;
            white-space: nowrap;
        }

        /* Collapsed */
        #pgv-toc-wrap.pgv-col #pgv-toc-body,
        #pgv-toc-wrap.pgv-col #pgv-toc-footer {
            display: none;
        }

        #pgv-toc-wrap.pgv-col #pgv-toc-arrow {
            transform: rotate(180deg);
        }

        @media (min-width: 1280px) {
            #pgv-toc-wrap {
                display: block;
            }
        }

        /* â•â•â• MOBILE FAB + BOTTOM DRAWER (< 1280px) â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
        #pgv-toc-fab {
            display: none;
            position: fixed;
            /* Zalo: bottom:24px right:24px 56Ã—56 â€” TOC sits directly above it */
            bottom: 92px;
            right: 24px;
            width: 56px;
            height: 56px;
            border-radius: 50%;
            background: linear-gradient(135deg, #003087 0%, #1a4faa 100%);
            color: #fff;
            border: none;
            cursor: pointer;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 16px rgba(0, 48, 135, 0.4);
            z-index: 850;
            font-size: 20px;
            transition: transform 0.2s, box-shadow 0.2s;
        }

        #pgv-toc-fab:hover {
            transform: scale(1.08);
            box-shadow: 0 6px 20px rgba(0, 48, 135, 0.5);
        }

        #pgv-toc-fab .pgv-fab-badge {
            position: absolute;
            top: -4px;
            right: -4px;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: #f47b20;
            color: #fff;
            font-size: 10px;
            font-weight: 700;
            display: none;
            align-items: center;
            justify-content: center;
            line-height: 1;
        }

        @media (max-width: 1279px) {
            #pgv-toc-fab {
                display: flex;
            }
        }

        /* Mobile: match Zalo mobile size (52Ã—52, right:16) */
        @media (max-width: 767px) {
            #pgv-toc-fab {
                width: 52px;
                height: 52px;
                right: 16px;
                bottom: 84px;
                font-size: 18px;
            }
        }

        #pgv-toc-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.4);
            z-index: 899;
            backdrop-filter: blur(2px);
        }

        #pgv-toc-overlay.pgv-open {
            display: block;
        }

        #pgv-toc-drawer {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: #fff;
            border-radius: 20px 20px 0 0;
            box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.18);
            z-index: 900;
            max-height: 75vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            transform: translateY(100%);
            transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
        }

        #pgv-toc-drawer.pgv-open {
            transform: translateY(0);
        }

        #pgv-toc-drawer-handle {
            width: 40px;
            height: 4px;
            background: #d1d5db;
            border-radius: 2px;
            margin: 10px auto 0;
            flex-shrink: 0;
        }

        #pgv-toc-drawer-head {
            padding: 12px 20px 12px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-shrink: 0;
            border-bottom: 1px solid #f1f3f8;
        }

        #pgv-toc-drawer-title {
            font-weight: 700;
            color: #003087;
            font-size: 16px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        #pgv-toc-drawer-close {
            background: #f3f4f6;
            border: none;
            border-radius: 50%;
            width: 30px;
            height: 30px;
            font-size: 16px;
            color: #6b7280;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
        }

        #pgv-toc-drawer-body {
            overflow-y: auto;
            padding: 8px 0 24px;
            flex: 1;
        }

        #pgv-toc-drawer-list {
            list-style: none !important;
            margin: 0 !important;
            padding: 0 !important;
        }

        #pgv-toc-drawer-list li {
            margin: 0 !important;
            padding: 0 !important;
        }

        #pgv-toc-drawer-list a {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 20px;
            color: #374151 !important;
            text-decoration: none !important;
            font-size: 15px;
            line-height: 1.4;
            border-left: 3px solid transparent;
            transition: all 0.15s;
        }

        #pgv-toc-drawer-list li.pgv-h2>a .pgv-d-num {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: #f3f4f6;
            color: #6b7280;
            font-size: 11px;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            transition: all 0.15s;
        }

        #pgv-toc-drawer-list a.pgv-active {
            color: #003087 !important;
            background: #eef3ff;
            border-left-color: #f47b20;
            font-weight: 600;
        }

        #pgv-toc-drawer-list li.pgv-h2>a.pgv-active .pgv-d-num {
            background: #f47b20;
            color: #fff;
        }

        #pgv-toc-drawer-list li.pgv-h3>a {
            padding-left: 48px;
            font-size: 14px;
            color: #6b7280 !important;
        }

        #pgv-toc-drawer-list li.pgv-h3>a.pgv-active {
            color: #1a5fd4 !important;
            background: #f0f5ff;
            border-left-color: #f47b20;
        }
