/**
 * TravelSmart App Reviews - slider
 */

.tsr-reviews {
    --tsr-primary: #2072EC;
    --tsr-primary-hover: #195ec6;
    --tsr-star: #F5A524;
    --tsr-text: #212529;
    --tsr-muted: #6F747A;
    --tsr-border: #E6ECF5;
    --tsr-gap: 24px;
    margin-top: 8px;
}

/* Head: rating summary + arrows */
.tsr-reviews .tsr-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.tsr-reviews .tsr-summary {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tsr-reviews .tsr-score {
    font-size: 52px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--tsr-text);
}

.tsr-reviews .tsr-summary-text {
    margin: 6px 0 0;
    font-size: 15px;
    line-height: 1.4;
    color: var(--tsr-muted);
}

.tsr-reviews .tsr-summary-text a {
    font-weight: 600;
    color: var(--tsr-primary);
    text-decoration: none;
}

.tsr-reviews .tsr-summary-text a:hover {
    color: var(--tsr-primary-hover);
    text-decoration: underline;
}

/* Stars */
.tsr-reviews .tsr-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.tsr-reviews .tsr-stars {
    position: relative;
    display: inline-flex;
    gap: 2px;
    line-height: 0;
    vertical-align: middle;
    color: #E3E7EE;
}

.tsr-reviews .tsr-stars .tsr-on {
    color: var(--tsr-star);
}

.tsr-reviews .tsr-stars-base,
.tsr-reviews .tsr-stars-fill {
    display: inline-flex;
    gap: 2px;
    white-space: nowrap;
}

.tsr-reviews .tsr-stars-fill {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    color: var(--tsr-star);
}

.tsr-reviews .tsr-stars svg {
    flex: none;
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.tsr-reviews .tsr-stars-lg svg {
    width: 22px;
    height: 22px;
}

/* Arrows */
.tsr-reviews .tsr-nav {
    display: flex;
    gap: 10px;
}

.tsr-reviews .tsr-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0;
    padding: 0;
    border: 1px solid #DCE4F0;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: none;
    color: var(--tsr-text);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.tsr-reviews .tsr-nav-btn:hover:not(:disabled) {
    border-color: var(--tsr-primary);
    background: var(--tsr-primary);
    color: #ffffff;
}

.tsr-reviews .tsr-nav-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.tsr-reviews .tsr-nav-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(32, 114, 236, 0.35);
}

.tsr-reviews.tsr-no-scroll .tsr-nav {
    display: none;
}

/* Track */
.tsr-reviews .tsr-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 2 * var(--tsr-gap)) / 3);
    gap: var(--tsr-gap);
    margin: 0 -4px;
    padding: 6px 4px 24px;
    list-style: none;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-padding: 0 4px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.tsr-reviews .tsr-track::-webkit-scrollbar {
    display: none;
}

.tsr-reviews .tsr-track:focus-visible {
    outline: none;
}

/* Card */
.tsr-reviews .tsr-card {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 28px;
    list-style: none;
    border: 1px solid var(--tsr-border);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    scroll-snap-align: start;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.tsr-reviews .tsr-card:hover {
    box-shadow: 0 12px 32px rgba(32, 114, 236, 0.1);
    transform: translateY(-2px);
}

.tsr-reviews .tsr-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.tsr-reviews .tsr-quote {
    flex: none;
    width: 32px;
    height: 32px;
    fill: currentColor;
    color: var(--tsr-primary);
    opacity: 0.15;
}

.tsr-reviews .tsr-title {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 600;
    color: var(--tsr-text);
}

.tsr-reviews .tsr-text {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.6;
    color: #4B5563;
    white-space: pre-line;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
}

.tsr-reviews .tsr-text.is-expanded {
    display: block;
    -webkit-line-clamp: unset;
}

.tsr-reviews .tsr-more {
    align-self: flex-start;
    margin: 8px 0 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--tsr-primary);
    cursor: pointer;
}

.tsr-reviews .tsr-more:hover {
    color: var(--tsr-primary-hover);
    background: none;
}

/* The theme gives every button a display value, which would override [hidden] */
.tsr-reviews .tsr-more[hidden] {
    display: none;
}

.tsr-reviews .tsr-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 22px;
}

.tsr-reviews .tsr-avatar {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #EAF2FE;
    font-size: 16px;
    font-weight: 700;
    color: var(--tsr-primary);
}

.tsr-reviews .tsr-author-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tsr-reviews .tsr-name {
    overflow: hidden;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--tsr-text);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.tsr-reviews .tsr-date {
    font-size: 13px;
    line-height: 1.4;
    color: #8A9099;
}

@media (max-width: 959px) {
    .tsr-reviews .tsr-track {
        grid-auto-columns: calc((100% - var(--tsr-gap)) / 2);
    }
}

@media (max-width: 767px) {
    .tsr-reviews {
        --tsr-gap: 16px;
    }

    .tsr-reviews .tsr-track {
        grid-auto-columns: 86%;
    }

    .tsr-reviews .tsr-score {
        font-size: 42px;
    }

    .tsr-reviews .tsr-card {
        padding: 24px;
    }

    .tsr-reviews .tsr-nav-btn {
        width: 42px;
        height: 42px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tsr-reviews .tsr-track {
        scroll-behavior: auto;
    }

    .tsr-reviews .tsr-card {
        transition: none;
    }

    .tsr-reviews .tsr-card:hover {
        transform: none;
    }
}
