/* -----------------------
TESTIMONIALS LAYOUT
----------------------- */

#testimonials:not([data-safari="true"]) .testimonial-body {
    touch-action: none;
}

#testimonials {
    background-color: var(--light-grey);
    padding-bottom: 8em;
    gap: 0;
}

#testimonial-controls-wrapper {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: row;
    margin: 0 1em;
    gap: 1em;
}

#left-arrow, #right-arrow {
    z-index: 10;
    position: relative;
    flex-grow: 10;
}

#left-arrow span, #right-arrow span {
    width: 3em;
    user-select: none;
    font-size: 1.5em !important;
    border-radius: 2em;
    padding: 1rem;
    display: block;
    text-align: center !important;
    font-family: var(--title-font);
}

#left-arrow {
    display: flex;
    justify-content: end;
}

#testimonial-progress {
    line-height: 4em;
    white-space: nowrap;
    font-family: var(--title-font);
}

#left-arrow:hover span, #right-arrow:hover span {
    background-color: var(--nav-trans);
}






/* -----------------------
TESTIMONIALS DIALOG
----------------------- */

#testimonial-dialog {
    border: none;
    background-color: transparent;
    min-width: 100vw;
    min-height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    padding: 0;
    margin: 2px 0 0 0;
}

#testimonial-dialog[open] {
    display: flex;
    justify-content: center;
}

#testimonial-dialog-body {
    height: calc(100vh - 4px);
    max-width: calc(100vw - 4px);
    aspect-ratio: 3 / 4;
    box-sizing: border-box;
    border: 1px solid var(--black);
    border-radius: 1em;
    background-color: var(--light-grey);
    display: flex;
    flex-direction: column;
    padding: 1em 2em;
}

#review-wrapper {
    flex-grow: 10;
    overflow: scroll;
    outline: 0;
}

#testimonial-dialog-review {
    height: fit-content;
    color: var(--dark-grey);
}

#review-wrapper::-webkit-scrollbar {
    display: none;
}

#testimonial-dialog-info {
    display: flex;
    flex-direction: row;
}

#testimonial-dialog button {
    margin-top: 1rem;
    width: 100%;
    text-align: center;
}

#testimonial-dialog-rating {
    font-size: 2em;
    line-height: 1em;
    color: var(--red);
    width: 100%;
    text-align: center;
}

#testimonial-dialog-review {
    font-size: 1.5rem;
}

@media (max-width: 900px) {
    #testimonial-dialog-body {
        width: 100%;
    }

    #testimonial-dialog-review {
        font-size: 1rem;
    }
}





/* -----------------------
TESTIMONIALS DESKTOP
----------------------- */

#testimonial-track {
    grid-column-start: 1;
    margin-left: 4rem;
    display: flex;
    gap: 4em;
    flex-direction: row;
    width: fit-content;
    user-select: none;
    touch-action: pan-y;
}

.testimonial {
    min-height: max(35vh, 20vw);
    height: max(35vh, 20vw);
    min-width: max(55vh, 32vw);
    width: max(55vh, 32vw);
}

.testimonial-info {
    display: flex;
    justify-content: space-evenly;
    flex-direction: row;
    width: 100%;
    transform: translateY(-50%);
}
.testimonial-name {
    flex: 1 1 0;
    font-size: 1rem;
    display: block;
    font-family: var(--title-font);
    line-height: 2em;
    text-align: right;
}
.testimonial-date {
    flex: 1 1 0;
    font-size: 1rem;
    line-height: 2em;
    margin: 0;
    font-weight: normal;
    font-family: var(--body-font);
}
.testimonial-rating {
    font-size: 2em;
    line-height: 1em;
    width: 100%;
    text-align: center;
    transform: translateY(50%);
    color: var(--red);
}
.testimonial-body-container {
    height: calc(100% - 4em);
    max-height: calc(100% - 4em);
    width: 100%;
    color: grey;
    padding: 2em;
    box-sizing: border-box;
    border: 1px solid var(--dark-grey);
    border-width: 0 1px 0 1px;
    border-radius: 2em;
}
.testimonial-body {
    height: 100%;
    width: 100%;
    text-align: justify;
    align-content: center;
    overflow: scroll;
    text-overflow: ellipsis;
}
.see-more {
    color: var(--red);
    user-select: none;
    width: 100%;
}

.testimonial-body::-webkit-scrollbar {
    display: none;
}

.avatar {
    width: 2rem;
    height: 2rem;
    display: inline;
    margin-right: 1rem;
    margin-left: 1rem;
    color: var(--white);
    font-size: 1em;
    text-align: center;
    border-radius: 50%;
    line-height: 2rem;
}






/* -----------------------
TESTIMONIALS MOBILE
----------------------- */

@media (max-width: 480px) {
    #testimonial-track {
        grid-column: 2;
        margin-left: 0;
        gap: calc(100vw / 22);
    }

    .testimonial {
        max-width: calc(100vw * 18 / 22);
        min-width: calc(100vw * 18 / 22);
    }
}

@media (max-width: 25em) {
    .testimonial-body {
        text-align: left;
    }
}