/* =============================================
   CSS3 Learning Docs — Global Stylesheet
   ============================================= */

/* ---------- Headings ---------- */
h1.text-success,
h2.text-success,
h3.text-success,
h4.text-success {
    color: #2e7d52 !important;
}

/* ---------- Code Blocks (pre) ---------- */
pre {
    background-color: #f6f8fa;
    color: #24292e;
    border-radius: 8px;
    padding: 1.2rem 1.4rem;
    padding-top: 2.4rem;   /* room for the Copy button */
    font-size: 0.88rem;
    line-height: 1.7;
    overflow-x: auto;
    border: 1px solid #d0d7de;
    margin: 1rem 0 1.4rem;
    position: relative;
}

/* ---------- Copy Code Button ---------- */
.copy-code-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.6rem;
    background: #ffffff;
    color: #57606a;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    padding: 4px 6px;
    font-size: 0;           /* hide any stray text */
    line-height: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    user-select: none;
}

.copy-code-btn:hover {
    background: #f3f4f6;
    color: #24292e;
    border-color: #adb5bd;
}

.copy-code-btn.copied {
    background: #198754;
    color: #ffffff;
    border-color: #198754;
}


pre code {
    font-family: 'Consolas', 'Fira Code', 'Courier New', monospace;
    font-size: inherit;
    color: inherit;
    background: none;
    padding: 0;
}

/* ---------- Inline code ---------- */
code {
    background-color: #f0f4ff;
    color: #c7254e;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', 'Fira Code', 'Courier New', monospace;
    font-size: 0.875em;
}

/* ---------- Keyboard keys (kbd) ---------- */
kbd {
    background-color: #f1f3f5;
    color: #212529;
    border: 1px solid #ced4da;
    border-bottom: 2px solid #adb5bd;
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 0.82em;
    font-family: 'Consolas', 'Fira Code', 'Courier New', monospace;
}

/* ---------- Page navigation (Next / Prev buttons) ---------- */
.page-nav {
    margin-top: 2.5rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ---------- Note / Tip / Warning boxes ---------- */
.note-box {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 6px;
    padding: 0.8rem 1rem;
    margin: 1rem 0;
    font-size: 0.93rem;
}

.tip-box {
    background-color: #d1e7dd;
    border-left: 4px solid #198754;
    border-radius: 6px;
    padding: 0.8rem 1rem;
    margin: 1rem 0;
    font-size: 0.93rem;
}

.warning-box {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    border-radius: 6px;
    padding: 0.8rem 1rem;
    margin: 1rem 0;
    font-size: 0.93rem;
}

/* ---------- Tables ---------- */
.table {
    border-color: #a3cfbb !important;
}

.table-bordered> :not(caption)>*>* {
    border-color: #a3cfbb;
}

.table thead.table-dark {
    background-color: #198754 !important;
    color: #ffffff;
}

.table thead.table-dark th {
    background-color: #198754;
    border-color: #146c43;
}

.table tbody tr:hover {
    background-color: #f0faf4;
}