/* ==========================================================
   Rank Local Reviews — Theme-Inheriting Slider Styles
   ==========================================================
   Golden Rule: The plugin must look like it was natively
   built into the active theme. We inherit everything and
   specify almost nothing.
   ========================================================== */

/* ── Wrapper: inherits all theme properties ─────────────── */
.rlr-reviews-wrapper {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    max-width: 100%;
    margin: 1.5em 0;
    position: relative;
}

/* ── Aggregate Header ───────────────────────────────────── */
.rlr-header {
    text-align: center;
    margin-bottom: 1.25em;
}

.rlr-business-name {
    display: block;
    font-size: 1.25em;
    font-weight: 700;
    margin-bottom: 0.3em;
    color: inherit;
}

.rlr-aggregate {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    flex-wrap: wrap;
}

/* Stars — the only non-inherited color (amber #ffcc00) */
.rlr-stars,
.rlr-review-stars {
    color: #ffcc00;
    letter-spacing: 0.06em;
    font-size: 1.15em;
    line-height: 1;
}

.rlr-rating-text {
    opacity: 0.7;
    font-size: 0.9em;
}

/* ── Slider Container ───────────────────────────────────── */
.rlr-slider {
    overflow: hidden;
    touch-action: pan-y;
    cursor: grab;
    -webkit-user-select: none;
       -moz-user-select: none;
        -ms-user-select: none;
            user-select: none;
}

.rlr-slider:active {
    cursor: grabbing;
}

.rlr-track {
    display: flex;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* Desktop: 3 columns visible */
.rlr-slide {
    flex: 0 0 calc(100% / 3);
    min-width: 0;
    padding: 0 0.5em;
    box-sizing: border-box;
}

/* ── Review Cards — inherit theme styling ───────────────── */
.rlr-card {
    border: 1px solid currentColor;
    border-radius: inherit;
    padding: 1.25em;
    background: inherit;
    height: 100%;
    display: flex;
    flex-direction: column;
    opacity: 0.85;
    transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.rlr-card:hover {
    opacity: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.rlr-reviewer {
    font-weight: 600;
    margin-bottom: 0.35em;
    color: inherit;
}

.rlr-review-stars {
    margin-bottom: 0.6em;
}

.rlr-review-text {
    flex: 1;
    margin: 0 0 0.75em 0;
    padding: 0;
    font-size: 0.95em;
    line-height: 1.55;
    color: inherit;

    /* Clamp long reviews to 5 lines */
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rlr-review-time {
    display: block;
    opacity: 0.55;
    font-size: 0.8em;
    margin-top: auto;
    color: inherit;
}

/* ── Navigation Dots ────────────────────────────────────── */
.rlr-dots {
    display: flex;
    justify-content: center;
    gap: 0.5em;
    margin-top: 1em;
}

.rlr-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid currentColor;
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease, opacity 0.2s ease;
    opacity: 0.35;
}

.rlr-dot:hover {
    opacity: 0.7;
}

.rlr-dot.active {
    background: currentColor;
    opacity: 0.8;
}

/* ── Navigation Arrows ──────────────────────────────────── */
.rlr-nav {
    display: flex;
    justify-content: center;
    gap: 0.75em;
    margin-top: 0.75em;
}

.rlr-prev,
.rlr-next {
    background: transparent;
    border: 1px solid currentColor;
    color: inherit;
    font-size: 1.4em;
    line-height: 1;
    width: 2em;
    height: 2em;
    border-radius: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
    opacity: 0.5;
    padding: 0;
    font-family: inherit;
}

.rlr-prev:hover,
.rlr-next:hover {
    opacity: 1;
}

.rlr-prev:focus-visible,
.rlr-next:focus-visible,
.rlr-dot:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* ── Fallback CTA ───────────────────────────────────────── */
.rlr-fallback {
    text-align: center;
    padding: 2em 1.5em;
    border: 1px solid currentColor;
    border-radius: inherit;
    margin: 1.5em 0;
    color: inherit;
    background: inherit;
}

.rlr-fallback p {
    margin: 0 0 0.75em 0;
    padding: 0;
    font-size: 1.1em;
    line-height: 1.5;
}

.rlr-fallback-link {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.2em;
    transition: opacity 0.2s ease;
}

.rlr-fallback-link:hover {
    opacity: 0.75;
}

/* =========================================================
   Responsive Breakpoints
   ========================================================= */

/* Tablet: 2 columns */
@media (max-width: 1024px) {
    .rlr-slide {
        flex: 0 0 calc(100% / 2);
    }
}

/* Mobile: 1 column, full touch-swipe */
@media (max-width: 768px) {
    .rlr-slide {
        flex: 0 0 100%;
    }

    .rlr-header {
        text-align: left;
    }

    .rlr-aggregate {
        justify-content: flex-start;
    }

    .rlr-card {
        padding: 1em;
    }
}
