/* 1. THE TERMINAL WINDOW FRAME */
.wp-block-code {
    background-color: #073642 !important; /* Solarized Dark Base */
    padding: 0 !important;
    border-radius: 12px !important;
    overflow: hidden;
    position: relative;
    border: 1px solid #002b36;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    margin: 2em 0;
}

/* 2. THE HEADER BAR (Traffic Lights / Terminal Title Bar) */
.wp-block-code::before {
    content: "● ● ●";
    display: block;
    background-color: #1a1a1a;
    color: #839496;
    padding: 12px 20px;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: 2px;
    border-bottom: 1px solid #000;
}

/* 3. THE CODE TEXT AREA */
.wp-block-code code {
    display: block;
    padding: 22px !important;
    color: #fdf6e3 !important; /* Solarized Light Text */
    background-color: transparent !important;

    font-family: 'Fira Code', 'Courier New', monospace !important;

    /* Readability without wrapping */
    font-size: clamp(13px, 1.05vw, 15px);
    line-height: 1.45;

    white-space: pre;        /* Prevent line wrapping */
    overflow-x: auto;        /* Horizontal scroll only */

    /* Font rendering improvements */
    font-variant-ligatures: contextual;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 4. SYNTAX COLORING (Solarized Palette) */
/* Targets spans injected by Prism / Highlight.js / WP plugins */

.wp-block-code .token.comment,
.wp-block-code .token.prolog,
.wp-block-code .token.doctype,
.wp-block-code .token.cdata {
    color: #586e75;
    font-style: italic;
}

.wp-block-code .token.punctuation {
    color: #93a1a1;
}

.wp-block-code .token.property,
.wp-block-code .token.tag,
.wp-block-code .token.boolean,
.wp-block-code .token.number,
.wp-block-code .token.constant,
.wp-block-code .token.symbol {
    color: #268bd2; /* Blue */
}

.wp-block-code .token.selector,
.wp-block-code .token.attr-name,
.wp-block-code .token.string,
.wp-block-code .token.char,
.wp-block-code .token.builtin,
.wp-block-code .token.inserted {
    color: #2aa198; /* Cyan */
}

.wp-block-code .token.operator,
.wp-block-code .token.entity,
.wp-block-code .token.url,
.language-css .token.string,
.style .token.string {
    color: #859900; /* Green */
}

.wp-block-code .token.atrule,
.wp-block-code .token.attr-value,
.wp-block-code .token.keyword {
    color: #859900; /* Green */
}

.wp-block-code .token.function,
.wp-block-code .token.class-name {
    color: #b58900; /* Yellow / Gold */
}

.wp-block-code .token.regex,
.wp-block-code .token.important,
.wp-block-code .token.variable {
    color: #cb4b16; /* Orange */
}

/* 5. LARGE SCREEN FONT BOOST (NO WRAPPING) */
@media (min-width: 1200px) {
    .wp-block-code code {
        font-size: 15.5px;
    }
}


/* ==========================================================================
   Gutenberg Table Block – Dark Header, Bold Text, Strong Top Border
   ========================================================================== */

.entry-content .wp-block-table {
    margin: 2em 0;
    overflow-x: auto;
}

/* Base table styling */
.entry-content .wp-block-table table {
    width: 100%;
    border-collapse: collapse;

    /* Strong outer border */
    border: 2px solid #2f2f2f;
    font-size: 14px;
    line-height: 1.45;
}

/* HEADER ROW – darker fill, bold text, strong separation */
.entry-content .wp-block-table thead th {
    background-color: #2b2b2b;   /* Darker header fill */
    color: #ffffff;

    font-weight: 700;            /* Force bold */
    text-align: left;

    padding: 10px 14px;

    /* Strong borders */
    border-top: 3px solid #1f1f1f;     /* Visible top border */
    border-bottom: 2px solid #1f1f1f;  /* Strong divider from body */

    white-space: nowrap;
}

/* BODY CELLS */
.entry-content .wp-block-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid #e0e0e0;
    color: #222;
    vertical-align: top;
}

