/* assets/public_html/documentation.css */

/* --- TÙY CHỈNH CHO TRANG TÀI LIỆU (BỐ CỤC MỚI) --- */

body {
    overflow-y: auto;
}

.doc-container {
    display: flex;
    max-width: 1600px;
    margin: 30px auto;
    padding: 0 30px;
    gap: 30px;
    align-items: flex-start;
}

/* Sidebar Mục Lục */
.doc-sidebar {
    width: 240px;
    flex-shrink: 0;
    position: sticky;
    top: 30px;
}

.doc-sidebar h2 {
    font-size: 1.3em;
    color: var(--accent-primary);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    margin-top: 0;
}

.doc-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 20px 0 0 0;
}

.doc-sidebar li a {
    display: block;
    padding: 10px 15px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.2s, color 0.2s;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.doc-sidebar li a:hover {
    background-color: var(--bg-editor);
    color: var(--text-primary);
}

.doc-sidebar li a.active {
    color: var(--accent-secondary);
    font-weight: bold;
    border-left: 3px solid var(--accent-secondary);
    background-color: var(--bg-editor);
}


/* Nội dung chính */
.doc-content {
    flex-grow: 1;
    max-width: 900px;
}

.doc-content section {
    background-color: var(--bg-editor);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 25px 35px;
    margin-bottom: 30px;
}

.doc-content h1 {
    font-size: 2em;
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-icon {
    font-size: 0.8em;
    background-color: var(--accent-secondary);
    color: var(--bg-main);
    padding: 8px;
    border-radius: 6px;
    display: inline-block;
    line-height: 1;
}

/* === BẢNG MÀU ICON MỚI, ĐẸP HƠN === */
#introduction h1 .section-icon { background-color: #50C878; } /* Xanh ngọc lục bảo - Chào mừng */
#features h1 .section-icon { background-color: #F2C94C; }     /* Vàng Gold - Nổi bật tính năng */
#commands-permissions h1 .section-icon { background-color: #569CD6; } /* Xanh dương (VS Code) - Kỹ thuật */
#config-files h1 .section-icon { background-color: #B5CEA8; } /* Xanh xô thơm - Dữ liệu, file */
/* === KẾT THÚC CẬP NHẬT === */

.doc-content h2 {
    font-size: 1.5em;
    color: var(--accent-primary);
    margin-top: 40px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.doc-content p, .doc-content li {
    font-size: 1.1em;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Cột thông tin nhanh */
.doc-infobar {
    width: 250px;
    flex-shrink: 0;
    position: sticky;
    top: 30px;
}

.info-widget {
    background-color: var(--bg-editor);
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.info-widget h3 {
    margin-top: 0;
    font-size: 1.1em;
    color: var(--accent-secondary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.info-widget ul { list-style: none; padding: 0; margin: 15px 0 0 0; }
.info-widget li { color: var(--text-secondary); margin-bottom: 12px; }
.info-widget a { color: var(--text-secondary); text-decoration: none; font-weight: bold; transition: color 0.2s; }
.info-widget a:hover { color: var(--accent-secondary); }
.info-widget p { color: var(--text-secondary); line-height: 1.6; font-size: 0.95em; }
.doc-content table { width: 100%; border-collapse: collapse; margin: 25px 0; }
.doc-content th, .doc-content td { padding: 12px 15px; border: 1px solid var(--border-color); text-align: left; }
.doc-content thead { background-color: var(--bg-input); }
.doc-content th { font-size: 1.1em; color: var(--accent-secondary); }
.doc-content td code { font-size: 1em; background-color: var(--border-color); color: var(--text-primary); }

/* === CODE DROPDOWN === */
.code-dropdown {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin: 25px 0;
    overflow: hidden;
}

.code-dropdown summary {
    padding: 12px 20px;
    font-weight: bold;
    color: var(--text-secondary);
    background-color: var(--bg-input);
    cursor: pointer;
    outline: none;
    transition: background-color 0.2s;
    user-select: none;
}

.code-dropdown summary code {
    color: #A5D6A7; 
    background-color: rgba(0, 0, 0, 0.2); 
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: bold;
}

.code-dropdown[open] > summary {
    border-bottom: 1px solid var(--border-color);
}

/* ===== THAY ĐỔI Ở ĐÂY ===== */
.code-dropdown pre {
    margin: 0;
    background-color: var(--bg-input); /* Sử dụng màu nền tối có sẵn */
    overflow-x: auto;
    padding: 15px;
    line-height: 1.5em; /* Tăng chiều cao dòng cho dễ đọc */
}

.code-dropdown pre code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95em;
    white-space: pre;
    color: #e0e0e0; /* Màu chữ sáng hơn */
    background-color: transparent !important;
}
/* ===== KẾT THÚC THAY ĐỔI ===== */

/* --- FOOTER & LANGUAGE SWITCHER --- */
.footer {
    padding: 15px 20px;
    background-color: var(--bg-sidebar);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    font-size: 0.9em;
    color: var(--text-secondary);
}

.creator-name {
    font-weight: bold;
    color: var(--accent-primary);
}

.language-switcher {
    display: flex;
    gap: 5px;
}

.lang-btn {
    background: none;
    border: 1px solid var(--text-secondary);
    color: var(--text-secondary);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9em;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.lang-btn:hover {
    background-color: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.lang-btn.active {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    font-weight: bold;
}
/* ===== CSS ĐỂ TƯƠNG THÍCH VỚI ĐIỆN THOẠI (TRANG DOCUMENTATION) ===== */

@media (max-width: 992px) { /* Sử dụng breakpoint lớn hơn cho layout 3 cột */

    /* Chuyển layout chính sang dạng cột */
    .doc-container {
        flex-direction: column;
    }

    /* Các sidebar sẽ chiếm toàn bộ chiều rộng và không "dính" lại khi cuộn */
    .doc-sidebar,
    .doc-infobar {
        width: 100%;
        position: static; /* Bỏ thuộc tính sticky */
        margin-bottom: 20px;
    }
    
    .doc-content {
        max-width: 100%;
    }

    /* Điều chỉnh bảng cho dễ nhìn hơn */
    .doc-content table,
    .doc-content thead,
    .doc-content tbody,
    .doc-content th,
    .doc-content td,
    .doc-content tr {
        display: block;
    }

    .doc-content thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .doc-content tr {
        border-bottom: 2px solid var(--border-color);
        margin-bottom: 10px;
    }

    .doc-content td {
        border: none;
        border-bottom: 1px solid #4a456a;
        position: relative;
        padding-left: 50%;
        text-align: right;
    }

    .doc-content td:before {
        position: absolute;
        top: 12px;
        left: 15px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        color: var(--accent-secondary);
    }

    /* Đặt nội dung cho các tiêu đề của bảng */
    .doc-content td:nth-of-type(1):before { content: "Command"; }
    .doc-content td:nth-of-type(2):before { content: "Description"; }
    .doc-content td:nth-of-type(3):before { content: "Permission"; }
}