/* ============================================================
   LTXLDL 2627-1 — CSS chung cho slide Reveal.js
   Nền tảng kế thừa từ 2526-1, bổ sung các pattern chuẩn hoá
   theo SLIDE_STYLE_GUIDE.md (badge, hộp nhấn, hai cột, figure).
   Hệ màu: xanh lam #1E93AB (cấu trúc/định nghĩa),
           cam #E8890C (điểm chốt/cảnh báo),
           xanh lá #2E8B57 (ví dụ tốt/khuyến nghị),
           đỏ #E62727 (chỉ dùng cho lỗi/sai).
   ============================================================ */

.reveal {
    font-size: 36px;
}

.reveal .slides section {
    text-align: left;
}

.reveal h2 {
    font-size: 1.45em;
    margin-bottom: 0.55em;
}

.reveal h4 {
    font-size: 1.05em;
    margin-bottom: 0.35em;
}

/* Chrome điều hướng ăn theo màu accent của index-pages.css (#D97706) */
.reveal .controls .controls-arrow {
    color: #D97706;
}

.reveal .progress span {
    background: #D97706;
}

.reveal .text-blue {
    color: #1E93AB !important;
}

.reveal .text-red {
    color: #E62727 !important;
}

.reveal .text-orange {
    color: #E8890C !important;
}

.reveal .text-green {
    color: #2E8B57 !important;
}

.reveal .text-light {
    color: #666 !important;
}

.reveal a {
    color: #1E93AB;
}

.reveal ul,
.reveal ol {
    padding-left: 1rem;
    line-height: 1.35em;
    margin-top: 0.25em;
    margin-bottom: 0.25em;
}

.reveal ul ul,
.reveal ol ol,
.reveal ul ol,
.reveal ol ul {
    font-size: 0.9em;
}

.reveal li {
    margin-bottom: 0.28em;
}

.reveal p {
    margin: 0.5em 0;
}

.reveal .text-center {
    text-align: center;
}

.reveal .text-underlined {
    text-decoration: underline;
}

.reveal .footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: left;
    font-size: 1rem;
    color: #888;
}

/* Hide footer when the first slide is showing */
.reveal section:first-of-type.present~.footer {
    display: none;
}

.reveal .keyword {
    color: #E62727;
    font-weight: bold;
}

.reveal .inline-code {
    font-family: 'Courier New', Courier, monospace;
    background-color: #f4f4f4;
    padding: 2px 4px;
    border-radius: 4px;
    text-transform: none !important;
}

.reveal .fragment.blur {
    filter: blur(5px);
}

.reveal .fragment.blur.visible {
    filter: none;
}

/* ------------------------------------------------------------
   Hộp câu hỏi (thảo luận nhanh trên lớp)
   ------------------------------------------------------------ */

.reveal .question-box {
    border: 3px solid #1E93AB;
    border-radius: 16px;
    padding: 0.7em 0.9em;
    margin: auto;
    background: #F3F2EC;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    font-size: 0.95em;
}

