/* ==========================================================================
   Rental Reviews – Frontend Styles (Apple / DiscoverCars inspired)
   Version 1.2
   ========================================================================== */

/* ── Base ─────────────────────────────────────────────── */
.reviews-rr-reviews-section {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #1D1D1F;
    margin: 48px 0px;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.reviews-rr-reviews-section *,
.reviews-rr-reviews-section *::before,
.reviews-rr-reviews-section *::after {
    box-sizing: border-box;
}

/* ── Header ───────────────────────────────────────────── */
.reviews-rr-reviews-header {
    text-align: center;
    margin-bottom: 40px;
}

.reviews-rr-heading {
    font-size: 32px;
    font-weight: 700;
    color: #1D1D1F;
    margin: 0 0 8px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.reviews-rr-subtitle {
    font-size: 17px;
    margin: 0;
    font-weight: 400;
    line-height: 1.5;
}

/* ── Rating Summary ───────────────────────────────────── */
.reviews-rr-rating-summary {
    display: flex;
    gap: 48px;
    padding: 36px 40px;
    background: #F5F5F7;
    border-radius: 20px;
    margin-bottom: 40px;
    align-items: center;
    border: 1px solid rgba(0, 201, 167, 0.15);
}

.reviews-rr-rating-score {
    text-align: center;
    min-width: 150px;
    flex-shrink: 0;
}

.reviews-rr-score-big {
    font-size: 72px;
    font-weight: 700;
    color: #1D1D1F;
    line-height: 1;
    letter-spacing: -3px;
}

.reviews-rr-score-outof {
    font-size: 15px;
    color: #86868B;
    margin-top: 4px;
    font-weight: 500;
}

.reviews-rr-score-stars {
    margin-top: 10px;
}

.reviews-rr-score-count {
    font-size: 13px;
    color: #86868B;
    margin-top: 10px;
    line-height: 1.4;
}

.reviews-rr-score-count strong {
    color: #1D1D1F;
}

/* ── Stars (display) ──────────────────────────────────── */
.reviews-rr-stars {
    display: inline-flex;
    gap: 2px;
    vertical-align: middle;
}

.reviews-rr-star-icon {
    font-size: 18px;
    font-style: normal;
    line-height: 1;
}

.reviews-rr-star-icon.reviews-rr-star-full {
    color: #fbbf24;
}

.reviews-rr-star-icon.reviews-rr-star-half {
    position: relative;
    color: #D1D1D6;
    background: linear-gradient(90deg, #FF9500 50%, #D1D1D6 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.reviews-rr-star-icon.reviews-rr-star-empty {
    color: #D1D1D6;
}

/* ── Breakdown Bars ───────────────────────────────────── */
.reviews-rr-rating-breakdown {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
}

.reviews-rr-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reviews-rr-bar-stars {
    font-size: 13px;
    min-width: 78px;
    color: #FF9500;
    letter-spacing: 1px;
}

.reviews-rr-bar-track {
    flex: 1;
    height: 8px;
    background: #E5E5EA;
    border-radius: 4px;
    overflow: hidden;
}

.reviews-rr-bar-fill {
    height: 100%;
    background: var(--theme-bg);
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(.25,.8,.25,1);
}

.reviews-rr-bar-pct {
    font-size: 13px;
    color: #86868B;
    min-width: 40px;
    text-align: right;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

/* ── Reviews List ─────────────────────────────────────── */
.reviews-rr-reviews-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.reviews-rr-review-item {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    border: 1px solid #e2e8f0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    animation: rrFadeIn 0.4s ease both;
}

.reviews-rr-review-item:first-child {
    border-top: 1px solid #e2e8f0;
}

.reviews-rr-review-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.reviews-rr-review-item::after {
    content: '\201C';
    position: absolute;
    top: 12px;
    right: 20px;
    font-size: 56px;
    color: #e6faf5;
    font-weight: 800;
    line-height: 1;
    pointer-events: none;
}

@keyframes rrFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.reviews-rr-review-meta {
    order: 2;
    display: grid;
    grid-template-columns: 44px 1fr;
    column-gap: 12px;
    align-content: center;
    min-width: unset;
    max-width: unset;
    flex-shrink: unset;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #e2e8f0;
}

.reviews-rr-review-meta::before {
    display: none;
}

.reviews-rr-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--theme-bg);
    grid-column: 1;
    grid-row: 1 / 4;
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.reviews-rr-review-author {
    grid-column: 2;
    grid-row: 1;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0b1a2e;
    line-height: 1.3;
}

.reviews-rr-review-location {
    grid-column: 2;
    grid-row: 2;
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.3;
    margin-top: 4px;
}

.reviews-rr-review-date {
    grid-column: 2;
    grid-row: 3;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}

.reviews-rr-review-rental-location {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    margin-top: 4px;
}

.reviews-rr-review-rental-location::before {
    content: '\1F4CD';
    font-size: 11px;
}

a.reviews-rr-review-rental-link {
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    margin-bottom: 8px;
}

a.reviews-rr-review-rental-link:hover {
    background: var(--theme-bg-light);
}

.reviews-rr-review-content {
    flex: 1;
    min-width: 0;
    order: 1;
    display: flex;
    flex-direction: column;
}

.reviews-rr-review-stars {
    margin-bottom: 7px;
}

.reviews-rr-review-text {
    font-size: 0.95rem;
    line-height: 1.4;
    color: #64748b;
    margin-bottom: 0;
    font-style: italic;
    flex: 1;
    font-weight: 500;
}

/* ── Load More ────────────────────────────────────────── */
.reviews-rr-load-more-wrap {
    text-align: center;
    padding: 32px 0;
}

.reviews-rr-load-more {
    display: inline-block;
    padding: 12px 36px;
    font-size: 15px;
    font-weight: 600;
    color: #08496D;
    background: transparent;
    border: 2px solid #08496D;
    border-radius: 980px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    letter-spacing: 0.01em;
}

.reviews-rr-load-more:hover {
    background: #08496D;
    color: #fff;
}

.reviews-rr-load-more:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ── Review Form ──────────────────────────────────────── */
.reviews-rr-review-form-wrap {
    margin-top: 48px;
    padding: 40px;
    background: #F5F5F7;
    border-radius: 20px;
}

.reviews-rr-form-heading {
    font-size: 24px;
    font-weight: 700;
    color: #1D1D1F;
    margin: 0 0 28px;
    text-align: center;
    letter-spacing: -0.3px;
}

.reviews-rr-review-form {
    max-width: 640px;
    margin: 0 auto;
}

.reviews-rr-form-row {
    margin-bottom: 20px;
}

.reviews-rr-form-row-2col {
    display: flex;
    gap: 16px;
}

.reviews-rr-form-row-2col .reviews-rr-form-field {
    flex: 1;
}

.reviews-rr-form-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1D1D1F;
    margin-bottom: 6px;
}

.reviews-rr-req {
    color: #FF3B30;
}

.reviews-rr-form-field input[type="text"],
.reviews-rr-form-field input[type="email"],
.reviews-rr-form-field select,
.reviews-rr-form-field textarea {
    width: 100%;
    padding: 11px 14px;
    font-size: 15px;
    font-family: inherit;
    border: 1px solid #D1D1D6;
    border-radius: 12px;
    background: #fff;
    color: #1D1D1F;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.reviews-rr-form-field input::placeholder,
.reviews-rr-form-field textarea::placeholder {
    color: #C7C7CC;
}

.reviews-rr-form-field input:focus,
.reviews-rr-form-field select:focus,
.reviews-rr-form-field textarea:focus {
    outline: none;
    border-color: #19A881;
    box-shadow: 0 0 0 3px rgba(25, 168, 129, 0.15);
}

.reviews-rr-form-field textarea {
    resize: vertical;
    min-height: 110px;
}

.reviews-rr-form-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2386868B' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

/* ── Star Picker ──────────────────────────────────────── */
.reviews-rr-star-picker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    padding: 4px 0;
}

.reviews-rr-star-picker .reviews-rr-star {
    font-size: 36px;
    line-height: 1;
    transition: transform 0.15s ease, color 0.15s ease;
}

.reviews-rr-star-picker .reviews-rr-star:hover {
    transform: scale(1.15);
}

.reviews-rr-star-picker .reviews-rr-star.reviews-rr-star-full {
    color: #FF9500;
}

.reviews-rr-star-picker .reviews-rr-star.reviews-rr-star-half {
    background: linear-gradient(90deg, #FF9500 50%, #D1D1D6 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.reviews-rr-star-picker .reviews-rr-star.reviews-rr-star-empty {
    color: #D1D1D6;
}

.reviews-rr-rating-value {
    font-size: 16px;
    font-weight: 600;
    color: #1D1D1F;
    margin-left: 10px;
    min-width: 48px;
}

/* ── Submit Button ────────────────────────────────────── */
.reviews-rr-submit-btn {
    display: block;
    width: 100%;
    padding: 14px 32px;
    font-size: 17px;
    font-weight: 600;
    color: #fff;
    background: var(--theme-bg);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    letter-spacing: 0.01em;
}

.reviews-rr-submit-btn:hover {
    background: var(--theme-accent);
    transform: translateY(-1px);
}

.reviews-rr-submit-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.reviews-rr-submit-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ── Messages ─────────────────────────────────────────── */
.reviews-rr-form-message .reviews-rr-success {
    background: rgba(25, 168, 129, 0.1);
    color: #0D7A5F;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    margin-top: 16px;
    text-align: center;
}

.reviews-rr-form-message .reviews-rr-error {
    background: rgba(255, 59, 48, 0.08);
    color: #D70015;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    margin-top: 16px;
    text-align: center;
}

/* ── Turnstile widget ─────────────────────────────────── */
.reviews-rr-form-row .cf-turnstile {
    display: flex;
    justify-content: center;
}

/* ── Responsive ───────────────────────────────────────── */
/* ══════════════════════════════════════════════════════ */
/*  Homepage Shortcode – Compact Layout                  */
/* ══════════════════════════════════════════════════════ */
.reviews-rr-homepage-section {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #1D1D1F;
    margin-top: 56px;
    padding: 0px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.reviews-rr-homepage-section *,
.reviews-rr-homepage-section *::before,
.reviews-rr-homepage-section *::after {
    box-sizing: border-box;
}

/* ── Compact aggregate rating (2-column) ──────────────── */
.reviews-rr-homepage-rating {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 32px 40px;
    background: var(--theme-bg-light);
    border-radius: 20px;
    margin-bottom: 36px;
}

.reviews-rr-homepage-rating-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 140px;
    flex-shrink: 0;
}

.reviews-rr-homepage-rating-score {
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.reviews-rr-homepage-big {
    font-size: 52px;
    font-weight: 700;
    color: #1D1D1F;
    line-height: 1;
    letter-spacing: -2px;
}

.reviews-rr-homepage-outof {
    font-size: 20px;
    font-weight: 500;
    color: #86868B;
    letter-spacing: -0.5px;
}

.reviews-rr-homepage-rating-stars {
    display: flex;
    align-items: center;
    margin-top: 8px;
}

.reviews-rr-homepage-rating-stars .reviews-rr-stars {
    font-size: 0;
}

.reviews-rr-homepage-rating-stars .reviews-rr-star-icon {
    font-size: 22px;
}

/* ── Divider ──────────────────────────────────────────── */
.reviews-rr-homepage-rating-divider {
    width: 1px;
    align-self: stretch;
    margin: 4px 32px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        #C7C7CC 20%,
        #C7C7CC 80%,
        transparent 100%
    );
}

/* ── Right column: heading + subtitle ─────────────────── */
.reviews-rr-homepage-rating-right {
    flex: 1;
    min-width: 0;
}

.reviews-rr-homepage-title {
    font-size: 24px;
    font-weight: 700;
    color: #1D1D1F;
    margin: 0 0 8px;
    letter-spacing: -0.3px;
    line-height: 1.25;
}

.reviews-rr-homepage-subtitle {
    font-size: 15px;
    color: #86868B;
    margin: 0;
    line-height: 1.55;
    font-weight: 400;
    margin-bottom: 0 !important;
}

/* ── Homepage reviews list (inherits base styles) ────── */
.reviews-rr-homepage-reviews-list .reviews-rr-review-item {
    animation: rrFadeIn 0.4s ease both;
}

/* ── "View All Reviews" CTA ──────────────────────────── */
.reviews-rr-homepage-cta {
    text-align: center;
    padding: 36px 0 8px;
}

.reviews-rr-homepage-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    color: #fff !important;
    background: var(--theme-bg);
    border: none;
    border-radius: 980px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.28s cubic-bezier(.25,.8,.25,1);
    font-family: inherit;
    letter-spacing: 0.01em;
}

.reviews-rr-homepage-btn:hover {
    background: var(--theme-accent);
    transform: translateY(-2px);
    color: #fff !important;
    text-decoration: none;
}

.reviews-rr-homepage-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(8, 73, 109, 0.2);
}

.reviews-rr-homepage-btn-arrow {
    font-size: 18px;
    transition: transform 0.2s ease;
}

.reviews-rr-homepage-btn:hover .reviews-rr-homepage-btn-arrow {
    transform: translateX(4px);
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
    .reviews-rr-homepage-section {
        padding: 0 16px;
        margin: 36px auto;
    }

    .reviews-rr-homepage-rating {
        flex-direction: column;
        gap: 0;
        padding: 28px 24px;
        border-radius: 16px;
        text-align: center;
    }

    .reviews-rr-homepage-rating-left {
        min-width: auto;
    }

    .reviews-rr-homepage-rating-divider {
        width: 80%;
        height: 1px;
        margin: 20px auto;
        background: linear-gradient(
            to right,
            transparent 0%,
            #C7C7CC 20%,
            #C7C7CC 80%,
            transparent 100%
        );
    }

    .reviews-rr-homepage-title {
        font-size: 20px;
    }

    .reviews-rr-homepage-subtitle {
        font-size: 14px;
    }

    .reviews-rr-homepage-big {
        font-size: 44px;
    }

    .reviews-rr-homepage-btn {
        padding: 13px 32px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .reviews-rr-homepage-big {
        font-size: 38px;
    }

    .reviews-rr-homepage-rating-stars .reviews-rr-star-icon {
        font-size: 18px;
    }

    .reviews-rr-homepage-title {
        font-size: 18px;
    }
}

/* ── Responsive (existing) ────────────────────────────── */
@media (max-width: 768px) {
    .reviews-rr-reviews-section {
        padding: 0 16px;
        margin: 32px auto;
    }

    .reviews-rr-heading {
        font-size: 24px;
    }

    .reviews-rr-subtitle {
        font-size: 15px;
    }

    .reviews-rr-rating-summary {
        flex-direction: column;
        gap: 24px;
        padding: 28px 24px;
        border-radius: 16px;
    }

    .reviews-rr-rating-score {
        min-width: auto;
    }

    .reviews-rr-score-big {
        font-size: 56px;
    }

    .reviews-rr-reviews-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .reviews-rr-review-item {
        padding: 24px;
    }

    .reviews-rr-form-row-2col {
        flex-direction: column;
        gap: 16px;
    }

    .reviews-rr-review-form-wrap {
        padding: 28px 20px;
        border-radius: 16px;
    }

    .reviews-rr-form-heading {
        font-size: 20px;
    }

    .reviews-rr-star-picker .reviews-rr-star {
        font-size: 30px;
    }
}

@media (max-width: 480px) {
    .reviews-rr-reviews-list {
        grid-template-columns: 1fr;
    }

    .reviews-rr-heading {
        font-size: 21px;
    }

    .reviews-rr-score-big {
        font-size: 2.5rem;
    }

    .reviews-rr-bar-stars {
        font-size: 11px;
        min-width: 60px;
    }

    .reviews-rr-star-picker .reviews-rr-star {
        font-size: 26px;
    }
}
