/* Olive Google Reviews — Frontend Carousel */

.ogr-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Carousel Container */
.ogr-carousel {
    position: relative;
    overflow: hidden;
    padding: 0 48px;
}

.ogr-carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: transform;
}

/* Review Card */
.ogr-card {
    flex: 0 0 calc(25% - 15px);
    min-width: 0;
    background: #f6f6f6;
    border-radius: 12px;
    padding: 24px;
    box-sizing: border-box;
}

.ogr-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.ogr-card-author {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

/* Avatar */
.ogr-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.ogr-avatar-fallback {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Author Info */
.ogr-author-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ogr-author-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.ogr-author-name:hover {
    text-decoration: underline;
}

.ogr-review-time {
    font-size: 12px;
    color: #70757a;
    line-height: 1.3;
}

/* Google Icon */
.ogr-google-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

/* Stars */
.ogr-stars {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 12px;
}

.ogr-star {
    flex-shrink: 0;
}

.ogr-verified {
    margin-left: 4px;
    flex-shrink: 0;
}

/* Review Text */
.ogr-review-text {
    font-size: 14px;
    line-height: 1.6;
    color: #3c4043;
}

.ogr-text-content {
    margin: 0;
    overflow-wrap: anywhere;
    white-space: normal;
}

.ogr-read-more {
    display: inline-block;
    margin-top: 6px;
    font-size: 13px;
    color: #70757a;
    text-decoration: none;
}

.ogr-read-more:hover {
    text-decoration: underline;
}

/* Carousel Navigation Buttons */
.ogr-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #dadce0;
    color: #3c4043;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.2s, background 0.2s;
    z-index: 2;
    padding: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.ogr-carousel-btn:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.ogr-carousel-btn:disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

.ogr-carousel-prev {
    left: 0;
}

.ogr-carousel-next {
    right: 0;
}

/* CTA Button */
.ogr-cta {
    text-align: center;
    margin-top: 32px;
}

.ogr-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: #7c3aed;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    font-family: inherit;
}

.ogr-cta-button:hover {
    background: #6d28d9;
    color: #fff;
    text-decoration: none;
}

.ogr-cta-button:active {
    transform: scale(0.98);
}

/* Error Notice (admin-only) */
.ogr-error-notice {
    background: #fcf0f0;
    color: #d63638;
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid #f0c6c7;
    font-size: 14px;
}

/* Responsive — Tablet */
@media (max-width: 1024px) {
    .ogr-card {
        flex: 0 0 calc(50% - 10px);
    }

    .ogr-carousel {
        padding: 0 44px;
    }
}

/* Responsive — Mobile */
@media (max-width: 600px) {
    .ogr-wrapper {
        padding: 0 8px;
        max-width: 100%;
        overflow-x: hidden; /* stop the carousel from forcing page-wide horizontal scroll */
        box-sizing: border-box;
    }

    .ogr-carousel {
        padding: 0;
        overflow: hidden; /* contain cards within the viewport; the track scrolls internally */
    }

    .ogr-carousel-track {
        gap: 12px;
        scroll-snap-type: x mandatory;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-padding: 0 8px;
        padding: 4px 0;
        scrollbar-width: none;
        max-width: 100%;
    }

    .ogr-carousel-track::-webkit-scrollbar {
        display: none;
    }

    .ogr-card {
        /* Size the card to the viewport (not the parent) so a wide theme
           container can't stretch it off-screen. */
        flex: 0 0 85vw;
        max-width: 85vw;
        scroll-snap-align: start;
        padding: 20px;
    }

    .ogr-carousel-btn {
        display: none;
    }

    .ogr-cta {
        margin-top: 24px;
    }

    .ogr-cta-button {
        font-size: 15px;
        padding: 12px 28px;
    }
}
