/* ═══════════════════════════════════════════════
   Gladiator Reviews — Frontend Styles
   4 Styles: Slider | Grid | Masonry | Cards
   Fully Responsive + RTL + CSS Custom Properties
═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;600;700&display=swap');

/* ─── Base Variables (overridden per-widget via inline style) ─── */
.grv-widget {
    --grv-stars: #F59E0B;
    --grv-card-bg: #ffffff;
    --grv-text: #1f2937;
    --grv-accent: #4F46E5;
    --grv-radius: 12px;
    --grv-gap: 20px;
    --grv-shadow: 0 4px 20px rgba(0, 0, 0, .08);
    font-family: 'Rubik', sans-serif;
    direction: rtl;
    color: var(--grv-text);
    max-width: 100%;
    padding: 15px;
    box-sizing: border-box;
    overflow: visible;
}

/* ─── Summary Bar ─── */
.grv-summary {
    text-align: center;
    margin-bottom: 28px;
}

.grv-summary-bottom {
    margin-top: 28px;
    margin-bottom: 0;
}

.grv-biz-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--grv-text);
    margin-bottom: 8px;
}

.grv-summary-inner {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--grv-card-bg);
    border-radius: 40px;
    padding: 10px 22px;
    box-shadow: var(--grv-shadow);
    border: 1px solid rgba(0, 0, 0, .07);
    flex-wrap: wrap;
    justify-content: center;
}

.grv-avg-num {
    font-size: 26px;
    font-weight: 700;
    color: var(--grv-text);
    line-height: 1;
}

.grv-total-count {
    font-size: 13px;
    color: #6b7280;
}

.grv-google-logo svg {
    display: block;
}

/* ─── Stars ─── */
.grv-stars {
    display: inline-flex;
    gap: 2px;
}

.grv-star {
    font-size: 18px;
    color: #d1d5db;
    line-height: 1;
}

.grv-star.full {
    color: var(--grv-stars);
}

.grv-star.half {
    color: var(--grv-stars);
    opacity: .6;
}

.grv-stars-row {
    display: block;
    margin: 0 0 12px;
}

/* Summary bar stars stay smaller than card stars */
.grv-summary .grv-star {
    font-size: 16px;
}

/* Stars inside summary must align with sibling text — reset margin */
.grv-summary .grv-stars-row {
    margin: 0;
    display: inline-flex;
    align-items: center;
}

/* ─── Review Card (shared) ─── */
.grv-review-card {
    background: var(--grv-card-bg);
    border-radius: var(--grv-radius);
    padding: 22px 20px;
    border: 1px solid rgba(0, 0, 0, .07);
    transition: transform .25s ease, box-shadow .25s ease;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.grv-widget.grv-shadow .grv-review-card {
    box-shadow: var(--grv-shadow);
}

.grv-review-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, .13);
}

.grv-review-card::before {
    display: none !important;
}

/* ─── Card Header ─── */
.grv-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.grv-avatar-wrap {
    flex-shrink: 0;
}

.grv-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(0, 0, 0, .08);
}

.grv-avatar-init {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--grv-accent), #7c3aed);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
}

.grv-reviewer-info {
    flex: 1;
    min-width: 0;
}

.grv-reviewer-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--grv-text);
}

.grv-review-date {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 2px;
}

.grv-source-badge {
    flex-shrink: 0;
    opacity: .85;
}

/* ─── Review Text ─── */
.grv-review-text {
    font-size: 14px;
    line-height: 1.7;
    color: var(--grv-text);
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-width: 0;
}

/* Clamp text to 2 lines */
.grv-clamp-lines .grv-text-short {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.7;
}

button.grv-read-more {
    background: none !important;
    border: none !important;
    color: var(--grv-accent) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer;
    padding: 5px !important;
    margin-top: 4px;
    display: inline-block;
    font-family: inherit;
    border-radius: 4px !important;
    transition: background .2s, color .2s;
    outline: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
    line-height: 1.4;
}

button.grv-read-more:hover {
    background: var(--grv-accent) !important;
    color: #fff !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

button.grv-read-more:focus,
button.grv-read-more:focus-visible,
button.grv-read-more:active {
    background: none !important;
    color: var(--grv-accent) !important;
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    text-decoration: none !important;
}

/* ─── SOURCE ICON COLORS ─── */
.grv-source-google svg path[fill="#EA4335"] {
    fill: #EA4335;
}

.grv-source-facebook svg path {
    fill: #1877F2;
}


/* ════════════════════════════════
   STYLE 1 — SLIDER
════════════════════════════════ */
.grv-style-slider .grv-slider-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.grv-style-slider .grv-track-outer {
    flex: 1;
    overflow: hidden;
    border-radius: var(--grv-radius);
    padding: 10px;
    margin: -10px;
}

.grv-style-slider .grv-track {
    display: flex;
    transition: transform .45s cubic-bezier(.4, 0, .2, 1);
    will-change: transform;
}

.grv-style-slider .grv-slide {
    min-width: 100%;
    padding: 6px 8px;
    box-sizing: border-box;
}

.grv-style-slider .grv-review-card {
    height: 100%;
}

.grv-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, .1);
    background: var(--grv-card-bg);
    color: var(--grv-text);
    font-size: 20px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
}

