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

/* ── Base ─────────────────────────────────────────────── */
.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;
}

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

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

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

.rr-subtitle {
    font-size: 17px;
    color: #86868B;
    margin: 0;
    font-weight: 400;
    line-height: 1.5;
}

/* ── Rating Summary ───────────────────────────────────── */
.rr-rating-summary {
    display: flex;
    gap: 48px;
    padding: 36px 40px;
    background: #F5F5F7;
    border-radius: 20px;
    margin-bottom: 40px;
    align-items: center;
}

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

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

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

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

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

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

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

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

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

.rr-star-icon.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;
}

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

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

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

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

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

.rr-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #08496D, #2e86b7);
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(.25,.8,.25,1);
}

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

/* ── Reviews List ─────────────────────────────────────── */
.rr-reviews-list {
    display: flex;
    flex-direction: column;
}

.rr-review-item {
    display: flex;
    gap: 32px;
    padding: 24px 0;
    border-bottom: 1px solid #E5E5EA;
    animation: rrFadeIn 0.4s ease both;
}

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

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

.rr-review-meta {
    min-width: 170px;
    max-width: 210px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 2px;
}

.rr-review-date {
    font-size: 13px;
    color: #86868B;
    font-weight: 500;
}

.rr-review-author {
    font-size: 16px;
    font-weight: 600;
    color: #1D1D1F;
}

.rr-review-location {
    font-size: 13px;
    color: #86868B;
}

.rr-review-rental-location {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #19A881;
    background: rgba(25, 168, 129, 0.08);
    padding: 3px 10px;
    border-radius: 20px;
    margin-top: 4px;
}

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

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

a.rr-review-rental-link:hover {
    background: rgba(25, 168, 129, 0.18);
    color: #0D7A5F;
}

.rr-review-content {
    flex: 1;
    min-width: 0;
}

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

.rr-review-text {
    font-size: 15px;
    line-height: 1.65;
    color: #424245;
}

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

.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;
}

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

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

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

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

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

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

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

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

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

.rr-req {
    color: #FF3B30;
}

.rr-form-field input[type="text"],
.rr-form-field input[type="email"],
.rr-form-field select,
.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;
}

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

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

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

.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 ──────────────────────────────────────── */
.rr-star-picker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    padding: 4px 0;
}

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

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

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

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

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

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

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

.rr-submit-btn:hover {
    background: #0f5d87;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(25, 168, 129, 0.28);
}

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

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

/* ── Messages ─────────────────────────────────────────── */
.rr-form-message .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;
}

.rr-form-message .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 ─────────────────────────────────── */
.rr-form-row .cf-turnstile {
    display: flex;
    justify-content: center;
}

/* ── Responsive ───────────────────────────────────────── */
/* ══════════════════════════════════════════════════════ */
/*  Homepage Shortcode – Compact Layout                  */
/* ══════════════════════════════════════════════════════ */
.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;
}

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

/* ── Compact aggregate rating (2-column) ──────────────── */
.rr-homepage-rating {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 32px 40px;
    background: linear-gradient(135deg, #F5F5F7 0%, #EEEEF2 100%);
    border-radius: 20px;
    margin-bottom: 36px;
}

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

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

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

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

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

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

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

/* ── Divider ──────────────────────────────────────────── */
.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 ─────────────────── */
.rr-homepage-rating-right {
    flex: 1;
    min-width: 0;
}

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

.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) ────── */
.rr-homepage-reviews-list .rr-review-item {
    animation: rrFadeIn 0.4s ease both;
}

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

.rr-homepage-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    color: #fff !important;
    background: #08496D;
    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;
}

.rr-homepage-btn:hover {
    background: #0f5d87;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(8, 73, 109, 0.3);
    color: #fff !important;
    text-decoration: none;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    .rr-review-item {
        flex-direction: column;
        gap: 12px;
    }

    .rr-review-meta {
        max-width: none;
        min-width: auto;
        flex-direction: row;
        gap: 10px;
        flex-wrap: wrap;
        align-items: center;
    }

    .rr-review-meta .rr-review-author {
        font-size: 15px;
    }

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

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

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

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

@media (max-width: 480px) {
    .rr-heading {
        font-size: 21px;
    }

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

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

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