/*!
 * True Makeup Theme — Review Carousel
 *
 * A 3-column grid of staggered review cards that swap out on a
 * timer. Each column layers four cards plus two transition planes
 * (a platform-logo frame and an effect-image frame). The animation
 * wipes them in from a randomised direction so no two columns ever
 * animate the same way at the same time.
 *
 * Card background colours are applied inline from a fixed palette
 * at render time AND re-assigned at runtime by the JS module — we
 * let the inline style win to avoid a heavier selector war.
 *
 * The section background colour is set per-page by the Easy Makeup
 * Plugin and applied inline to the wrapping <section>.
 */

.tmt-review-platforms {
    display: flex;
    align-items: center;
    gap: 32px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.tmt-review-platforms__label {
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #000;
    opacity: 0.5;
}
.tmt-review-platforms__logo {
    height: 72px;
    width: auto;
    border: 1px solid #000;
}

.tmt-review-frame {
    background: #ffffff;
    padding: 8px;
}
.tmt-review-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.tmt-review-col {
    position: relative;
    min-height: 320px;
    overflow: hidden;
}

/* Persistent animated gradient border around each review column. The
 * mask trick leaves the border visible while keeping the interior
 * transparent so the card animations still show through. */
.tmt-review-col::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 3px solid transparent;
    pointer-events: none;
    z-index: 10;
    background: linear-gradient(90deg, #554350, #B07B5F, #CC9E80, #E0BAB2, #FAE8DD, #E0BAB2, #CC9E80, #B07B5F, #554350) border-box;
    background-size: 200% 100%;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    animation: tmt-gradient-flow 4s ease infinite;
}

.tmt-review-card {
    position: absolute;
    inset: 0;
    min-height: 320px;
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* clip-path + transition are controlled inline by the module
     * so the animation timings stay owned by the JS. */
}
.tmt-review-card__header       { margin-bottom: 20px; }
.tmt-review-card__stars {
    display: block;
    margin-bottom: 16px;
    font-size: 28px;
    color: #000;
    letter-spacing: 4px;
    line-height: 1;
}
.tmt-review-card__name {
    margin: 0;
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #000;
}
.tmt-review-card__quote {
    margin: 0;
    font-family: var(--font-secondary);
    font-size: 18px;
    line-height: 1.6;
    color: #000;
    font-style: italic;
    flex: 1;
}
.tmt-review-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.tmt-review-card__meta p {
    margin: 0 0 6px;
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #000;
    opacity: 0.5;
}
.tmt-review-card__link {
    font-family: var(--font-primary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #000;
    text-decoration: none;
    opacity: 0.4;
    transition: opacity 0.2s;
}
.tmt-review-card__link:hover,
.tmt-review-card__link:focus { opacity: 1; }

.tmt-review-card__platform {
    height: 72px;
    width: auto;
}

.tmt-review-trans {
    position: absolute;
    inset: 0;
    background: #000;
    /* clip-path + transition are set by the JS module at runtime. */
}
.tmt-review-trans img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ------------------------------------------------------------------
   Mobile layout — swipeable horizontal carousel of the 3 columns
   ------------------------------------------------------------------
   Desktop lays all 3 review columns side-by-side; on phones that
   means three unreadably narrow columns. Instead of collapsing to
   one column (previous behaviour hid cols 2 + 3), each column now
   becomes a snap target in a horizontal scroll-snap carousel so
   the section keeps its whole content accessible via swipe. Each
   column continues to rotate its 4 internal review cards on its
   own timer so swiping + rotation both work.
   ------------------------------------------------------------------ */
@media (max-width: 1023px) {
    .tmt-review-platforms {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
        margin-bottom: 20px;
        padding-bottom: 16px;
    }
    .tmt-review-platforms__label {
        flex-basis: 100%;
        text-align: center;
    }
    .tmt-review-platforms__logo { height: 48px; }

    /* .tmt-review-frame keeps its 8px inner padding (the "frame"
       white border round the cards). The grid itself switches
       from a 3-col grid to a horizontal flex scroll carousel. */
    .tmt-review-frame { padding: 0; }
    .tmt-review-grid {
        display: flex !important;
        flex-direction: row;
        align-items: stretch;
        grid-template-columns: none !important;
        gap: 12px;
        padding: 8px 12px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scroll-padding-inline-start: 12px;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    .tmt-review-grid::-webkit-scrollbar { display: none; }
    .tmt-review-grid                    { scrollbar-width: none; }

    .tmt-review-col {
        flex: 0 0 calc(100vw - 56px);
        width: calc(100vw - 56px);
        max-width: none;
        min-height: 280px;
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }
    .tmt-review-card { min-height: 280px; padding: 28px 24px; }
    .tmt-review-card__header { margin-bottom: 14px; }
    .tmt-review-card__stars {
        font-size: 20px;
        letter-spacing: 3px;
        margin-bottom: 10px;
    }
    .tmt-review-card__name { font-size: 11px; letter-spacing: 0.1em; }
    .tmt-review-card__quote {
        font-size: 15px;
        line-height: 1.55;
    }
    .tmt-review-card__footer { gap: 16px; }
    .tmt-review-card__meta p { font-size: 10px; letter-spacing: 0.1em; margin-bottom: 4px; }
    .tmt-review-card__link   { font-size: 10px; letter-spacing: 0.08em; }
    .tmt-review-card__platform { height: 44px; }
}

@media (max-width: 480px) {
    .tmt-review-grid { gap: 10px; padding: 8px 10px; scroll-padding-inline-start: 10px; }
    .tmt-review-col  { flex-basis: calc(100vw - 44px); width: calc(100vw - 44px); }
    .tmt-review-card { padding: 22px 18px; }
    .tmt-review-card__quote { font-size: 14px; }
    .tmt-review-card__platform { height: 36px; }
    .tmt-review-platforms__logo { height: 40px; }
}
