.wpgrbp-slider-wrapper {
    display: flex;
    gap: 0; /* Removing gap, using padding on items for equal spacing */
    align-items: stretch; /* Ensures Summary and Slider are equal height */
    max-width: 1200px;
    margin: 20px auto 80px auto; /* Added bottom margin for nav buttons */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    position: relative;
}

/* Business Summary Card */
.wpgrbp-summary-wrapper {
    flex: 1 0 0;
    padding: 10px;
    box-sizing: border-box;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.wpgrbp-business-summary {
    flex: 1;
    width: 100%;
    /* width: 280px;  Removed to allow flex control */
    flex-shrink: 0;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Align content to top */
    align-items: flex-start; /* Align content to left */
    text-align: left;
    border: 1px solid #eee;
    box-sizing: border-box;
}

.wpgrbp-summary-header {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.wpgrbp-summary-icon svg {
    width: 40px;
    height: 40px;
    margin-bottom: 0;
}

.wpgrbp-summary-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.wpgrbp-summary-rating {
    margin-bottom: 10px;
}

.wpgrbp-rating-score {
    font-size: 2em;
    font-weight: bold;
    color: #333;
    display: inline-block;
    line-height: 1;
    margin-right: 10px;
}

.wpgrbp-rating-stars {
    color: #f1c40f;
    font-size: 1.2em;
    display: inline-block;
}

.wpgrbp-summary-count {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 20px;
    display: block;
}

.wpgrbp-summary-powered {
    font-size: 0.8em;
    color: #888;
    margin-bottom: 15px;
    margin-top: auto; /* Push to bottom if we want, or just let it sit */
}

.wpgrbp-summary-button {
    display: inline-block;
    padding: 10px 20px;
    background: #f1f3f4;
    color: #333;
    text-decoration: none;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9em;
    transition: background 0.2s;
    align-self: flex-start;
}

.wpgrbp-summary-button:hover {
    background: #e0e0e0;
}

/* Slider Container */
.wpgrbp-slider-container {
    flex: var(--slides-per-view, 3) 0 0;
    position: relative;
    /* overflow: hidden; Removed to allow Nav outside */
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    /* Ensure it takes height */
    min-width: 0; /* Flexbox fix for overflow */
    padding-bottom: 0; /* Removed space for navigation arrows */
    box-sizing: border-box;
}

.wpgrbp-slider-mask {
    overflow: hidden;
    flex: 1;
    width: 100%;
    border-radius: 8px; /* Optional: matches card radius if needed */
}

.wpgrbp-slider-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    flex: 1; /* Fill container height */
    align-items: stretch; /* Stretch slides to track height */
}

/* Individual Slide */
.wpgrbp-slide {
    box-sizing: border-box;
    padding: 10px;
    /* width is set by JS or inline style based on per-view */
    flex-shrink: 0;
    height: auto; 
    display: flex; 
    flex-direction: column;
}

.wpgrbp-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    height: 100%; /* Stretch to slide height */
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
    text-align: left;
    box-sizing: border-box;
}

.wpgrbp-slide-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    justify-content: flex-start;
}

.wpgrbp-slide-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    font-size: 18px;
}

.wpgrbp-slide-meta {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.wpgrbp-slide-author {
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

.wpgrbp-slide-date {
    font-size: 0.8em;
    color: #888;
}

.wpgrbp-google-icon {
    width: 24px;
    height: 24px;
    margin-left: auto;
}

.wpgrbp-slide-rating {
    color: #f1c40f;
    font-size: 1em;
    margin-bottom: 10px;
    text-align: left;
}

.wpgrbp-slide-content {
    font-size: 0.95em;
    line-height: 1.5;
    color: #444;
    flex-grow: 1;
    font-style: normal;
    
    /* Text Truncation for uniformity */
    display: -webkit-box;
    -webkit-line-clamp: 6; /* Show max 6 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Navigation Buttons */
.wpgrbp-slider-nav {
    position: absolute;
    bottom: -60px; /* Position below the slider */
    right: 0;
    top: auto;
    width: auto;
    display: flex;
    justify-content: flex-end;
    transform: none;
    pointer-events: auto;
    z-index: 10;
    padding: 10px 0;
}

.wpgrbp-prev, .wpgrbp-next {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    color: #333;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 50%;
    pointer-events: auto; /* Re-enable clicks */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s;
    margin: 0 0 0 10px; /* Only left margin */
}

.wpgrbp-prev:hover, .wpgrbp-next:hover {
    background: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Dark Mode Support */
body.wpgrbp-dark-mode .wpgrbp-card,
body.wpgrbp-dark-mode .wpgrbp-business-summary {
    background: #2d2d2d;
    border-color: #404040;
}

body.wpgrbp-dark-mode .wpgrbp-summary-title,
body.wpgrbp-dark-mode .wpgrbp-rating-score,
body.wpgrbp-dark-mode .wpgrbp-slide-author {
    color: #fff;
}

body.wpgrbp-dark-mode .wpgrbp-summary-count,
body.wpgrbp-dark-mode .wpgrbp-slide-date,
body.wpgrbp-dark-mode .wpgrbp-slide-content {
    color: #ccc;
}

body.wpgrbp-dark-mode .wpgrbp-summary-button {
    background: #404040;
    color: #fff;
}

body.wpgrbp-dark-mode .wpgrbp-summary-button:hover {
    background: #505050;
}

body.wpgrbp-dark-mode .wpgrbp-prev, 
body.wpgrbp-dark-mode .wpgrbp-next {
    background: rgba(45, 45, 45, 0.9);
    border-color: #404040;
    color: #fff;
}

/* Responsive */
@media (max-width: 900px) {
    .wpgrbp-slider-wrapper {
        flex-direction: column;
        align-items: center;
        margin-bottom: 20px; /* Reset margin */
    }
    
    .wpgrbp-summary-wrapper,
    .wpgrbp-slider-container {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
    }

    .wpgrbp-business-summary {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
        align-items: center;
        text-align: center;
    }

    .wpgrbp-summary-header {
        justify-content: center;
    }

    .wpgrbp-summary-button {
        align-self: center;
    }

    .wpgrbp-slider-container {
        width: 100%;
        padding-bottom: 60px; /* Add space for nav below on mobile if needed, or keep standard */
    }
    
    .wpgrbp-slider-nav {
        bottom: 0; /* Reset for mobile or keep below? */
        /* If we keep it below, we need padding-bottom on container or margin on wrapper */
        /* Let's keep it below but ensure container has space if stacked */
        position: absolute;
        bottom: -50px;
        right: 0;
        justify-content: center;
        width: 100%;
    }

    .wpgrbp-slide {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}
