/*
 * Styles for the [hostingbm] benchmark table.
 *
 * Single two-column layout (label | value): the responsive behaviour is pure CSS (a font-size step at
 * the mobile breakpoint), so there is no dual wide/narrow render and no per-table JavaScript.
 */

table.bwp-benchmark {
    background-color: #eee;
    /* Fix a dark near-black text color so the table stays legible regardless of the theme's inherited color. */
    color: #222;
    border: 1px solid #ccc;
    width: 100%;
    margin: 0;
    /* Collapse so cells sit flush: continuous gray bars, no inter-cell gaps or theme gridlines. */
    border-collapse: collapse;
    border-spacing: 0;
}

table.bwp-benchmark td a {
    border-bottom: 2px dashed #999;
    transition: border-color 0.3s ease;
    text-decoration: none;
}

table.bwp-benchmark tbody {
    border: none;
}

/* Neutralize any per-cell borders the theme may add, so only the section bars provide contrast. */
table.bwp-benchmark td,
table.bwp-benchmark th {
    border: none;
}

table.bwp-benchmark th.title {
    font-size: 32px;
    font-weight: bold;
    text-align: center;
    padding: 20px 0 5px;
}

table.bwp-benchmark th.logo {
    font-size: 14px;
    font-weight: normal;
    text-align: center;
    padding: 5px 0 20px;
}

table.bwp-benchmark th img {
    padding: 0 5px;
    height: 30px;
    vertical-align: bottom;
}

table.bwp-benchmark td {
    font-size: 14px;
    text-align: right;
    padding: 3px 10px;
}

table.bwp-benchmark td.section {
    color: #fff;
    background-color: #666;
    font-weight: bold;
    font-size: 16px;
}

table.bwp-benchmark td.left {
    text-align: left;
}

table.bwp-benchmark td.right {
    text-align: right;
}

table.bwp-benchmark td.label {
    font-weight: bold;
    text-align: left;
}

/* Metrics grid: two label/value columns on wide screens, one on mobile (see the media query). */
table.bwp-benchmark td.metrics {
    padding: 0;
}

table.bwp-benchmark .metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

table.bwp-benchmark .metric {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    padding: 3px 10px;
}

table.bwp-benchmark .metric .label {
    font-weight: bold;
}

table.bwp-benchmark a.aff-link {
    font-weight: bold;
    color: #1866BF;
}

p.bwp-benchmark-footer {
    color: #999;
    font-size: 0.8em;
    text-align: center;
    margin-top: 5px;
}

@media (max-width: 720px) {
    table.bwp-benchmark td,
    table.bwp-benchmark td.section,
    table.bwp-benchmark .metric,
    p.bwp-benchmark-footer {
        font-size: 12px;
    }

    table.bwp-benchmark th.title {
        font-size: 20px;
    }

    /* Stack the two metric columns into one on mobile. */
    table.bwp-benchmark .metrics-grid {
        grid-template-columns: 1fr;
    }
}
