/*
 * Biztech_HyvaTestimonial
 * Styles for the Testimonials widget. Every selector is scoped to .bt-testimonials
 * so nothing outside the widget is affected. Loaded only on pages that contain the widget.
 */

.bt-testimonials {
    --bt-red: #d8252e;
    --bt-black: #000000;
    --bt-ink: #040503;
    --bt-grey: #52575a;
    --bt-line: #dbddde;
    --bt-strip: #f0f0f2;
    --bt-panel: #f1f1f3;
    --bt-pp: 2;
    --bt-gap: 1rem;
    box-sizing: border-box;
    width: 100%;
    color: var(--bt-ink);
}

.bt-testimonials *,
.bt-testimonials *::before,
.bt-testimonials *::after {
    box-sizing: border-box;
}

.bt-testimonials.bt-pp-3 {
    --bt-pp: 3;
}

/*
 * Cards per view: 2 or 3 from 1280px, 2 from 992px, 1 below 992px (tablet and phone).
 * The ".98" widths keep fractional viewport widths (browser zoom) from falling between rules.
 */
@media (max-width: 1279.98px) {
    .bt-testimonials,
    .bt-testimonials.bt-pp-3 {
        --bt-pp: 2;
    }
}

@media (max-width: 991.98px) {
    .bt-testimonials,
    .bt-testimonials.bt-pp-3 {
        --bt-pp: 1;
    }
}

.bt-testimonials .bt-title {
    margin: 0 0 0.75rem;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--bt-ink);
}

/* ---------- card ---------- */

.bt-testimonials .bt-card {
    display: flex;
    flex: 1 1 auto;
    width: 100%;
    min-height: 150px;
    overflow: hidden;
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16), 0 6px 16px rgba(0, 0, 0, 0.06);
}

.bt-testimonials .bt-card__logo {
    display: flex;
    flex: 0 0 27%;
    align-items: center;
    justify-content: center;
    min-width: 86px;
    max-width: 130px;
    padding: 10px;
    background: var(--bt-panel);
    text-align: center;
}

.bt-testimonials .bt-card__logo img {
    display: block;
    max-width: 100%;
    max-height: 74px;
    object-fit: contain;
}

.bt-testimonials .bt-card__logo-name {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--bt-grey);
    overflow-wrap: anywhere;
}

.bt-testimonials .bt-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 14px 18px;
    font-family: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
    color: #111111;
}

.bt-testimonials .bt-card__quote {
    margin: 0;
    font-size: 0.906rem;
    line-height: 1.45;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.bt-testimonials .bt-card__author {
    display: flex;
    flex-direction: column;
    margin: 0 0 0 22%;
    font-size: 0.844rem;
    line-height: 1.4;
}

.bt-testimonials .bt-card__name {
    font-weight: 600;
}

/*
 * ---------- list layout (used on the Testimonials page) ----------
 * One testimonial per row: a wide logo panel on the left, the quote and the author on the
 * right. The layout is called "grid" in the widget settings and in the class names.
 */

.bt-testimonials .bt-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 24px;
    background: var(--bt-strip);
}

.bt-testimonials--grid .bt-card {
    min-height: 190px;
}

.bt-testimonials--grid .bt-card__logo {
    flex: 0 0 200px;
    min-width: 200px;
    max-width: none;
    padding: 20px;
}

.bt-testimonials--grid .bt-card__logo img {
    max-height: 90px;
}

.bt-testimonials--grid .bt-card__logo-name {
    font-size: 1rem;
}

.bt-testimonials--grid .bt-card__body {
    justify-content: flex-start;
    gap: 18px;
    padding: 24px 28px;
}

.bt-testimonials--grid .bt-card__quote {
    font-size: 1.0625rem;
    line-height: 1.6;
}

.bt-testimonials--grid .bt-card__quote::before {
    content: "\201C";
    display: block;
    height: 1.75rem;
    font-size: 3.5rem;
    line-height: 1;
    color: var(--bt-red);
}

.bt-testimonials--grid .bt-card__author {
    margin: 0;
    padding-top: 14px;
    border-top: 1px solid var(--bt-line);
    font-size: 0.9375rem;
}

.bt-testimonials--grid .bt-card__name {
    font-size: 1rem;
}

