/* =====================================================================
   İçerik tabloları — Word'den yapıştırılan tabloların site görünümü
   =====================================================================
   Panelde gövde alanları artık tablo kabul ediyor. HtmlCleaner her tabloyu
   `.ap-table-wrap` sarmalayıcısına alır; sarmalayıcı mobilde yatay kaydırma
   verir, böylece çok kolonlu bir Yargıtay tablosu sayfa düzenini kırmaz.

   `.blog-content table` kuralları, henüz panelden yeniden kaydedilmemiş eski
   kayıtlar için: onlarda sarmalayıcı yok.

   Bu dosya her dilde yüklenir. Sağdan sola düzen rtl.css'te, `[dir="rtl"]`
   ile sınırlı olarak ele alınır — buraya RTL kuralı yazılmaz.
   ===================================================================== */

.ap-table-wrap {
    margin: 1.5rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ap-table-wrap > table,
.blog-content table {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-collapse: collapse;
    background-color: transparent;
    font-size: 0.95em;
    line-height: 1.6;
}

/* Sarmalayıcısı olmayan eski tablolar da mobilde kaydırılabilsin. */
.blog-content > table,
.blog-content p > table {
    display: block;
    overflow-x: auto;
}

.ap-table-wrap > table th,
.ap-table-wrap > table td,
.blog-content table th,
.blog-content table td {
    padding: 0.55rem 0.7rem;
    border: 1px solid #d3d8e0;
    vertical-align: top;
    text-align: inherit;
    /* Word'den gelen uzun dava numaraları hücreyi taşırmasın. */
    overflow-wrap: break-word;
    word-break: normal;
}

.ap-table-wrap > table th,
.ap-table-wrap > table thead td,
.blog-content table th,
.blog-content table thead td {
    background-color: #f2f4f7;
    font-weight: 600;
}

.ap-table-wrap > table tbody tr:nth-child(even) > td,
.blog-content table tbody tr:nth-child(even) > td {
    background-color: #fafbfc;
}

/* Hücre içindeki tek paragraf satırı gereksiz yüksek göstermesin. */
.ap-table-wrap > table td > p:only-child,
.ap-table-wrap > table th > p:only-child,
.blog-content table td > p:only-child,
.blog-content table th > p:only-child {
    margin-bottom: 0;
}

/* Tablo içindeki metin, gövdenin iki yana yaslamasını devralmasın:
   dar hücrelerde kelimeler arası boşluk aşırı açılıyor. */
.ap-table-wrap > table td,
.ap-table-wrap > table th,
.blog-content table td,
.blog-content table th {
    text-align: start;
}

/* Gövdeye yapıştırılan görseller de taşmasın. */
.ap-table-wrap > table img,
.blog-content img {
    max-width: 100%;
    height: auto;
}

/* Çok kolonlu tablolar telefonda okunamayacak kadar sıkışmasın;
   sarmalayıcı yatay kaydırmayı zaten veriyor. */
@media (max-width: 575px) {
    .ap-table-wrap > table {
        min-width: 480px;
    }

    .ap-table-wrap > table th,
    .ap-table-wrap > table td,
    .blog-content table th,
    .blog-content table td {
        padding: 0.4rem 0.5rem;
        font-size: 0.9em;
    }
}

/* ---------------------------------------------------------------------
   Koyu tema (.theme-dark)
   --------------------------------------------------------------------- */
.theme-dark .ap-table-wrap > table th,
.theme-dark .ap-table-wrap > table td,
.theme-dark .blog-content table th,
.theme-dark .blog-content table td {
    border-color: #3a4049;
    color: #e6e8eb;
}

.theme-dark .ap-table-wrap > table th,
.theme-dark .ap-table-wrap > table thead td,
.theme-dark .blog-content table th,
.theme-dark .blog-content table thead td {
    background-color: #272b31;
}

.theme-dark .ap-table-wrap > table tbody tr:nth-child(even) > td,
.theme-dark .blog-content table tbody tr:nth-child(even) > td {
    background-color: #22262b;
}
