/*
 * Tables inside articles and pages (.post-body).
 *
 * Plain CSS served as-is (no Vite build), linked from layouts/app.blade.php.
 * Tailwind's reset strips table borders and cell padding, which left
 * tables in posts cramped and hard to read.
 */

.post-body table {
    width: 100%;
    margin: 2rem 0;
    border-collapse: collapse;
    font-size: 0.95rem;
    line-height: 1.6;
}

.post-body th,
.post-body td {
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    text-align: left;
    vertical-align: top;
}

.post-body th {
    background: rgba(45, 212, 191, 0.1);
    color: #fff;
    font-weight: 600;
}

.post-body tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.035);
}

.post-body tbody tr:hover td {
    background: rgba(167, 139, 250, 0.08);
}

/* The editor wraps cell text in paragraphs; drop their article spacing. */
.post-body th p,
.post-body td p {
    margin: 0;
}

.post-body caption {
    caption-side: bottom;
    padding-top: 0.6rem;
    font-size: 0.85rem;
    color: #94a3b8;
}

/* Wide tables scroll sideways on phones instead of squeezing the columns. */
@media (max-width: 640px) {
    .post-body table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .post-body th,
    .post-body td {
        padding: 0.6rem 0.75rem;
        min-width: 8rem;
    }
}
