/* String tools page (ES 15598 / EN 15570) — tables rendered by [cp_string_table] */

.cp-st-intro {
    max-width: 820px;
}

.cp-st-scroll {
    max-width: 100%;
    max-height: 75vh;
    overflow: auto;
    margin-bottom: 1.5em;
    border: 1px solid #ddd;
    -webkit-overflow-scrolling: touch;
}

.cp-st-scroll:focus-visible {
    outline: 2px solid #50870f;
    outline-offset: 2px;
}

.cp-st-table {
    width: auto;
    min-width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    font-size: .9em;
    line-height: 1.3;
}

.cp-st-table th,
.cp-st-table td {
    padding: .35em .7em;
    border: 0;
    border-right: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
}

.cp-st-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #222;
    color: #fff;
    font-weight: 600;
}

.cp-st-table th {
    text-transform: none;
    letter-spacing: 0;
}

/* second header row sits below the first (js/string-tools.js sets the exact offset) */
.cp-st-table thead tr + tr th {
    top: 2.05em;
    background: #3a3a3a;
    font-weight: 400;
}

.cp-st-table thead a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cp-st-table thead a:hover {
    color: #b9e38a;
}

.cp-st-table tbody tr:nth-child(even) > * {
    background: #f7f7f7;
}

.cp-st-table tbody tr:hover > * {
    background: #eef5e6;
}

.cp-st-table tbody th {
    font-weight: 600;
    background: #fff;
}

/* first column stays visible while scrolling sideways */
.cp-st-equivalences tbody th,
.cp-st-tunings tbody th,
.cp-st-materials tbody th {
    position: sticky;
    left: 0;
    z-index: 1;
    box-shadow: 1px 0 0 #ccc;
}

.cp-st-equivalences thead th:first-child,
.cp-st-materials thead th:nth-child(2),
.cp-st-tunings thead tr:first-child th:nth-child(2) {
    left: 0;
    z-index: 3;
}

/* diameters: separate each maker's pair of columns */
.cp-st-diameters td.cp-st-gauge,
.cp-st-diameters thead tr + tr th:nth-child(odd) {
    border-left: 2px solid #bbb;
}

.cp-st-diameters td.cp-st-gauge {
    font-weight: 600;
}

/* tunings */
.cp-st-tunings td,
.cp-st-tunings th {
    padding: .3em .5em;
}

.cp-st-tunings tbody td:nth-child(3) {
    text-align: left;
}

.cp-st-tunings .cp-st-note {
    min-width: 2.2em;
    font-family: "Times New Roman", "Noto Serif", "DejaVu Serif", serif;
    font-size: 1.1em;
}

/* fallback ♭/♯ glyphs come with wide side bearings */
.cp-st-acc {
    display: inline-block;
    margin: 0 -.12em 0 -.08em;
    font-size: .95em;
}

.cp-st-tunings .cp-st-note small {
    display: block;
    font-family: inherit;
    font-size: .75em;
    color: #666;
}

.cp-st-tunings .cp-st-hidden-col,
.cp-st-tunings tbody tr[hidden] {
    display: none;
}

/* tunings stripes follow visible rows (class set by js) */
.cp-st-tunings tbody tr:nth-child(even) > * {
    background: #fff;
}

.cp-st-tunings tbody tr.cp-st-alt > * {
    background: #f7f7f7;
}

.cp-st-tunings tbody tr:hover > * {
    background: #eef5e6;
}

.cp-st-empty {
    padding: 1em 0;
    font-style: italic;
}

.cp-st-filters {
    display: flex;
    flex-wrap: wrap;
    gap: .5em 1.5em;
    align-items: flex-end;
    margin-bottom: .8em;
}

.cp-st-filters[hidden] {
    display: none;
}

.cp-st-filters label {
    display: flex;
    flex-direction: column;
    margin: 0;
    font-size: .9em;
    font-weight: 600;
}

.cp-st-filters select {
    min-width: 12em;
    margin: .25em 0 0;
}

.cp-st-count {
    padding-bottom: .6em;
    font-size: .9em;
    color: #555;
}

/* materials wrap long text */
.cp-st-materials td:nth-child(3),
.cp-st-materials td:nth-child(5) {
    white-space: normal;
    min-width: 16em;
    text-align: left;
}

.cp-st-links {
    margin: 0 0 1em;
}

