/* ═══════════════════════════════════════════════
   CSS PATCH — Append to ktc-unified.css
   Bare <table> fallback + CSS specificity fixes
   ═══════════════════════════════════════════════ */

/* ── Bare Table Fallback ──
   Styles any <table> inside .entry-content that doesn't have a ktc- wrapper.
   This catches tables generated by the pipeline or written in seed articles
   without explicit wrapper classes. */

body .entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 14px;
    font-family: var(--ktc-font-b);
    border: 1px solid rgba(184,178,172,.15);
    border-radius: var(--ktc-rl);
    overflow: hidden;
}

body .entry-content table thead th,
body .entry-content table th {
    background: var(--ktc-char);
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.03em;
    padding: 10px 14px;
    text-align: left;
}

body .entry-content table tbody td,
body .entry-content table td {
    padding: 9px 14px;
    border-bottom: 1px solid rgba(184,178,172,.08);
    color: var(--ktc-char);
}

body .entry-content table tbody tr:nth-child(even) {
    background: var(--ktc-cream);
}

body .entry-content table tbody tr:nth-child(odd) {
    background: var(--ktc-milk);
}

body .entry-content table tbody tr:last-child td {
    border-bottom: none;
}

/* Responsive: horizontal scroll on mobile */
@media (max-width: 768px) {
    body .entry-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ── Genesis Search Form Fix ──
   Genesis uses .search-form-input, standard WP uses .search-field.
   Target both to ensure search bar is styled consistently. */

body .search-form input[type="search"],
body .search-form .search-form-input,
body .search-form .search-field {
    font-family: var(--ktc-font-b);
    font-size: 15px;
    padding: 10px 16px;
    border: 1px solid rgba(184,178,172,.2);
    border-radius: var(--ktc-rs);
    background: var(--ktc-milk);
    color: var(--ktc-char);
    width: 100%;
}

body .search-form input[type="search"]:focus,
body .search-form .search-form-input:focus,
body .search-form .search-field:focus {
    outline: none;
    border-color: var(--ktc-honey);
    box-shadow: 0 0 0 3px rgba(200,144,46,.1);
}