.reveal .question-title {
    font-weight: bold;
    color: #1E93AB;
    margin-bottom: 0.5em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.reveal .question-content {
    line-height: 1.4;
    color: #333;
}

/* ------------------------------------------------------------
   Hộp nhấn — chỉ dùng cho insight quan trọng / cảnh báo /
   nguyên tắc chốt (không dùng tràn lan).
   .key-box  : điểm chốt, insight (cam)
   .warn-box : cảnh báo, lỗi hay gặp (đỏ)
   .good-box : khuyến nghị, cách làm tốt (xanh lá)
   ------------------------------------------------------------ */

.reveal .key-box,
.reveal .warn-box,
.reveal .good-box {
    border-left: 8px solid;
    border-radius: 8px;
    padding: 0.45em 0.75em;
    margin: 0.55em 0;
    line-height: 1.3;
    font-size: 0.92em;
}

.reveal .key-box {
    border-color: #E8890C;
    background: #FDF3E3;
}

.reveal .warn-box {
    border-color: #E62727;
    background: #FBEAEA;
}

.reveal .good-box {
    border-color: #2E8B57;
    background: #EAF5EF;
}

.reveal .key-box .box-title,
.reveal .warn-box .box-title,
.reveal .good-box .box-title {
    display: block;
    font-weight: bold;
    margin-bottom: 0.25em;
}

.reveal .key-box .box-title {
    color: #C97508;
}

.reveal .warn-box .box-title {
    color: #E62727;
}

.reveal .good-box .box-title {
    color: #2E8B57;
}

/* ------------------------------------------------------------
   Badge — 📖 Tự học và 🤖 Làm với AI
   Pattern: <div class="slide-badge-row">
              <span class="self-study-badge">📖 Tự học</span>
            </div>
   đặt ngay sau <h2>.
   ------------------------------------------------------------ */

.reveal .slide-badge-row {
    margin: -0.45em 0 0.45em 0;
}

.reveal .self-study-badge,
.reveal .ai-badge {
    display: inline-block;
    font-size: 0.55em;
    font-weight: bold;
    padding: 0.15em 0.7em;
    border-radius: 999px;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

.reveal .self-study-badge {
    color: #1E93AB;
    background: #E4F2F5;
    border: 2px solid #1E93AB;
}

.reveal .ai-badge {
    color: #7A4CB0;
    background: #F1EAFA;
    border: 2px solid #7A4CB0;
}

/* ------------------------------------------------------------
   Layout hai cột
   Pattern: <div class="two-col">
              <div>...</div><div>...</div>
            </div>
   Biến thể lệch: .two-col--wide-left / .two-col--wide-right
   ------------------------------------------------------------ */

.reveal .two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1em;
    align-items: start;
}

.reveal .two-col--wide-left {
    grid-template-columns: 3fr 2fr;
}

.reveal .two-col--wide-right {
    grid-template-columns: 2fr 3fr;
}

/* ------------------------------------------------------------
   Hình + caption
   Pattern: <figure class="fig">
              <img src="..." alt="...">
              <figcaption class="caption">Câu chốt của hình.</figcaption>
            </figure>
   Chỉnh cỡ bằng style="width: 70%" trên <img> khi cần.
   ------------------------------------------------------------ */

.reveal .fig {
    margin: 0.4em auto;
    text-align: center;
}

.reveal .fig img {
    max-width: 100%;
    max-height: 460px;
    height: auto;
}

.reveal .caption {
    text-align: center;
    margin-top: 0.4em;
    font-size: 0.72em;
    font-style: italic;
    color: #666;
}

/* ------------------------------------------------------------
   Bảng — mặc định của theme trắng hơi to; .compact-table dùng
   cho bảng so sánh 3-4 cột.
   ------------------------------------------------------------ */

.reveal table.compact-table {
    font-size: 0.62em;
    line-height: 1.3;
}

.reveal table.compact-table th {
    color: #1E93AB;
}

.reveal table.compact-table td,
.reveal table.compact-table th {
    padding: 0.3em 0.6em;
}

/* ------------------------------------------------------------
   Pipeline diagram (các bước nối bằng mũi tên)
   ------------------------------------------------------------ */

.reveal .pipeline {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 0.4em;
    margin-top: 0.7em;
    flex-wrap: wrap;
    font-size: 0.7em;
}

.reveal .pipeline .stage {
    background: #F3F2EC;
    border: 2px solid #1E93AB;
    border-radius: 10px;
    padding: 0.4em;
    width: 132px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.reveal .pipeline.pipeline-wide .stage {
    width: 160px;
}

.reveal .pipeline .stage.stage-highlight {
    border-color: #E8890C;
    background: #FDF3E3;
}

.reveal .pipeline .stage-title {
    font-weight: bold;
    color: #1E93AB;
    margin-bottom: 0.3em;
    font-size: 0.85em;
}

.reveal .pipeline .stage.stage-highlight .stage-title {
    color: #C97508;
}

.reveal .pipeline .stage-desc {
    font-size: 0.68em;
    color: #333;
    line-height: 1.25;
}

.reveal .pipeline .arrow {
    display: flex;
    align-items: center;
    font-size: 1.2em;
    color: #1E93AB;
}

/* Responsive: stack nicely on narrow displays */
@media (max-width: 900px) {
    .reveal .stage {
        width: 160px;
    }
}

@media (max-width: 680px) {
    .reveal .pipeline {
        gap: 0.6em;
    }

    .reveal .arrow {
        display: none;
    }

    .reveal .stage {
        width: 100%;
        max-width: 420px;
    }
}

/* Hide line numbers ONLY for code blocks with class 'no-line-numbers' */
.reveal pre code.no-line-numbers .hljs-ln-numbers {
    display: none !important;
}

/* ============================================================
   Khối code + output kiểu Jupyter (jp-cell)
   Pattern:
   <div class="jp-cell">
     <pre class="jp-input"><code class="language-python" data-trim>
   ...code...
     </code></pre>
     <pre class="jp-output"><code class="language-text" data-trim>
   ...output...
     </code></pre>
   </div>
   ============================================================ */

:root {
    --jp-bg: #1e1f24;
    --jp-bg-2: #23252b;
    --jp-fg: #e8e8e8;
    --jp-muted: #b6b6b6;
    --jp-border: #2c2f36;
    --jp-accent: #f1c76a;
    --jp-radius: 0px;
    --jp-shadow: 0 2px 10px rgba(0, 0, 0, .35);
    --jp-padY: 8px;
    --jp-padX: 10px;
    --jp-font: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Source Code Pro", monospace;
    --jp-stdout: #c6e1a7;
    --jp-stderr: #ffb3b3;
    --jp-gutter-width: 10ch;
    /* width of the prompt gutter */
}

/* cell wrapper */
.reveal .jp-cell {
    margin: 0.8rem 0;
    background: var(--jp-bg);
    border: 1px solid var(--jp-border);
    border-radius: var(--jp-radius);
    box-shadow: var(--jp-shadow);
    overflow: hidden;
}

/* rows: fixed gutter + content */
.reveal .jp-input,
.reveal .jp-output {
    display: grid;
    grid-template-columns: var(--jp-gutter-width) 1fr;
    /* gutter | code */
    align-items: start;
    /* top-align reliably */
    margin: 0;
    padding: 0;
    width: 100%;
}

.reveal .jp-input {
    border-bottom: 1px solid var(--jp-border)
}

.reveal .jp-output {
    background: var(--jp-bg-2)
}

/* prompts (in gutter) */
.reveal .jp-input::before,
.reveal .jp-output::before {
    grid-column: 1;
    justify-self: end;
    /* right-align inside gutter */
    padding-top: var(--jp-padY);
    /* match code's top padding */
    padding-left: 1rem;
    /* inset from left cell edge */
    margin-right: .5rem;
    /* gap before code */
    font: 600 1em var(--jp-font);
    /* match line-height */
    white-space: nowrap;
}

.reveal .jp-input::before {
    content: "In  [" attr(data-jp-n) "]:";
    color: var(--jp-accent);
}

.reveal .jp-output::before {
    content: "Out [" attr(data-jp-n) "]:";
    color: var(--jp-muted);
}

/* variant: gutter thu gọn khi cần code rộng hơn */
.reveal .jp-cell.jp-plain {
    --jp-gutter-width: 1ch;
}

.reveal .jp-cell.jp-plain .jp-input::before,
.reveal .jp-cell.jp-plain .jp-output::before {
    content: "";
}

/* code/output column */
.reveal .jp-input>code,
.reveal .jp-output>code,
.reveal .jp-stdout,
.reveal .jp-stderr {
    grid-column: 2;
    padding: var(--jp-padY) var(--jp-padX) var(--jp-padY) 0;
    font: 1em var(--jp-font);
    color: var(--jp-fg);
    background: transparent !important;
    overflow-x: auto;
}

.reveal .jp-cell pre {
    margin: 0;
    border: 0;
    width: 100%;
    font-size: 0.55em;
}

/* selection */
.reveal .jp-cell ::selection {
    background: rgba(255, 255, 255, .14)
}

/* stdout/stderr tint */
.reveal .jp-stdout {
    color: var(--jp-stdout)
}

.reveal .jp-stderr {
    color: var(--jp-stderr)
}

/* compact single-line output */
.reveal .jp-output.jp-compact>code {
    padding-top: .25rem;
    padding-bottom: .25rem
}
