/* ============================================================
   Trimble Trust Strip — Bricks element
   ============================================================
   Custom properties (set inline on .trm-trust by TrustStrip.php):
     --trm-trust-bg       — background
     --trm-trust-border   — top/bottom 1px border
     --trm-trust-text     — text colour
     --trm-trust-icon     — checkmark / accent colour
     --trm-trust-divider  — colour of dot / pipe separators
     --trm-trust-fs       — font size
     --trm-trust-pad-y    — vertical padding
     --trm-trust-max-w    — inner max-width (px or 'none')

   Modifiers:
     .trm-trust--checks | --dots | --pipes | --plain
     .trm-trust--align-center | --align-start | --align-between
   ============================================================ */

.trm-trust,
.trm-trust * {
    box-sizing: border-box;
}

.trm-trust {
    background: var(--trm-trust-bg, #FAFAF9);
    border-top: 1px solid var(--trm-trust-border, #E2E8F0);
    border-bottom: 1px solid var(--trm-trust-border, #E2E8F0);
    color: var(--trm-trust-text, #0F1B2E);
    font-family: inherit;
    line-height: 1.5;
}

.trm-trust__inner {
    max-width: var(--trm-trust-max-w, 1200px);
    margin: 0 auto;
    padding: var(--trm-trust-pad-y, 18px) clamp(16px, 4vw, 32px);
}

/* === List layout: grid cascade that never produces orphans ===
   ≥1100px → 4 columns (single row)
   641–1099px → 2 columns (2×2 grid)
   ≤640px → 1 column (stack)
   Items use max-content widths so the grid stays compact and centered
   instead of stretching to fill. The "space between" alignment variant
   switches to 1fr columns to spread items full-width. */
.trm-trust__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: max-content;
    column-gap: clamp(20px, 3vw, 36px);
    row-gap: 10px;
    align-items: center;
    justify-content: center;
    max-width: 100%;
}

@media (min-width: 641px) {
    .trm-trust__list {
        grid-template-columns: repeat(2, max-content);
    }
}

@media (min-width: 1100px) {
    .trm-trust__list {
        grid-template-columns: repeat(4, max-content);
    }
}

/* === Alignment === */
.trm-trust--align-start .trm-trust__list {
    justify-content: start;
}
.trm-trust--align-between .trm-trust__list {
    justify-content: stretch;
    grid-template-columns: 1fr;
    column-gap: 16px;
}
@media (min-width: 641px) {
    .trm-trust--align-between .trm-trust__list {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 1100px) {
    .trm-trust--align-between .trm-trust__list {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* === Items === */
.trm-trust__item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: var(--trm-trust-fs, 13px);
    font-weight: 500;
    color: var(--trm-trust-text, #0F1B2E);
    letter-spacing: 0.1px;
    white-space: nowrap;
}

/* On narrow screens text can be too long for nowrap — relax. */
@media (max-width: 768px) {
    .trm-trust__item {
        white-space: normal;
    }
}

.trm-trust__text {
    display: inline-block;
}

/* === Checkmark icon === */
.trm-trust__icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--trm-trust-icon, #1E40AF);
    border-radius: 999px;
    background: color-mix(in srgb, var(--trm-trust-icon, #1E40AF) 10%, transparent);
}

.trm-trust__icon svg {
    width: 12px;
    height: 12px;
    display: block;
}

/* Fallback for browsers without color-mix (pre-2023). Slight tint approximation. */
@supports not (color: color-mix(in srgb, red, blue)) {
    .trm-trust__icon {
        background: rgba(30, 64, 175, 0.10);
    }
}

/* === Dot / pipe dividers between items ===
   Only shown when the layout is a single row (desktop ≥1100px). On 2×2 and
   stack layouts dividers would appear at the start of new rows which looks
   broken — so we hide them there. */
@media (min-width: 1100px) {
    .trm-trust--dots .trm-trust__item + .trm-trust__item::before,
    .trm-trust--pipes .trm-trust__item + .trm-trust__item::before {
        content: '';
        display: inline-block;
        flex-shrink: 0;
        color: var(--trm-trust-divider, #CFD8E8);
        margin-right: 6px;
        user-select: none;
    }

    .trm-trust--dots .trm-trust__item + .trm-trust__item::before {
        content: '·';
        font-size: 1.4em;
        line-height: 1;
        margin-right: 10px;
        margin-left: -6px;
    }

    .trm-trust--pipes .trm-trust__item + .trm-trust__item::before {
        width: 1px;
        height: 1em;
        background: currentColor;
        color: var(--trm-trust-divider, #CFD8E8);
        margin-right: 12px;
        margin-left: -4px;
    }
}

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce) {
    .trm-trust * {
        transition: none !important;
    }
}
