/* Single Van Ban Styles */
.main-container {
    display: flex;
    flex-wrap: wrap;
    margin: 0 auto;
    max-width: 1200px;
    padding: 0 15px;
}

/* Breadcrumb Styles */
.breadcrumb {
    width: 100%;
    padding: 10px 0;
    margin-bottom: 20px;
    font-size: 14px;
}

.breadcrumb a {
    color: #333;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.dside_container {
    width: 100%;
    display: flex;
    
}

/* Left Side Styles */
.dside_left {
    width: 75%;
    flex-shrink: 0;
    padding-right: 30px;
}

.docBlock__title {
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: 700;
}

/* Search Box Styles */
.docSearch_box {
    margin-bottom: 0px;
}

.docSearch_box--shadow {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 16px;
    background: #fff;
    box-shadow: 0 1px 8px 0 rgb(0 0 0 / 16%);
    -webkit-box-shadow: 0 1px 8px 0 rgb(0 0 0 / 16%);
    -moz-box-shadow: 0 0 1px 0 rgba(0,0,0,.16);
}

.dt-search-box__control {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.dt-search-box__inputwrap {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 10px;
}

.dt-search-box__input {
    flex: 1;
    padding: 10px;
    border: none;
    font-size: 16px;
    outline: none;
}

.dt-search-box__button {
    background-color: #d72027!important;
    color: #fff;
    text-align: center;
    border: 0!important;
    border-radius: 0!important;
    right: 0;
    padding: 0 12px!important;
    min-width: 95px;
}
@media (max-widt: 767px) {
    .dt-search-box__button {
        padding: 0 6px!important;
        font-size: 12px!important;
    }
}
.dt-search-box__text {
    margin-left: 5px;
}

.docSearch_box__text {
    color: #666;
    font-style: italic;
    padding: 8px 0 0;
    font-size: 12px;
}

.docSearch_box__filter {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    padding: 10px 0;
}

.docSearch_box__filter label {
    display: flex;
    align-items: center;
    margin-right: 15px;
    font-size: 12px;
}

.docSearch_box__filter input {
    margin-right: 5px;
}

/* Left Column Styles */

.dt-search-wrap {
    margin-bottom: 20px;
}

.mb-10 {
    margin-bottom: 10px;
}

/* Document Entry Styles */
#document-entry {
    background-color: #fff;
    border-radius: 4px;
    margin-bottom: 20px;
}

.document_head {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.document_head h1 {
    font-size: 22px;
    line-height: 1.4;
    margin: 0;
    color: #333;
    font-weight: 700;
}

/* Document Tabs Styles */
.document-tabs {
    background-color: #f8f8f8;
    border-bottom: 1px solid #e3e3e3;
    border-top: 1px solid #e3e3e3;
    position: sticky;
    top: 0;
    z-index: 100;
}

.document-tab_list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-x: auto;
}

