/**
 * SCG Frontend Styles
 * AI tarafından üretilen içeriklerdeki tablo, liste ve yapılandırılmış veri blokları için stiller
 */

/* ═══════════════════════════════════════
   TABLE STYLES — WordPress post content
   ═══════════════════════════════════════ */
.entry-content table,
.post-content table,
.single-post table,
article table,
.wp-block-table table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin: 1.5em 0;
    font-size: 0.95em;
    line-height: 1.6;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.entry-content table thead,
.post-content table thead,
.single-post table thead,
article table thead {
    background: linear-gradient(135deg, #1e3a5f, #2d5a8e);
    color: #fff;
}

.entry-content table th,
.post-content table th,
.single-post table th,
article table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9em;
    text-transform: none;
    letter-spacing: 0.02em;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap;
}

.entry-content table td,
.post-content table td,
.single-post table td,
article table td {
    padding: 10px 16px;
    border-bottom: 1px solid #e8ecf1;
    vertical-align: top;
    color: #334155;
}

.entry-content table tbody tr:nth-child(even),
.post-content table tbody tr:nth-child(even),
.single-post table tbody tr:nth-child(even),
article table tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

.entry-content table tbody tr:hover,
.post-content table tbody tr:hover,
.single-post table tbody tr:hover,
article table tbody tr:hover {
    background-color: #eef2ff;
    transition: background-color 0.2s ease;
}

.entry-content table tbody tr:last-child td,
.post-content table tbody tr:last-child td,
.single-post table tbody tr:last-child td,
article table tbody tr:last-child td {
    border-bottom: none;
}

/* Table without thead (AI sometimes generates headerless tables) */
.entry-content table:not(:has(thead)) tr:first-child,
.post-content table:not(:has(thead)) tr:first-child,
article table:not(:has(thead)) tr:first-child {
    background: linear-gradient(135deg, #1e3a5f, #2d5a8e);
    color: #fff;
    font-weight: 600;
}

/* ═══════════════════════════════════════
   RESPONSIVE TABLE
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
    .entry-content table,
    .post-content table,
    .single-post table,
    article table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 0.88em;
    }

    .entry-content table th,
    .entry-content table td,
    .post-content table th,
    .post-content table td,
    article table th,
    article table td {
        padding: 8px 12px;
        min-width: 120px;
    }
}

/* ═══════════════════════════════════════
   YOAST FAQ BLOCK STYLES
   ═══════════════════════════════════════ */
.schema-faq.wp-block-yoast-faq-block {
    margin: 2em 0;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.schema-faq-section {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.schema-faq-section:last-child {
    border-bottom: none;
}

.schema-faq-question {
    display: block;
    font-size: 1.05em;
    color: #1e3a5f;
    margin-bottom: 8px;
    line-height: 1.5;
}

.schema-faq-answer {
    color: #475569;
    line-height: 1.7;
    margin: 0;
}

/* ═══════════════════════════════════════
   ORDERED/UNORDERED LIST ENHANCEMENTS
   ═══════════════════════════════════════ */
.entry-content ol,
.post-content ol,
article ol {
    counter-reset: item;
    padding-left: 0;
    list-style: none;
}

.entry-content ol > li,
.post-content ol > li,
article ol > li {
    counter-increment: item;
    padding: 6px 0 6px 36px;
    position: relative;
    line-height: 1.7;
}

.entry-content ol > li::before,
.post-content ol > li::before,
article ol > li::before {
    content: counter(item);
    position: absolute;
    left: 0;
    top: 6px;
    width: 26px;
    height: 26px;
    background: #1e3a5f;
    color: #fff;
    border-radius: 50%;
    font-size: 0.8em;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.entry-content ul:not(.wp-block-yoast-faq-block *) > li,
.post-content ul:not(.wp-block-yoast-faq-block *) > li,
article ul:not(.wp-block-yoast-faq-block *) > li {
    padding: 4px 0;
    line-height: 1.7;
}