.grv-arrow:hover {
    background: var(--grv-accent);
    color: #fff;
    border-color: var(--grv-accent);
}

.grv-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}

.grv-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    border: none;
    cursor: pointer;
    transition: all .25s;
    padding: 0;
}

.grv-dot.active {
    background: var(--grv-accent);
    width: 24px;
    border-radius: 4px;
}

/* Multiple visible (desktop): override via JS by shrinking slide width */
@media (min-width: 640px) {
    .grv-style-slider .grv-slide {
        min-width: calc(50% - 12px);
        margin: 0 6px;
    }
}

@media (min-width: 960px) {
    .grv-style-slider .grv-slide {
        min-width: calc(33.333% - 14px);
        margin: 0 7px;
    }
}


/* ════════════════════════════════
   STYLE 2 — GRID
════════════════════════════════ */
.grv-style-grid .grv-reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--grv-gap);
    padding: 8px;
    margin: -8px;
}

/* Column count from admin setting */
.grv-style-grid.grv-cols-2 .grv-reviews-grid {
    grid-template-columns: repeat(2, 1fr);
}

.grv-style-grid.grv-cols-3 .grv-reviews-grid {
    grid-template-columns: repeat(3, 1fr);
}

.grv-style-grid.grv-cols-4 .grv-reviews-grid {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 700px) {

    .grv-style-grid.grv-cols-3 .grv-reviews-grid,
    .grv-style-grid.grv-cols-4 .grv-reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {

    .grv-style-grid .grv-reviews-grid,
    .grv-style-grid.grv-cols-2 .grv-reviews-grid,
    .grv-style-grid.grv-cols-3 .grv-reviews-grid,
    .grv-style-grid.grv-cols-4 .grv-reviews-grid {
        grid-template-columns: 1fr;
    }
}


/* ════════════════════════════════
   STYLE 3 — MASONRY
════════════════════════════════ */
.grv-style-masonry .grv-reviews-grid {
    columns: 3;
    column-gap: var(--grv-gap);
    width: 100%;
}

/* Column overrides */
.grv-style-masonry.grv-cols-2 .grv-reviews-grid {
    columns: 2;
}

.grv-style-masonry.grv-cols-3 .grv-reviews-grid {
    columns: 3;
}

.grv-style-masonry.grv-cols-4 .grv-reviews-grid {
    columns: 4;
}

.grv-style-masonry .grv-review-card {
    break-inside: avoid;
    page-break-inside: avoid;
    display: inline-block;
    width: 100%;
    margin-bottom: var(--grv-gap);
}

@media (max-width: 700px) {

    .grv-style-masonry .grv-reviews-grid,
    .grv-style-masonry.grv-cols-3 .grv-reviews-grid,
    .grv-style-masonry.grv-cols-4 .grv-reviews-grid {
        columns: 2;
    }
}

@media (max-width: 480px) {
    .grv-style-masonry .grv-reviews-grid {
        columns: 1;
    }
}


/* ════════════════════════════════
   STYLE 4 — CARDS (horizontal)
════════════════════════════════ */
.grv-style-cards .grv-reviews-grid {
    display: flex;
    flex-direction: column;
    gap: var(--grv-gap);
    max-width: 760px;
    margin: 0 auto;
}

.grv-style-cards .grv-review-card {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: flex-start;
    padding: 28px 28px;
}

.grv-style-cards .grv-card-header {
    flex-direction: column;
    gap: 6px;
    align-items: center;
    text-align: center;
    flex-shrink: 0;
    min-width: 80px;
    max-width: 100px;
    margin-bottom: 0;
}

.grv-style-cards .grv-avatar,
.grv-style-cards .grv-avatar-init {
    width: 56px;
    height: 56px;
    font-size: 22px;
}

.grv-style-cards .grv-card-header .grv-reviewer-info {
    text-align: center;
}

.grv-style-cards .grv-reviewer-name {
    font-size: 13px;
    word-break: break-word;
}

.grv-style-cards .grv-review-date {
    font-size: 11px;
}

.grv-style-cards .grv-card-body {
    flex: 1;
    min-width: 0;
}

.grv-style-cards .grv-stars-row {
    margin-bottom: 10px;
}

.grv-style-cards .grv-review-text {
    font-size: 14px;
    line-height: 1.8;
}

.grv-style-cards .grv-source-badge {
    position: absolute;
    top: 14px;
    left: 14px;
}

@media (max-width: 500px) {
    .grv-style-cards .grv-review-card {
        flex-direction: column;
        padding: 22px 20px;
    }

    .grv-style-cards .grv-card-header {
        flex-direction: row;
        max-width: 100%;
        min-width: 0;
        gap: 12px;
    }
}

/* ════════════════════════════════
   CTA — Rate Us Button
════════════════════════════════ */
.grv-cta {
    text-align: center;
    margin-top: 28px;
    padding: 20px;
    background: rgba(0, 0, 0, .025);
    border-radius: var(--grv-radius);
    border: 1px solid rgba(0, 0, 0, .07);
}

.grv-cta-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--grv-text);
    margin: 0 0 14px;
}

