/**
 * Comparison Table Block Styles
 *
 * Scoped to .block-comparison-table — category colours via data-category-color.
 */

.block-comparison-table .cmp-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.block-comparison-table .cmp-table {
    border-collapse: collapse;
    width: 100%;
    min-width: 760px;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.block-comparison-table .cmp-table caption {
    caption-side: bottom;
    text-align: left;
    color: #64748b;
    font-size: 0.8125rem;
    padding-top: 0.75rem;
}

.block-comparison-table .cmp-table th,
.block-comparison-table .cmp-table td {
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
    text-align: left;
    vertical-align: top;
    color: #1b2633;
}

.block-comparison-table .cmp-table thead th {
    font-size: 1rem;
    font-weight: 600;
}

.block-comparison-table .cmp-table tbody th {
    font-weight: 600;
    white-space: nowrap;
    width: 1%;
    position: sticky;
    left: 0;
    z-index: 2;
}

.block-comparison-table .cmp-table tbody tr:nth-child(even) td {
    background: #f8fafc;
}

.block-comparison-table .cmp-table tbody tr:nth-child(even) th {
    background: #f1f5f9;
}

.block-comparison-table .cmp-table .cmp-corner {
    position: sticky;
    left: 0;
    z-index: 3;
    background: inherit;
}

.block-comparison-table .cmp-table .cmp-price,
.block-comparison-table .cmp-table td strong {
    font-weight: 700;
}

.block-comparison-table .cmp-table .cmp-cta-row td {
    vertical-align: middle;
}

.block-comparison-table .cmp-table .cmp-cta-row .tbs-btn {
    width: 100%;
    justify-content: center;
    text-decoration: none;
}

/* Category colour: brand */
.block-comparison-table[data-category-color="brand"] .cmp-table thead th {
    background-color: #00adef;
    color: #ffffff;
}

.block-comparison-table[data-category-color="brand"] .cmp-table tbody th,
.block-comparison-table[data-category-color="brand"] .cmp-table .cmp-corner {
    background-color: #e5f7fe;
}

.block-comparison-table[data-category-color="brand"] .cmp-table td a:not(.tbs-btn),
.block-comparison-table[data-category-color="brand"] .cmp-note a:not(.tbs-btn) {
    color: #00adef;
    text-decoration: underline;
}

.block-comparison-table[data-category-color="brand"] .cmp-table td a:not(.tbs-btn):hover,
.block-comparison-table[data-category-color="brand"] .cmp-note a:not(.tbs-btn):hover {
    color: #008abf;
}

/* Category colour: pink */
.block-comparison-table[data-category-color="pink"] .cmp-table thead th {
    background-color: #e50058;
    color: #ffffff;
}

.block-comparison-table[data-category-color="pink"] .cmp-table tbody th,
.block-comparison-table[data-category-color="pink"] .cmp-table .cmp-corner {
    background-color: #fce5ef;
}

.block-comparison-table[data-category-color="pink"] .cmp-table td a:not(.tbs-btn),
.block-comparison-table[data-category-color="pink"] .cmp-note a:not(.tbs-btn) {
    color: #e50058;
    text-decoration: underline;
}

.block-comparison-table[data-category-color="pink"] .cmp-table td a:not(.tbs-btn):hover,
.block-comparison-table[data-category-color="pink"] .cmp-note a:not(.tbs-btn):hover {
    color: #b70046;
}

/* Category colour: gold */
.block-comparison-table[data-category-color="gold"] .cmp-table thead th {
    background-color: #ffc130;
    color: #1b2633;
}

.block-comparison-table[data-category-color="gold"] .cmp-table tbody th,
.block-comparison-table[data-category-color="gold"] .cmp-table .cmp-corner {
    background-color: #fff8e5;
}

.block-comparison-table[data-category-color="gold"] .cmp-table td a:not(.tbs-btn),
.block-comparison-table[data-category-color="gold"] .cmp-note a:not(.tbs-btn) {
    color: #cc9a26;
    text-decoration: underline;
}

.block-comparison-table[data-category-color="gold"] .cmp-table td a:not(.tbs-btn):hover,
.block-comparison-table[data-category-color="gold"] .cmp-note a:not(.tbs-btn):hover {
    color: #a67b1f;
}

/* Category colour: aqua */
.block-comparison-table[data-category-color="aqua"] .cmp-table thead th {
    background-color: #23e8bf;
    color: #1b2633;
}

.block-comparison-table[data-category-color="aqua"] .cmp-table tbody th,
.block-comparison-table[data-category-color="aqua"] .cmp-table .cmp-corner {
    background-color: #e5fdf8;
}

.block-comparison-table[data-category-color="aqua"] .cmp-table td a:not(.tbs-btn),
.block-comparison-table[data-category-color="aqua"] .cmp-note a:not(.tbs-btn) {
    color: #1cba99;
    text-decoration: underline;
}

.block-comparison-table[data-category-color="aqua"] .cmp-table td a:not(.tbs-btn):hover,
.block-comparison-table[data-category-color="aqua"] .cmp-note a:not(.tbs-btn):hover {
    color: #169a7d;
}

/* Category colour: green */
.block-comparison-table[data-category-color="green"] .cmp-table thead th {
    background-color: #80d261;
    color: #1b2633;
}

.block-comparison-table[data-category-color="green"] .cmp-table tbody th,
.block-comparison-table[data-category-color="green"] .cmp-table .cmp-corner {
    background-color: #f0faeb;
}

.block-comparison-table[data-category-color="green"] .cmp-table td a:not(.tbs-btn),
.block-comparison-table[data-category-color="green"] .cmp-note a:not(.tbs-btn) {
    color: #66a84e;
    text-decoration: underline;
}

.block-comparison-table[data-category-color="green"] .cmp-table td a:not(.tbs-btn):hover,
.block-comparison-table[data-category-color="green"] .cmp-note a:not(.tbs-btn):hover {
    color: #528a3e;
}

/* Category colour: dark */
.block-comparison-table[data-category-color="dark"] .cmp-table thead th {
    background-color: #1b2633;
    color: #ffffff;
}

.block-comparison-table[data-category-color="dark"] .cmp-table tbody th,
.block-comparison-table[data-category-color="dark"] .cmp-table .cmp-corner {
    background-color: #eef1f4;
}

.block-comparison-table[data-category-color="dark"] .cmp-table td a:not(.tbs-btn),
.block-comparison-table[data-category-color="dark"] .cmp-note a:not(.tbs-btn) {
    color: #1b2633;
    text-decoration: underline;
}

.block-comparison-table[data-category-color="dark"] .cmp-table td a:not(.tbs-btn):hover,
.block-comparison-table[data-category-color="dark"] .cmp-note a:not(.tbs-btn):hover {
    color: #151e29;
}

/* Sticky first column on zebra rows */
.block-comparison-table .cmp-table tbody tr:nth-child(even) th {
    background: #f1f5f9;
}

.block-comparison-table[data-category-color="brand"] .cmp-table tbody tr:nth-child(even) th {
    background-color: #e5f7fe;
}

.block-comparison-table[data-category-color="pink"] .cmp-table tbody tr:nth-child(even) th {
    background-color: #fce5ef;
}

.block-comparison-table[data-category-color="gold"] .cmp-table tbody tr:nth-child(even) th {
    background-color: #fff8e5;
}

.block-comparison-table[data-category-color="aqua"] .cmp-table tbody tr:nth-child(even) th {
    background-color: #e5fdf8;
}

.block-comparison-table[data-category-color="green"] .cmp-table tbody tr:nth-child(even) th {
    background-color: #f0faeb;
}

.block-comparison-table[data-category-color="dark"] .cmp-table tbody tr:nth-child(even) th {
    background-color: #eef1f4;
}

.block-comparison-table .cmp-table thead .cmp-corner {
    background-color: #ffffff;
    border-color: #e2e8f0;
}

.block-comparison-table[data-category-color="brand"] .cmp-table thead .cmp-corner {
    background-color: #00adef;
}

.block-comparison-table[data-category-color="pink"] .cmp-table thead .cmp-corner {
    background-color: #e50058;
}

.block-comparison-table[data-category-color="gold"] .cmp-table thead .cmp-corner {
    background-color: #ffc130;
}

.block-comparison-table[data-category-color="aqua"] .cmp-table thead .cmp-corner {
    background-color: #23e8bf;
}

.block-comparison-table[data-category-color="green"] .cmp-table thead .cmp-corner {
    background-color: #80d261;
}

.block-comparison-table[data-category-color="dark"] .cmp-table thead .cmp-corner {
    background-color: #1b2633;
}