/* Alternating row colors – lighter than header */
.entry-content .wp-block-table tbody tr:nth-child(odd) td {
    background-color: #f6f7f8;
}

.entry-content .wp-block-table tbody tr:nth-child(even) td {
    background-color: #ffffff;
}

/* Subtle hover highlight */
.entry-content .wp-block-table tbody tr:hover td {
    background-color: #eef3f7;
}

/* Numeric alignment helper (optional) */
.entry-content .wp-block-table th.is-numeric,
.entry-content .wp-block-table td.is-numeric {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Slightly tighter text on small screens */
@media (max-width: 768px) {
    .entry-content .wp-block-table table {
        font-size: 13px;
    }
}

/* Improve paragraph readability */
.entry-content p,
.entry-content li {
  line-height: 1.65;
}

/* Improve list spacing */
.entry-content ul,
.entry-content ol {
  padding-left: 1.25em;
}
.entry-content li + li {
  margin-top: 0.35em;
}


/* Blockquotes as callouts */
.entry-content blockquote {
  margin: 1.5em 0;
  padding: 0.9em 1.1em;
  border-left: 4px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 8px;
}
.entry-content blockquote p:last-child {
  margin-bottom: 0;
}

/* KBD styling for keyboard shortcuts */
.entry-content kbd {
  display: inline-block;
  padding: 0.15em 0.4em;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
  font-size: 0.9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Images: consistent rounding + subtle border */
.entry-content img {
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.08);
}

/* Smoother horizontal scrolling for code blocks */
.entry-content pre code {
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

/* =========================================================
   GitHub Gist -> Simple terminal / bash-session styling
   ========================================================= */

.entry-content .gist {
  position: relative;
  margin: 1.75rem 0;
  border-radius: 10px;
  overflow: hidden;
  background: #0b0f14;
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 10px 26px rgba(0,0,0,0.18);
}

/* Flat "terminal header" (not mac-like) */
.entry-content .gist::before {
  content: "terminal";
  display: flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.80rem;
  color: rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

/* Use the existing gist footer as a link in the header area */
.entry-content .gist .gist-meta {
  position: absolute;
  top: 0;
  right: 0;
  height: 32px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  background: transparent !important;
  border: 0 !important;
}

/* Hide everything in gist-meta except the first link */
.entry-content .gist .gist-meta a:not(:first-child),
.entry-content .gist .gist-meta span {
  display: none !important;
}

/* Style the "View on GitHub" link like a subtle terminal control */
.entry-content .gist .gist-meta a {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.60) !important;
  text-decoration: none !important;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
}

.entry-content .gist .gist-meta a:hover {
  color: rgba(255,255,255,0.90) !important;
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.18);
}

/* Remove GitHub's default "card" chrome */
.entry-content .gist .gist-file {
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.entry-content .gist .gist-data,
.entry-content .gist .blob-wrapper,
.entry-content .gist table,
.entry-content .gist .highlight {
  background: transparent !important;
  border: 0 !important;
}

/* Typography: terminal-like monospace */
.entry-content .gist .blob-code,
.entry-content .gist .blob-num,
.entry-content .gist code,
.entry-content .gist pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
  font-size: 0.92rem !important;
  line-height: 1.50 !important;
}

/* Code text */
.entry-content .gist .blob-code {
  color: rgba(255,255,255,0.88) !important;
}

/* Line numbers: subtle */
.entry-content .gist .blob-num {
  color: rgba(255,255,255,0.28) !important;
  border: 0 !important;
  background: transparent !important;
}

/* Optional: mimic a left gutter separation (like many terminals/editors) */
.entry-content .gist .blob-num {
  border-right: 1px solid rgba(255,255,255,0.06) !important;
}

/* Optional: remove line numbers entirely */
/*
.entry-content .gist .blob-num { display: none !important; }
.entry-content .gist .blob-code { padding-left: 16px !important; }
*/