/* ---------- placement fix ---------- */

/*
 * The theme fixes .home-page-welcome to a height of 330px below 768px. Content placed
 * inside it, such as this widget, then spills over the next section. Let the container
 * grow, only where it holds this widget.
 */
.home-page-welcome:has(.bt-testimonials) {
    height: auto;
}

/* ---------- slider layout ---------- */

.bt-testimonials--slider .bt-stage {
    position: relative;
}

.bt-testimonials--slider .splide {
    padding: 16px;
    background: var(--bt-strip);
    visibility: visible;
}

.bt-testimonials--slider .splide__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.bt-testimonials--slider .splide__slide {
    display: flex;
    list-style: none;
}

/*
 * Before the slider library has mounted (and when it has not loaded yet) show the first
 * cards in a stable row, so there is no blank area and no jump when the slider starts.
 * These rules stop applying as soon as the widget marks itself ready.
 */
.bt-testimonials--slider:not(.bt-ready) .splide__track {
    overflow: hidden;
}

.bt-testimonials--slider:not(.bt-ready) .splide__list {
    display: flex;
    gap: var(--bt-gap);
    width: 100%;
}

.bt-testimonials--slider:not(.bt-ready) .splide__slide {
    flex: 0 0 calc((100% - var(--bt-gap) * (var(--bt-pp) - 1)) / var(--bt-pp));
    min-width: 0;
}

.bt-testimonials--slider:not(.bt-ready) .splide__arrows {
    display: none;
}

/*
 * Arrows (created by the slider library). They copy the "Popular Brands" arrows of the
 * homepage (theme home.css): 30px round, grey, white chevron, placed 3em outside the
 * slider edges, so every arrow on the homepage looks and lines up the same. Outside
 * arrows need free page margin (about 45px), which the page only has from 1280px wide;
 * below that they sit inside the strip and the strip leaves room for them.
 */

.bt-testimonials--slider .splide__arrow {
    width: 30px;
    height: 30px;
    background: #b4b4b4;
    border: 0;
    border-radius: 50%;
}

.bt-testimonials--slider .splide__arrow svg {
    font-size: 12px;
    fill: #ffffff;
}

.bt-testimonials--slider .splide__arrow:focus-visible {
    outline: 3px solid #1e40af;
    outline-offset: 2px;
}

.bt-testimonials--slider .splide__arrow--prev {
    left: 5px;
    right: auto;
}

.bt-testimonials--slider .splide__arrow--next {
    right: 5px;
    left: auto;
}

@media (min-width: 1280px) {
    .bt-testimonials--slider .splide__arrow--prev {
        left: -3em;
    }

    .bt-testimonials--slider .splide__arrow--next {
        right: -3em;
    }
}

@media (max-width: 1279.98px) {
    .bt-testimonials--slider .splide {
        padding-right: 40px;
        padding-left: 40px;
    }
}

.bt-testimonials--slider.bt-no-nav .splide__arrows {
    display: none;
}

.bt-testimonials--slider.bt-no-nav .splide {
    padding-right: 16px;
    padding-left: 16px;
}

/* ---------- "View all" link ---------- */

.bt-testimonials .bt-viewall {
    display: inline-block;
    margin-top: 0.875rem;
    font-weight: 600;
    color: var(--bt-ink);
    text-decoration: none;
    border-bottom: 2px solid var(--bt-red);
}

.bt-testimonials .bt-viewall:hover,
.bt-testimonials .bt-viewall:focus-visible {
    color: var(--bt-red);
}

/* ---------- small screens ---------- */

/* On the Testimonials page a sidebar narrows the content column up to 991px, so the logo panel shrinks. */
@media (max-width: 991.98px) {
    .bt-testimonials--grid .bt-card__logo {
        flex-basis: 150px;
        min-width: 150px;
        padding: 16px;
    }

    .bt-testimonials--grid .bt-card__body {
        padding: 20px;
    }
}

@media (max-width: 767.98px) {
    .bt-testimonials .bt-title {
        font-size: 1.5rem;
    }

    .bt-testimonials .bt-grid {
        padding: 12px;
    }

    .bt-testimonials--slider .splide {
        padding: 10px 36px;
    }

    .bt-testimonials--slider .splide__arrow--prev {
        left: 3px;
    }

    .bt-testimonials--slider .splide__arrow--next {
        right: 3px;
    }
}

