/*
 * 9YT SEO Engine — Frontend article styles
 * Loaded on singular post pages only.
 * Covers: responsive tables, Quick Answer box, FAQ section, proof points.
 */

/* ── Responsive table wrapper ──────────────────────────────────────────
   The wrapper scrolls horizontally on narrow screens.
   The table itself never shrinks below its natural width.
   On desktop the wrapper is invisible — it just sits there doing nothing.
──────────────────────────────────────────────────────────────────────── */
.nyt-table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* smooth momentum scroll on iOS */
    margin: 24px 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

/* Scroll indicator shadow — appears on the right when content overflows */
.nyt-table-responsive::after {
    content: '';
    display: block;
    pointer-events: none;
}

/* The table itself */
.nyt-article-table {
    width: 100%;
    min-width: 480px; /* never collapse below this — triggers scroll instead */
    border-collapse: collapse;
    font-size: 14px;
    line-height: 1.5;
    background: #fff;
}

.nyt-article-table thead {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.nyt-article-table th {
    padding: 11px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.nyt-article-table td {
    padding: 10px 16px;
    color: #1f2937;
    border-bottom: 1px solid #f0f4f8;
    vertical-align: top;
}

.nyt-article-table tbody tr:last-child td {
    border-bottom: none;
}

.nyt-article-table tbody tr:hover {
    background: #f8fafc;
}

/* First column emphasis — common in comparison tables */
.nyt-article-table td:first-child,
.nyt-article-table th:first-child {
    font-weight: 600;
}

/* ── Quick Answer box ─────────────────────────────────────────────────── */
.nyt-quick-answer {
    background: #f0f9ff;
    border-left: 4px solid #0ea5e9;
    border-radius: 0 8px 8px 0;
    padding: 14px 18px;
    margin: 20px 0 24px;
    font-size: 15px;
    line-height: 1.6;
    color: #0c4a6e;
}

.nyt-qa-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #0284c7;
    margin-bottom: 6px;
}

/* ── FAQ section ──────────────────────────────────────────────────────── */
.nyt-faq-section {
    margin-top: 32px;
    border-top: 2px solid #e5e7eb;
    padding-top: 24px;
}

.nyt-faq-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f3f4f6;
}

.nyt-faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.nyt-faq-item h3 {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px;
    line-height: 1.4;
}

.nyt-faq-item p {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.65;
    margin: 0;
}

/* ── Mobile overrides ─────────────────────────────────────────────────── */
@media (max-width: 640px) {

    .nyt-table-responsive {
        border-radius: 6px;
        margin: 16px 0;
        /* Subtle gradient on right edge to hint at scrollable content */
        background:
            linear-gradient(to right, #fff 30%, rgba(255,255,255,0)),
            linear-gradient(to left,  #f0f4f8 30%, rgba(240,244,248,0));
        background-attachment: local, local;
        background-size: 40px 100%, 40px 100%;
        background-repeat: no-repeat;
        background-position: left center, right center;
    }

    .nyt-article-table {
        font-size: 13px;
    }

    .nyt-article-table th,
    .nyt-article-table td {
        padding: 9px 12px;
    }

    .nyt-quick-answer {
        font-size: 14px;
        padding: 12px 14px;
    }
}
