/* Google Reviews */

.sft_reviews {
    --sft_reviews_blue: #008bf0;
    --sft_reviews_navy: #1F2240;
    --sft_reviews_border: #e6e6e6;
    --sft_reviews_muted: #6b7280;
    --sft_reviews_body: #3a3f4a;

    margin: auto;
    width: 100%;
    max-width: 1240px;
    text-align: left;
    font-family: 'Ubuntu', sans-serif;
}


/* Scroller */

.sft_reviews_viewport {
    position: relative;
}

.sft_reviews_scroller {
    /* Fade widths, flipped on and off as you reach either end */
    --sft_fade_left: 60px;
    --sft_fade_right: 60px;

    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scroll-padding-left: 20px;
    scroll-behavior: smooth;
    padding: 18px 20px 22px;
    scrollbar-width: none;
    -ms-overflow-style: none;

    /* Masked rather than overlaid, so it works on any page background */
    -webkit-mask-image: linear-gradient(to right,
        transparent 0,
        #000 var(--sft_fade_left),
        #000 calc(100% - var(--sft_fade_right)),
        transparent 100%);
            mask-image: linear-gradient(to right,
        transparent 0,
        #000 var(--sft_fade_left),
        #000 calc(100% - var(--sft_fade_right)),
        transparent 100%);
}
.sft_reviews_scroller::-webkit-scrollbar {
    display: none;
}
.sft_reviews_viewport.sft_at_start .sft_reviews_scroller {
    --sft_fade_left: 0px;
}
.sft_reviews_viewport.sft_at_end .sft_reviews_scroller {
    --sft_fade_right: 0px;
}


/* Card */

.sft_review_card {
    flex: 0 0 auto;
    box-sizing: border-box;
    width: 300px;
    height: 320px;
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
    padding: 22px;
    background-color: #fff;
    border: 1px solid var(--sft_reviews_border);
    border-radius: 12px;
    transition: transform .2s ease, box-shadow .2s ease;
}
.sft_review_card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(31, 34, 64, 0.10);
}

.sft_review_head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.sft_review_avatar {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .3px;
}
.sft_review_who {
    min-width: 0;
}
.sft_review_name {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--sft_reviews_navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sft_review_source {
    margin: 2px 0 0;
    font-size: 12.5px;
    font-weight: 400;
    color: var(--sft_reviews_muted);
}

.sft_review_text {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    margin: 0;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.55;
    color: var(--sft_reviews_body);
}
/* Only the cards that actually overflow get the fade */
.sft_review_card.sft_is_clipped .sft_review_text {
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent 100%);
            mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent 100%);
}

.sft_review_foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    /* Fixed height, so showing "Read more" cannot change how much text fits */
    height: 30px;
    flex: 0 0 auto;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #f1f1f1;
}
.sft_stars {
    display: inline-flex;
    gap: 2px;
    flex: 0 0 auto;
}
.sft_stars svg {
    display: block;
    width: 19px;
    height: 19px;
}

.sft_read_more {
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--sft_reviews_blue);
    background-color: transparent;
    border: 0;
    /* Padded so the hover tint reads as a button hugging the text; the
       negative margin keeps the text itself flush with the card edge */
    padding: 6px 10px;
    margin-right: -10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color .18s ease;
}
.sft_read_more:hover {
    background-color: rgba(0, 139, 240, 0.10);
}


/* Arrows */