/* Phones: the logo goes above the text so the text keeps the full card width. */
@media (max-width: 599.98px) {
    .bt-testimonials .bt-card,
    .bt-testimonials--grid .bt-card {
        flex-direction: column;
        min-height: 0;
    }

    .bt-testimonials .bt-card__logo {
        flex: 0 0 auto;
        width: 100%;
        min-width: 0;
        max-width: none;
        min-height: 64px;
        padding: 12px;
    }

    .bt-testimonials .bt-card__logo img {
        max-height: 44px;
    }

    .bt-testimonials .bt-card__body {
        padding: 14px;
    }

    .bt-testimonials .bt-card__author {
        margin-left: 0;
    }
}

/*
 * ---------- pagination (list layout) ----------
 * The page buttons copy the pager used elsewhere on the site (theme custom.css, for example
 * the previous and next arrows on the lightWELD pages): 28px white boxes with a #ddd border and
 * 3px corners, a chevron drawn with a rotated bordered square, red on hover with a white
 * chevron, and a red current page. Previous and next have no words, only the arrow.
 */

.bt-testimonials .bt-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 24px;
    margin-top: 20px;
    padding: 14px 20px;
    background: #ffffff;
    border: 1px solid var(--bt-line);
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.bt-testimonials .bt-pagination__summary {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.4;
    color: var(--bt-grey);
}

.bt-testimonials .bt-pagination__summary strong {
    font-weight: 700;
    color: var(--bt-ink);
}

.bt-testimonials .bt-pagination__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bt-testimonials .bt-pagination__list li {
    margin: 0 5px 0 0;
    font-size: 14px;
    line-height: 1;
}

.bt-testimonials .bt-pagination__list li:last-child {
    margin-right: 0;
}

.bt-testimonials .bt-pagination__link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 24px;
    color: #52575a;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 3px;
    box-shadow: none;
    transition: all 0.3s ease;
}

.bt-testimonials a.bt-pagination__link:hover,
.bt-testimonials a.bt-pagination__link:focus-visible {
    color: #ffffff;
    background: var(--bt-red);
    border-color: var(--bt-red);
}

.bt-testimonials a.bt-pagination__link:focus-visible {
    outline: 3px solid #1e40af;
    outline-offset: 2px;
}

.bt-testimonials .bt-pagination__link.is-current {
    color: #ffffff;
    background: var(--bt-red);
    border-color: var(--bt-red);
}

/* Previous and next: the arrow is a bordered square turned 45 degrees. */
.bt-testimonials .bt-pagination__link--prev::before,
.bt-testimonials .bt-pagination__link--next::before {
    content: "";
    position: absolute;
    display: inline-block;
    padding: 4px;
    border: solid rgba(82, 87, 90, 0.9);
    border-width: 0 1px 1px 0;
    transition: all 0.3s ease;
}

.bt-testimonials .bt-pagination__link--next::before {
    transform: rotate(-45deg);
    margin-right: 5px;
}

.bt-testimonials .bt-pagination__link--prev::before {
    transform: rotate(135deg);
    margin-left: 5px;
}

.bt-testimonials a.bt-pagination__link--prev:hover::before,
.bt-testimonials a.bt-pagination__link--next:hover::before,
.bt-testimonials a.bt-pagination__link--prev:focus-visible::before,
.bt-testimonials a.bt-pagination__link--next:focus-visible::before {
    border-color: #ffffff;
}

.bt-testimonials .bt-pagination__link.is-disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

.bt-testimonials .bt-pagination__link.is-disabled::before {
    border-color: rgba(82, 87, 90, 0.35);
}

.bt-testimonials .bt-pagination__gap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    color: #52575a;
}

/* Up to 991px a sidebar narrows the content column, so the bar stacks and centres. */
@media (max-width: 991.98px) {
    .bt-testimonials .bt-pagination {
        flex-direction: column;
        gap: 12px;
        padding: 14px 12px;
        text-align: center;
    }

    .bt-testimonials .bt-pagination__list {
        justify-content: center;
    }
}