.document-tab_list li {
    padding: 12px 20px;
    cursor: pointer;
    font-weight: 500;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.document-tab_list li:hover {
    background-color: #f0f0f0;
    border-bottom-color: #ddd;
}

.document-tab_list li.active {
    background-color: #fff;
    border-bottom-color: #e30000;
    color: #e30000;
}

.document-tab_list .icdwn {
    margin-right: 5px;
}


.van-ban-status {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
}

/* Còn hiệu lực - Nền xanh lá, chữ trắng */
.status-active {
    background-color: #28a745;
    color: #ffffff;
 }

/* Chưa có hiệu lực - Nền vàng cam, chữ đen */
.status-pending {
    background-color: #ffc107;
    color: #212529;
}

/* Hết hiệu lực - Nền xám, chữ đen */
.status-expired {
    background-color: #e9ecef;
    color: #495057;
}

/* Không xác định - Nền xám nhạt, chữ đen */
.status-unknown {
    background-color: #e9ecef;
    color: #495057;
    border-color: #ced4da;
}

/* Hover effects */
.van-ban-status:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

/* Document Body Styles */
.document_body {
    padding: 20px;
    border: 1px solid #ddd;
    border-top-width: 0;
}

.document-tab-pane {
    display: none;
}

.document-tab-pane.active {
    display: block;
}

.document-heading2 {
    font-size: 18px;
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    color: #333;
    font-weight: 600;
}

.text-uppercase {
    text-transform: uppercase;
}

/* Table Styles for Document Properties */
.document-effective-panel {
    margin-bottom: 20px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.table-bordered {
    border: 1px solid #ddd;
}

.table-bordered td {
    border: 1px solid #ddd;
    padding: 8px;
}

.effective-bg {
    background-color: #f9f9f9;
    width: 150px;
}

/* Content Section Styles */
.ct-section {
    line-height: 1.6;
    margin-bottom: 20px;
}

.ct-section p {
    margin-bottom: 15px;
}

.ct-section a {
    color: #0066cc;
    text-decoration: none;
}

.ct-section a:hover {
    text-decoration: underline;
}

.ct-section h1, .ct-section h2, .ct-section h3, .ct-section h4, .ct-section h5, .ct-section h6 {
    margin: 20px 0 10px;
    color: #333;
}

/* Download Section Styles */
.download_list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

.download_list li {
    margin-bottom: 10px;
}

.download_list a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: #f8f8f8;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s;
}

.download_list a:hover {
    background-color: #f0f0f0;
    text-decoration: none;
}

.download_list a i {
    margin-right: 10px;
    font-size: 20px;
    color: #e30000;
}

/* Hiệu lực Tab Styles */
.post-document {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.title-document a {
    color: #0066cc;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
}

.title-document a:hover {
    text-decoration: underline;
}

.tag-document {
    margin-top: 10px;
}

.tag-item {
    display: inline-block;
    margin-right: 10px;
    color: #666;
    text-decoration: none;
    font-size: 13px;
}

.tag-item:hover {
    text-decoration: underline;
}

.post-meta-document {
    display: flex;
    flex-wrap: wrap;
    margin-top: 15px;
}

.date-row {
    display: flex;
    width: 50%;
    margin-bottom: 5px;
}

.date-col1 {
    width: 100px;
    font-weight: 600;
}

.color-dark {
    color: #333;
}

.color-law {
    color: #e30000;
}

.mark {
    color: #666;
}

/* Block List Styles */
.block-list {
    margin-bottom: 20px;
}

.block-list-title {
    background-color: #f8f8f8;
    padding: 10px 15px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #ddd;
    border-radius: 4px 4px 0 0;
}

.block-list-content {
    padding: 15px;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
}

.article-document {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.article-document:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.desc-document {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

/* Service Contact Section */
.pnService__wrap {
    background-color: #f9f9f9;
    padding: 20px;
    margin-top: 30px;
    text-align: center;
    border-radius: 4px;
    border: 1px solid #eee;
}

.pnService__wrap .title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

.buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #e30000;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: #c60000;
}

.btn-orange {
    background-color: #ff6600;
}

.btn-orange:hover {
    background-color: #e65c00;
}

.btn i {
    margin-right: 5px;
}

/* Right Column Styles */
.dside_right {
    width: 25%;
    flex-shrink: 0;
    postition: relative;
}
.dside_right .sidebar.sticky {
    position: fixed;
    top: 100px;
    width: 18%;
    max-width: 18%;
}

.dside_right .sidebar {
    background-color: #f9f9f9;
    margin-bottom: 30px;
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    padding-right: 0;
    position: sticky;
    top: 40px; 
    /*height: calc(100vh - 40px);*/
    overflow-y: auto;
}

.dside_right .sidebar.sticky-active {
    max-width: 18%;
}
.dside_right .sidebar h3 {
    font-size: 15px;
    margin-top: 0;
    margin-bottom: 0;
    padding-bottom: 0;
    padding: 10px 16px;
    background-color: #f2f2f2;
    border-bottom: 1px solid #ddd;
}

.sidebar--border {
    border: 1px solid #eee;
}

.sidebar__header {
    padding: 10px 16px;
    background-color: #f2f2f2;
    border-bottom: 1px solid #ddd;
}

.heading-sb {
    margin: 0;
    font-size: 16px;
}

.sidebar-content {
    padding: 15px;
    max-height: 81vh;
    overflow-y: scroll;
}

/* Table of Contents Styles */
.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-item {
    margin-bottom: 8px;
}

.toc-h2 {
    padding-left: 0;
}

.toc-h3 {
    padding-left: 15px;
}

.toc-h4 {
    padding-left: 30px;
}

.toc-h5, .toc-h6 {
    padding-left: 45px;
}

/* Văn bản pháp luật specific TOC styles */
.toc-chapter {
    font-weight: bold;
    margin-top: 15px;
    padding-left: 0;
}

.toc-article {
    padding-left: 10px;
}

.toc-item a {
    color: #333;
    text-decoration: none;
    display: block;
    padding: 5px 0;
    border-bottom: 1px dotted #ddd;
    transition: color 0.2s;
}

.toc-item a:hover {
    color: #e30000;
}

/* Highlight styles for Chương and Điều in content */
#noidung .ct-section p[id^="chapter-"] {
    font-weight: bold;
    margin-top: 30px;
    margin-bottom: 20px;
    font-size: 18px;
    color: #000;
}

#noidung .ct-section p[id^="article-"] {
    font-weight: bold;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 16px;
    color: #000;
}

/* Related Posts Styles */
.post-list {
    margin: 0;
    padding: 0;
}

.post-item {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.post-title {
    font-size: 14px;
    margin: 0;
}

.post-title a {
    color: #333;
    text-decoration: none;
}

.post-title a:hover {
    color: #e30000;
    text-decoration: underline;
}

/* Văn bản liên quan styles (trong tab) */
.document-related-list {
    margin-top: 20px;
}

.related-docs-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-doc-item {
    border-bottom: 1px solid #eee;
    padding: 12px 0;
    margin-bottom: 0;
}

.related-doc-item:last-child {
    border-bottom: none;
}

.related-doc-item a {
    color: #0066cc;
    text-decoration: none;
    display: block;
    font-size: 15px;
    line-height: 1.4;
}

.related-doc-item a:hover {
    color: #e30000;
    text-decoration: underline;
}

.related-doc-number {
    font-weight: 600;
}

/* Fixed top nav on scroll */
.document-tabs.fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.dgcParent {
    max-height: 90px; /* Đã giảm xuống 90px theo yêu cầu */
    overflow: hidden;
    transition: max-height 0.3s ease;
    position: relative;
}

.dgcParent.expanded {
    max-height: 700px;
    overflow-y: scroll;
}

.dgcvm {
    color: blue;
    cursor: pointer;
    margin-top: 5px;
    display: block !important; /* Đảm bảo luôn hiển thị */
    font-size: 14px;
}

/* Thêm gradient mờ dần ở cuối khi bị cắt */
.dgcParent:not(.expanded)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20px;
    background: linear-gradient(transparent, white);
    pointer-events: none;
}

.article-reference {
    color: var(--brand-color, #007cba);
    text-decoration: underline;
    cursor: pointer;
    position: relative;
    font-weight: 600;
    transition: all 0.3s ease;
}

.article-reference:hover {
    background-color: rgba(0, 124, 186, 0.1);
    text-decoration: none;
    border-radius: 3px;
    padding: 2px 4px;
    margin: -2px -4px;
}

/* Popup modal */
.article-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.article-popup {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

.article-popup-header {
    background-color: var(--brand-color, #007cba);
    color: white;
    padding: 20px;
    border-radius: 8px 8px 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.article-popup-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.article-popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.article-popup-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.article-popup-content {
    padding: 20px;
    line-height: 1.6;
    color: #333;
}

.article-popup-content h4 {
    color: var(--brand-color, #007cba);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
}

.article-popup-content p {
    margin-bottom: 12px;
}

.article-popup-content ol, .article-popup-content ul {
    padding-left: 20px;
}

.article-popup-content li {
    margin-bottom: 8px;
}

/* Loading state */
.article-popup-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.article-popup-error {
    text-align: center;
    padding: 20px;
    color: #d63384;
    background-color: #f8d7da;
    border-radius: 4px;
    margin: 20px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(50px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .article-popup {
        width: 95%;
        max-height: 90vh;
    }
    
    .article-popup-header {
        padding: 15px;
    }
    
    .article-popup-content {
        padding: 15px;
    }
}

/* Responsive Styles */
@media (max-width: 992px) {
    .main-container {
        display: block;
    }
    .dside_container {
        flex-direction: column-reverse;
    }
    .dside_left,
    .dside_right {
        flex: 0 0 100%;
        padding-right: 0;
        width: 100%;
    }
    
    .dside_right {
        margin-top: 0px;
    }
    
    .date-row {
        width: 100%;
    }
    
    .dside_right .sidebar-content {
        height: 30vh!important;
    }
    .dside_right .collapse.show {
        margin-bottom: 15px!important;
    }
    .dside_right .sidebar {
        margin-top: 20px!important;
    }
    .dside_left .dt-search-box__button {
        padding: 0 6px!important;
    }
}

@media (max-width: 768px) {
    .document-tab_list {
        flex-wrap: nowrap;
        overflow-x: auto;
    }
    
    .document-tab_list li {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .document_head h1 {
        font-size: 18px;
    }
    
    .buttons {
        flex-direction: column;
    }
    
    .effective-bg {
        width: 100px;
    }
    
    .table-bordered td {
        padding: 5px;
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .document-tab_list li {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .document_body {
        padding: 15px;
    }
    
    .document_head {
        padding: 15px;
    }
    
    .document_head h1 {
        font-size: 16px;
    }
}