.sft_reviews_arrow {
    position: absolute;
    top: calc(50% - 4px);
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: #fff;
    border: 1px solid var(--sft_reviews_border);
    box-shadow: 0 2px 12px rgba(31, 34, 64, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    z-index: 3;
    transition: opacity .2s ease, transform .2s ease;
}
.sft_reviews_arrow:hover {
    transform: translateY(-50%) scale(1.06);
}
.sft_reviews_arrow svg {
    width: 20px;
    height: 20px;
    display: block;
}
.sft_reviews_arrow[hidden] {
    display: none;
}
.sft_reviews_prev {
    left: 4px;
}
.sft_reviews_next {
    right: 4px;
}
/* Touch devices swipe, they do not need arrows */
@media (hover: none), (pointer: coarse) {
    .sft_reviews_arrow {
        display: none !important;
    }
}


/* Write a review */

.sft_reviews_cta {
    text-align: center;
    margin-top: 4px;
    margin-bottom: 28px;
}
.sft_write_review {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--sft_reviews_blue);
    background-color: #fff;
    border: 1.5px solid var(--sft_reviews_blue);
    border-radius: 8px;
    padding: 6px 14px;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s ease, background-color .2s ease, color .2s ease;
}
.sft_write_review svg {
    width: 15px;
    height: 15px;
    display: block;
}
.sft_write_review:hover {
    background-color: var(--sft_reviews_blue);
    color: #fff;
    transform: scale(1.03);
}


/* Read more popup */

.sft_review_modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    background-color: rgba(31, 34, 64, 0.45);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    animation: sft_review_fade .18s ease;
}
.sft_review_modal[hidden] {
    display: none;
}

.sft_review_modal_card {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    max-width: 720px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    padding: 28px;
    text-align: left;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 44px rgba(31, 34, 64, 0.30);
    animation: sft_review_pop .2s ease;
}

/* Carries the card's column layout down to the scrollable body */
.sft_review_modal_inner {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.sft_review_modal_head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-right: 44px;
    margin-bottom: 6px;
}
.sft_review_modal_head .sft_review_avatar {
    width: 52px;
    height: 52px;
    font-size: 19px;
}
.sft_review_modal_head .sft_review_name {
    font-size: 20px;
}

.sft_review_modal_stars {
    margin: 14px 0 16px;
}
.sft_review_modal_stars svg {
    width: 22px;
    height: 22px;
}

.sft_review_modal_body {
    /* flex:1 + min-height:0 so a long review scrolls inside the card
       instead of pushing past it */
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    margin: 0;
    padding-top: 18px;
    border-top: 1px solid #f1f1f1;
    font-size: 16.5px;
    font-weight: 400;
    line-height: 1.65;
    color: var(--sft_reviews_body);
    -webkit-overflow-scrolling: touch;
}

.sft_modal_close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
    border: 0;
    background-color: #f4f4f5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color .2s ease;
}
.sft_modal_close:hover {
    background-color: #e7e7e9;
}
.sft_modal_close svg {
    width: 17px;
    height: 17px;
    display: block;
}

@keyframes sft_review_fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes sft_review_pop {
    from { opacity: 0; transform: translateY(12px) scale(.98); }
    to   { opacity: 1; transform: none; }
}


/* sft.css clears outlines globally, so put focus rings back for keyboard users */
.sft_reviews :focus-visible,
.sft_review_modal :focus-visible {
    outline: 2px solid var(--sft_reviews_blue);
    outline-offset: 2px;
}


@media only screen and (max-width: 700px) {
    .sft_reviews_scroller {
        gap: 12px;
        padding: 12px 16px 20px;
        scroll-padding-left: 16px;
    }
    .sft_review_card {
        width: 78vw;
        max-width: 300px;
    }
    .sft_reviews_scroller {
        --sft_fade_left: 24px;
        --sft_fade_right: 24px;
    }
    .sft_review_modal {
        padding: 14px;
    }
    .sft_review_modal_card {
        padding: 22px;
        max-height: 86vh;
    }
    .sft_review_modal_body {
        font-size: 15.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sft_reviews_scroller {
        scroll-behavior: auto;
    }
    .sft_review_card,
    .sft_reviews_arrow,
    .sft_write_review {
        transition: none;
    }
    .sft_review_card:hover,
    .sft_write_review:hover {
        transform: none;
    }
    .sft_reviews_arrow:hover {
        transform: translateY(-50%);
    }
    .sft_review_modal,
    .sft_review_modal_card {
        animation: none;
    }
}