.cp-st-links li {
    margin-bottom: .5em;
}

@media (max-width: 549px) {
    .cp-st-table {
        font-size: .82em;
    }

    .cp-st-scroll {
        max-height: 70vh;
    }
}

/* ---- Tool banners ([cp_tool_banner]); everything scoped to .cp-tool-banner so Flatsome is untouched ---- */
.cp-tool-banner {
    background: #1c1a17;
    color: #fff;
    border-radius: 10px;
    padding: 14px 18px;
    margin: 0 0 16px;
    font-family: "Open Sans", Arial, sans-serif;
}
.cp-tool-banner p,
.cp-tool-banner ul,
.cp-tool-banner li {
    margin: 0;
    padding: 0;
    list-style: none;
}
.cp-tool-banner li::before,
.cp-tool-banner li::marker {
    content: none;
}
.cp-tool-banner__top {
    display: flex;
    align-items: center;
    gap: 18px;
}
.cp-tool-banner__img {
    flex: none;
    display: block;
    max-width: none;
}
.cp-tool-banner__img--cd {
    width: 96px;
    height: 96px;
    border-radius: 3px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .6);
}
.cp-tool-banner__img--screen {
    width: 120px;
    height: 80px;
    box-sizing: border-box;
    border: 3px solid #3c3830;
    border-radius: 5px;
    object-fit: cover;
    object-position: left 40%;
    background: #fff;
}
.cp-tool-banner__text {
    flex: 1;
    min-width: 0;
}
.cp-tool-banner .cp-tool-banner__title {
    font-family: Quicksand, Arial, sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.25;
    color: #fff;
    margin: 0 0 4px;
}
.cp-tool-banner .cp-tool-banner__desc {
    font-size: 13px;
    line-height: 1.45;
    color: #cfcac0;
}
.cp-tool-banner a.cp-tool-banner__cta {
    flex: none;
    display: inline-block;
    background: #3d6a0b;
    color: #fff;
    font-family: Quicksand, Arial, sans-serif;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.2;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 6px;
    white-space: nowrap;
}
.cp-tool-banner a.cp-tool-banner__cta:hover,
.cp-tool-banner a.cp-tool-banner__cta:focus {
    background: #50870f;
    color: #fff;
}
.cp-tool-banner ul.cp-tool-banner__cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin: 14px 0 0;
    padding: 14px 0 0;
    border-top: 1px solid #3c3830;
}
.cp-tool-banner ul.cp-tool-banner__cards li {
    display: flex;
}
.cp-tool-banner a.cp-tool-banner__card {
    display: block;
    width: 100%;
    background: #2d2a25;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    padding: 10px 11px;
}
.cp-tool-banner a.cp-tool-banner__card:hover,
.cp-tool-banner a.cp-tool-banner__card:focus {
    background: #3c3830;
    color: #fff;
}
.cp-tool-banner .cp-tool-banner__card-title {
    display: block;
    font-family: Quicksand, Arial, sans-serif;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
    color: #fff;
}
.cp-tool-banner .cp-tool-banner__card-desc {
    display: block;
    font-size: 12px;
    line-height: 1.4;
    color: #cfcac0;
}
/* Info header (table tabs): same box/typography, Font Awesome icon instead of an image, no CTA. */
.cp-tool-banner--info {
    margin-bottom: 14px;
}
.cp-tool-banner .cp-tool-banner__icon {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #3d6a0b;
    color: #fff;
    font-size: 22px;
    line-height: 1;
}
.cp-tool-banner a:focus-visible {
    outline: 3px solid #8fbf4f;
    outline-offset: 2px;
}
@media (max-width: 849px) {
    .cp-tool-banner__top {
        flex-wrap: wrap;
    }
    .cp-tool-banner__text {
        flex-basis: calc(100% - 140px);
    }
    .cp-tool-banner a.cp-tool-banner__cta {
        box-sizing: border-box;
        flex-basis: 100%;
        text-align: center;
    }
    .cp-tool-banner ul.cp-tool-banner__cards {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 639px) {
    .cp-tool-banner {
        padding: 12px;
    }
    .cp-tool-banner .cp-tool-banner__icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    .cp-tool-banner ul.cp-tool-banner__cards {
        grid-template-columns: 1fr;
    }
}
.cp-tool-banner .cp-tool-banner__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