.grv-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.grv-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 30px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s, opacity .2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

.grv-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .2);
}

.grv-cta-google {
    background: #ffffff;
    color: #3c4043;
    border: 1px solid #dadce0;
}

.grv-cta-google:hover {
    background: #f8f9fa;
}

.grv-cta-facebook {
    background: #1877F2;
    color: #ffffff;
    border: 1px solid #1877F2;
}

.grv-cta-facebook:hover {
    opacity: .9;
}

/* Wide slider: CTA without grey background */
.grv-style-slider-wide .grv-cta {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

/* Remove focus/active outlines from interactive elements */
.grv-read-more:focus,
.grv-read-more:focus-visible,
.grv-arrow:focus,
.grv-arrow:focus-visible,
.grv-dot:focus,
.grv-dot:focus-visible,
.grv-cta-btn:focus,
.grv-cta-btn:focus-visible {
    outline: none;
    box-shadow: none;
}

/* No-arrows / smooth-scroll mode */
.grv-no-arrows .grv-arrow,
.grv-no-arrows .grv-dots {
    display: none !important;
}


/* ════════════════════════════════
   STYLE 5 — SLIDER WIDE (edge-to-edge)
   ביקורות ממלאות רוחב מלא — חצים צפים
════════════════════════════════ */

/* Widget: remove horizontal padding so slider fills to screen edges */
.grv-style-slider-wide {
    padding-left: 0;
    padding-right: 0;
    overflow: hidden;
}

/* Summary and dots keep a small inset */
.grv-style-slider-wide .grv-summary {
    padding: 0 20px;
}

.grv-style-slider-wide .grv-dots {
    padding: 0 20px;
    margin-top: 20px;
}

/* Slider wrap becomes the positioning context for floating arrows */
.grv-style-slider-wide .grv-slider-wrap {
    display: block;
    position: relative;
}

/* Track outer: vertical padding only for shadow room, no horizontal constraint */
.grv-style-slider-wide .grv-track-outer {
    flex: unset;
    overflow: visible;
    border-radius: 0;
    padding: 16px 0;
    margin: -16px 0;
}

.grv-style-slider-wide .grv-track {
    display: flex;
    transition: transform .45s cubic-bezier(.4, 0, .2, 1);
    will-change: transform;
}

.grv-style-slider-wide .grv-slide {
    box-sizing: border-box;
    padding: 0 10px;
}

/* Larger, airier review cards */
.grv-style-slider-wide .grv-review-card {
    padding: 28px 26px;
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, .07);
    box-shadow: 0 6px 30px rgba(0, 0, 0, .08);
    height: 100%;
}

/* Bigger source icon */
.grv-style-slider-wide .grv-source-badge svg {
    width: 38px;
    height: 38px;
    display: block;
}

/* Bigger avatar */
.grv-style-slider-wide .grv-avatar,
.grv-style-slider-wide .grv-avatar-init {
    width: 56px;
    height: 56px;
    font-size: 20px;
}

/* Slightly larger reviewer name */
.grv-style-slider-wide .grv-reviewer-name {
    font-size: 15px;
}

/* Bigger stars */
.grv-style-slider-wide .grv-stars-row .grv-star {
    font-size: 20px;
}

/* Floating arrows — positioned over the cards */
.grv-style-slider-wide .grv-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 46px;
    height: 46px;
    background: #ffffff;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, .1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, .16);
    color: #1f2937;
    font-size: 18px;
    cursor: pointer;
    flex-shrink: unset;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
}

.grv-style-slider-wide .grv-arrow:hover {
    background: var(--grv-accent);
    color: #ffffff;
    border-color: var(--grv-accent);
    box-shadow: 0 4px 24px rgba(0, 0, 0, .25);
}

