.tb-offer-ratings {}

.tb-offer-rating + .tb-offer-rating {
    border-top: 1px solid config('colors.grey-light');
    margin-top: 1rem;
    padding-top: 1rem;

    @include mappy-bp(lg) {
        margin-top: 2rem;
        padding-top: 2rem;
    }
}

.tb-offer-rating--current {
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    .tb-offer-rating__details-toggle {
        text-align: left;
        width: 100%;
    }
}

.tb-offer-rating__current {
    font-size: 1.375rem;
    margin-right: 1rem;
    padding: 1.5rem 1.125rem;
    color: white;
    background: config('colors.secondary');
    border-radius: .25rem;
}

.tb-offer-rating__title {
    font-size: 1.375rem;
    color: config('colors.secondary');

    + p {
        font-size: .875rem;
        margin-top: .25rem;
    }
}

.tb-offer-rating__author {
    font-size: 1.125rem;
    margin-top: 0;
}

.tb-offer-rating__date {
    font-size: .875rem;
    margin-top: .25rem;
}

.tb-offer-rating__rating {
    font-size: .875rem;
    margin-top: .5rem;
    display: inline-flex;
    align-items: center;

    strong {
        margin-right: 1ch;
        color: config('colors.secondary');
    }

    .tb-tour-rating__item--marked {
        color: config('colors.secondary');
    }
}

.tb-offer-rating__comment {
    margin-top: 1rem;
}

.tb-offer-rating__details-toggle {
    font-size: 1.125rem;
    margin: 1rem 0 0;
    color: config('colors.primary');

    .c-icon {
        font-size: 1.5rem;
        top: .3125rem;
    }

    .c-icon--toggle-up {
        display: none;
    }

    &[aria-expanded=true] {
        margin-bottom: 1rem;

        .c-icon--toggle-down {
            display: none;
        }

        .c-icon--toggle-up {
            display: inline;
        }
    }
}

.tb-offer-ratings__details-table {
    display: block;
    height: 0;
    max-height: 0;
    width: 100%;
    visibility: hidden;
    transform: scaleY(0);
    transform-origin: top center;

    &.is-target {
        display: table;
        height: auto;
        max-height: 100rem;
        visibility: visible;
        transform: scaleY(1);
    }

    tr:not(:last-child) {
        border: 0;
    }

    th {
        font-size: 1rem;
        margin-top: 1rem;

        @include mappy-bp(sm) {
            margin-top: 0;
        }
    }

    th,
    td {
        display: block;
        padding: 0;
        vertical-align: middle;

        @include mappy-bp(sm) {
            display: table-cell;
            padding: .5rem .125rem;
        }

        @include mappy-bp(xl) {
            font-size: 1rem;
        }
    }

    .tb-offer-rating__rating {
        margin-top: 0;
    }
}

.c-button--all-ratings {
    font-size: 1.125rem;
    margin-top: 2rem;
    border-radius: .25rem;
}
