﻿
pre {
    background: #1e1e1e !important;
    color: #dcdcdc !important;
    padding: 16px !important;
    border-radius: 8px !important;
    overflow-x: auto !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

    pre code {
        font-family: Consolas, "Courier New", monospace !important;
        font-size: 14px !important;
        white-space: pre !important;
    }

.code-wrapper {
    width: 100% !important;
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
}

.code-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    background: #2a2a2a !important;
    color: #ddd !important;
    padding: 6px 10px !important;
    font-size: 12px !important;
    border-top-left-radius: 8px !important;
    border-top-right-radius: 8px !important;
}

.code-lang {
    font-weight: bold !important;
    opacity: 0.8 !important;
    letter-spacing: 0.5px !important;
}

.code-wrapper pre {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

.copy-btn {
    background: #3a3a3a !important;
    color: #fff !important;
    border: 1px solid #555 !important;
    border-radius: 4px !important;
    padding: 2px 8px !important;
    font-size: 12px !important;
    cursor: pointer !important;
    transition: opacity 0.2s ease;
}

    .copy-btn:hover {
        background: #4a4a4a !important;
    }

.code-wrapper:hover .copy-btn {
    opacity: 1;
}

/* ===========================
   Blog post table styles
   Targets both plain <table> and
   Syncfusion .e-rte-table class
=========================== */
.post-content table,
.post-content .e-rte-table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 1.5rem 0 !important;
    font-size: 0.95rem !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    border: 1px solid #444 !important;
}

.post-content table th,
.post-content table td,
.post-content .e-rte-table th,
.post-content .e-rte-table td {
    padding: 10px 14px !important;
    border: 1px solid #444 !important;
}

.post-content table th,
.post-content .e-rte-table th {
    font-weight: 600 !important;
    color: #479ef5 !important;
    background: #2a2a2a !important;
    text-align: left !important;
}

.post-content table tr,
.post-content .e-rte-table tr {
    background: #1e1e1e !important;
    transition: background 0.15s ease !important;
}

.post-content table tr:nth-child(even),
.post-content .e-rte-table tr:nth-child(even) {
    background: #252525 !important;
}

.post-content table tr:hover,
.post-content .e-rte-table tr:hover {
    background: #333 !important;
}

/* Header row — works with or without <thead> */
.post-content table thead tr,
.post-content table tr:first-child:has(th),
.post-content .e-rte-table thead tr,
.post-content .e-rte-table tr:first-child:has(th) {
    background: #2a2a2a !important;
}

.post-content table thead tr:hover,
.post-content table tr:first-child:has(th):hover,
.post-content .e-rte-table thead tr:hover,
.post-content .e-rte-table tr:first-child:has(th):hover {
    background: #2a2a2a !important;
}