/* RTL: prev = right side, next = left side */
.grv-style-slider-wide .grv-prev {
    right: 14px;
    left: auto;
}

.grv-style-slider-wide .grv-next {
    left: 14px;
    right: auto;
}

@media (max-width: 640px) {
    .grv-style-slider-wide .grv-arrow {
        width: 38px;
        height: 38px;
        font-size: 15px;
    }

    .grv-style-slider-wide .grv-prev {
        right: 8px;
    }

    .grv-style-slider-wide .grv-next {
        left: 8px;
    }
}


/* ════════════════════════════════
   DUAL ROW — Two-row marquee
════════════════════════════════ */
.grv-dual-row-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.grv-marquee-row {
    position: relative;
}

/* Stagger: second row offset to the right for visual variety */
.grv-marquee-row-2 {
    padding-right: 60px;
}

[dir="ltr"] .grv-marquee-row-2 {
    padding-right: 0;
    padding-left: 60px;
}

.grv-marquee-row .grv-track-outer {
    overflow: hidden;
    border-radius: var(--grv-radius);
    padding: 10px 0;
    margin: -10px 0;
}

.grv-marquee-row .grv-track {
    display: flex;
    will-change: transform;
}

.grv-marquee-row .grv-slide {
    padding: 6px 8px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.grv-marquee-row .grv-review-card {
    height: 100%;
}

/* Fade edges for marquee rows */
.grv-marquee-row .grv-track-outer::before,
.grv-marquee-row .grv-track-outer::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    z-index: 2;
    pointer-events: none;
}

.grv-marquee-row .grv-track-outer::before {
    right: 0;
    background: linear-gradient(to left, #fff, transparent);
}

.grv-marquee-row .grv-track-outer::after {
    left: 0;
    background: linear-gradient(to right, #fff, transparent);
}

.grv-marquee-row .grv-track-outer {
    position: relative;
}

/* Wide slider dual row adjustments */
.grv-style-slider-wide .grv-marquee-row .grv-track-outer {
    border-radius: 0;
    padding: 16px 0;
    margin: -16px 0;
}

.grv-style-slider-wide .grv-marquee-row-2 {
    padding-right: 80px;
}

@media (max-width: 640px) {
    .grv-marquee-row-2 {
        padding-right: 30px;
    }

    .grv-style-slider-wide .grv-marquee-row-2 {
        padding-right: 40px;
    }

    [dir="ltr"] .grv-marquee-row-2 {
        padding-right: 0;
        padding-left: 30px;
    }
}

@media (max-width: 480px) {
    .grv-dual-row-wrap {
        gap: 10px;
    }

    .grv-marquee-row-2 {
        padding-right: 20px;
    }
}


/* ════════════════════════════════
   MOBILE — Global responsive fixes
════════════════════════════════ */
@media (max-width: 640px) {
    .grv-widget {
        padding: 8px;
    }

    .grv-review-card {
        padding: 16px 14px;
    }

    .grv-card-header {
        gap: 10px;
        margin-bottom: 8px;
    }

    .grv-avatar,
    .grv-avatar-init {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .grv-reviewer-name {
        font-size: 13px;
    }

    .grv-review-date {
        font-size: 11px;
    }

    .grv-review-text {
        font-size: 13px;
    }

    .grv-star {
        font-size: 15px;
    }

    .grv-stars-row {
        margin-bottom: 8px;
    }

    .grv-source-badge svg {
        width: 16px;
        height: 16px;
    }

    .grv-summary-inner {
        padding: 8px 16px;
        gap: 8px;
    }

    .grv-avg-num {
        font-size: 22px;
    }

    .grv-total-count {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .grv-review-card {
        padding: 14px 12px;
    }

    .grv-avatar,
    .grv-avatar-init {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .grv-review-text {
        font-size: 12.5px;
        line-height: 1.6;
    }

    .grv-read-more {
        font-size: 12px;
    }

    .grv-star {
        font-size: 14px;
    }
}

/* Slider-wide mobile fixes */
@media (max-width: 640px) {
    .grv-style-slider-wide .grv-review-card {
        padding: 18px 16px;
        border-radius: 14px;
    }

    .grv-style-slider-wide .grv-avatar,
    .grv-style-slider-wide .grv-avatar-init {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .grv-style-slider-wide .grv-source-badge svg {
        width: 28px;
        height: 28px;
    }

    .grv-style-slider-wide .grv-reviewer-name {
        font-size: 13px;
    }

    .grv-style-slider-wide .grv-stars-row .grv-star {
        font-size: 16px;
    }
}