/* WCC Google Reviews Styles                      */
/* Version: 2.3 - Updated December 25, 2025      */
/* Mobile optimized with multi-breakpoint design  */
/* 320px, 375px, 480px, 600px, 768px breakpoints */

.wcc-google-reviews-wrapper {
    max-width: 700px;
    margin: 30px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    box-sizing: border-box;
    width: 100%;
}

/* Header */
.wcc-reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.wcc-reviews-header-left {
    flex: 1;
}

.wcc-reviews-title {
    font-size: 1.5em;
    font-weight: 700;
    color: #333;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wcc-reviews-title .fa-google {
    color: #4285f4;
    font-size: 0.9em;
}

.wcc-reviews-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}

.wcc-rating-number {
    font-size: 1.8em;
    font-weight: 700;
    color: #202124;
    line-height: 1;
}

.wcc-rating-stars {
    display: flex;
    gap: 2px;
}

.wcc-rating-stars .fa-star,
.wcc-rating-stars .fa-star-half-alt {
    color: #fbbc04;
    font-size: 18px;
}

.wcc-rating-stars .far.fa-star {
    color: #dadce0;
}

.wcc-rating-count {
    font-size: 0.9em;
    color: #5f6368;
    margin-left: 4px;
}

.wcc-reviews-google-badge {
    display: flex;
    align-items: center;
    margin-top: 5px;
}

.wcc-google-logo {
    height: 24px;
    width: auto;
}

/* Carousel Container */
.wcc-reviews-carousel {
    position: relative;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
    padding: 30px 60px;
    box-sizing: border-box;
    min-height: 220px;
}

/* Slider Wrapper - Clips overflow properly */
.wcc-reviews-slider-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
}

/* Slider - Moves slides */
.wcc-reviews-slider {
    display: flex;
    flex-wrap: nowrap;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
    width: 100%;
    position: relative;
}

.wcc-review-slide {
    min-width: 100%;
    max-width: 100%;
    flex-shrink: 0;
    flex-grow: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Review Card */
.wcc-review-card {
    background: transparent;
    border-radius: 0;
    padding: 20px 0;
    border-left: 4px solid #4285f4;
    padding-left: 20px;
    transition: none;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

.wcc-review-card:hover {
    transform: none;
    box-shadow: none;
}

/* Review Header */
.wcc-review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.wcc-reviewer-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #4285f4;
    flex-shrink: 0;
}

.wcc-reviewer-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
}

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

.wcc-reviewer-name {
    font-size: 1.1em;
    font-weight: 600;
    color: #202124;
    margin: 0 0 6px 0;
}

.wcc-review-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Star Rating */
.wcc-review-rating {
    display: flex;
    gap: 2px;
}

.wcc-review-rating .fa-star {
    color: #fbbc04;
    font-size: 16px;
}

.wcc-review-rating .far.fa-star {
    color: #d1d5db;
}

.wcc-review-date {
    font-size: 0.85em;
    color: #5f6368;
}

/* Review Text */
.wcc-review-text {
    color: #3c4043;
    font-size: 0.95em;
    line-height: 1.6;
    margin: 15px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.wcc-review-text p {
    color: #3c4043;
    font-size: 1em;
    margin: 0;
}

/* Review Link */
.wcc-review-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1a73e8;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    transition: color 0.2s ease;
    margin-top: 10px;
}

.wcc-review-link:hover {
    color: #1557b0;
    text-decoration: underline;
}

.wcc-review-link .fa-external-link-alt {
    font-size: 0.8em;
}

/* Navigation Arrows */
.wcc-carousel-prev,
.wcc-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #dadce0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 20;
    font-size: 18px;
    color: #5f6368;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    padding: 0;
    margin: 0;
}

.wcc-carousel-prev {
    left: -20px;
}

.wcc-carousel-next {
    right: -20px;
}

.wcc-carousel-prev:hover,
.wcc-carousel-next:hover {
    background: #f8f9fa;
    border-color: #dadce0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-50%) scale(1.05);
}

.wcc-carousel-prev:disabled,
.wcc-carousel-next:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Dots Navigation */
.wcc-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e8eaed;
}

.wcc-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dadce0;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wcc-dot:hover {
    background: #5f6368;
    transform: scale(1.2);
}

.wcc-dot.active {
    background: #1a73e8;
    width: 24px;
    border-radius: 4px;
}

/* Error/Empty States */
.wcc-reviews-error,
.wcc-reviews-empty {
    background: #fef7e0;
    border: 1px solid #f9ab00;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    color: #3c4043;
}

.wcc-reviews-error p,
.wcc-reviews-empty p {
    margin: 0;
    font-size: 0.95em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wcc-google-reviews-wrapper {
        max-width: 100%;
        width: 100%;
        padding: 15px 10px;
        margin: 20px auto;
        box-sizing: border-box;
    }

    .wcc-reviews-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 20px;
        padding-bottom: 12px;
    }

    .wcc-reviews-title {
        font-size: 1.2em;
    }

    .wcc-rating-number {
        font-size: 1.4em;
    }

    .wcc-rating-stars .fa-star,
    .wcc-rating-stars .fa-star-half-alt {
        font-size: 15px;
    }

    .wcc-rating-count {
        font-size: 0.85em;
    }

    .wcc-google-logo {
        height: 18px;
    }

    .wcc-reviews-carousel {
        padding: 20px 35px;
        border-radius: 10px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .wcc-review-card {
        padding: 15px 0;
        padding-left: 15px;
    }

    .wcc-review-header {
        gap: 12px;
        margin-bottom: 12px;
    }

    .wcc-reviewer-photo {
        width: 48px;
        height: 48px;
    }

    .wcc-reviewer-placeholder {
        font-size: 20px;
    }

    .wcc-reviewer-name {
        font-size: 1em;
    }

    .wcc-review-meta {
        gap: 8px;
    }

    .wcc-review-rating .fa-star {
        font-size: 14px;
    }

    .wcc-review-text {
        font-size: 0.9em;
        line-height: 1.5;
        margin: 12px 0;
    }

    .wcc-review-link {
        font-size: 0.85em;
        margin-top: 8px;
    }

    .wcc-carousel-prev,
    .wcc-carousel-next {
        width: 40px;
        height: 40px;
        font-size: 15px;
    }

    .wcc-carousel-prev {
        left: -12px;
    }

    .wcc-carousel-next {
        right: -12px;
    }

    .wcc-carousel-dots {
        gap: 6px;
        margin-top: 20px;
        padding-top: 15px;
    }

    .wcc-dot {
        width: 7px;
        height: 7px;
    }

    .wcc-dot.active {
        width: 20px;
    }
}

@media (max-width: 480px) {
    .wcc-google-reviews-wrapper {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }

    .wcc-reviews-header {
        margin-bottom: 12px;
        padding-bottom: 8px;
        flex-direction: column;
        align-items: flex-start;
    }

    .wcc-reviews-header-left {
        width: 100%;
    }

    .wcc-reviews-title {
        font-size: 1.1em;
        margin: 0 0 5px 0;
    }

    .wcc-reviews-summary {
        gap: 6px;
    }

    .wcc-rating-number {
        font-size: 1.2em;
    }

    .wcc-rating-stars .fa-star,
    .wcc-rating-stars .fa-star-half-alt {
        font-size: 12px;
    }

    .wcc-rating-count {
        font-size: 0.7em;
    }

    .wcc-reviews-google-badge {
        display: none;
    }

    .wcc-google-logo {
        height: 16px;
    }

    .wcc-reviews-carousel {
        padding: 12px;
        border-radius: 8px;
        box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .wcc-reviews-slider-wrapper {
        width: 100%;
        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }

    .wcc-reviews-slider {
        width: 100%;
    }

    .wcc-review-slide {
        width: 100%;
        padding: 0;
    }

    .wcc-review-card {
        padding: 8px 0;
        padding-left: 8px;
        border-left-width: 2px;
        margin: 0;
    }

    .wcc-review-header {
        gap: 8px;
        margin-bottom: 8px;
    }

    .wcc-reviewer-photo {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }

    .wcc-reviewer-placeholder {
        font-size: 14px;
    }

    .wcc-reviewer-info {
        min-width: 0;
    }

    .wcc-reviewer-name {
        font-size: 0.9em;
        margin: 0 0 2px 0;
    }

    .wcc-review-meta {
        font-size: 0.7em;
        gap: 4px;
        flex-wrap: wrap;
    }

    .wcc-review-rating .fa-star {
        font-size: 11px;
    }

    .wcc-review-rating {
        gap: 1px;
    }

    .wcc-review-date {
        font-size: 0.65em;
    }

    .wcc-review-text {
        font-size: 0.8em;
        line-height: 1.3;
        margin: 6px 0;
        word-break: break-word;
    }

    .wcc-review-text p {
        margin: 0;
        font-size: 0.8em;
    }

    .wcc-review-link {
        font-size: 0.7em;
        margin-top: 4px;
    }

    .wcc-carousel-prev,
    .wcc-carousel-next {
        width: 28px;
        height: 28px;
        font-size: 11px;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 20;
    }

    .wcc-carousel-prev {
        left: 3px;
    }

    .wcc-carousel-next {
        right: 3px;
    }

    .wcc-carousel-dots {
        gap: 4px;
        margin-top: 10px;
        padding-top: 8px;
    }

    .wcc-dot {
        width: 5px;
        height: 5px;
    }

    .wcc-dot.active {
        width: 15px;
    }
}

/* Animation for slide transitions */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.wcc-review-slide {
    animation: slideIn 0.5s ease-out;
}

/* Mobile Container Constraints - Override parent block constraints */
@media (max-width: 480px) {
    /* Override WordPress block group constraints */
    .wp-block-group .wcc-google-reviews-wrapper {
        max-width: 100%;
        width: 100%;
        margin: 15px 0;
        padding: 5px;
        box-sizing: border-box;
    }

    /* Ensure carousel doesn't overflow container */
    .wp-block-group .wcc-reviews-carousel {
        max-width: 100%;
        width: 100%;
        overflow: hidden;
    }

    .wp-block-group .wcc-reviews-slider-wrapper {
        max-width: 100%;
        width: 100%;
    }

    .wp-block-group .wcc-reviews-slider {
        max-width: 100%;
        width: 100%;
    }

    .wp-block-group .wcc-review-slide {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
    }
}

/* ================================================= */
/* Additional Responsive Breakpoints               */
/* 320px, 375px, 600px for better mobile coverage  */
/* ================================================= */

/* Extra Small Phones (320px) */
@media (max-width: 320px) {
    .wcc-google-reviews-wrapper {
        max-width: 100%;
        width: 100%;
        padding: 8px 5px;
        margin: 10px 0;
    }

    .wcc-reviews-carousel {
        padding: 10px;
        border-radius: 6px;
    }

    .wcc-reviews-title {
        font-size: 1em;
        margin: 0 0 4px 0;
    }

    .wcc-rating-number {
        font-size: 1em;
    }

    .wcc-carousel-prev,
    .wcc-carousel-next {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }

    .wcc-review-card {
        padding: 6px 0;
        padding-left: 6px;
    }

    .wcc-reviewer-photo {
        width: 32px;
        height: 32px;
    }

    .wcc-review-text {
        font-size: 0.75em;
        margin: 4px 0;
    }
}

/* Small Phones (375px) */
@media (max-width: 375px) {
    .wcc-google-reviews-wrapper {
        max-width: 100%;
        width: 100%;
        padding: 10px 7px;
        margin: 12px 0;
    }

    .wcc-reviews-carousel {
        padding: 12px;
        border-radius: 8px;
    }

    .wcc-reviews-title {
        font-size: 1.05em;
        margin: 0 0 5px 0;
    }

    .wcc-rating-number {
        font-size: 1.1em;
    }

    .wcc-review-card {
        padding: 8px 0;
        padding-left: 8px;
    }

    .wcc-reviewer-photo {
        width: 36px;
        height: 36px;
    }

    .wcc-review-text {
        font-size: 0.8em;
        margin: 5px 0;
    }

    .wcc-carousel-prev,
    .wcc-carousel-next {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }
}

/* Small Tablets (600px) */
@media (max-width: 600px) and (min-width: 481px) {
    .wcc-google-reviews-wrapper {
        max-width: 100%;
        width: 100%;
        padding: 15px 12px;
        margin: 18px 0;
    }

    .wcc-reviews-carousel {
        padding: 16px;
        border-radius: 10px;
    }

    .wcc-reviews-title {
        font-size: 1.15em;
        margin: 0 0 6px 0;
    }

    .wcc-rating-number {
        font-size: 1.3em;
    }

    .wcc-review-card {
        padding: 10px 0;
        padding-left: 10px;
    }

    .wcc-reviewer-photo {
        width: 42px;
        height: 42px;
    }

    .wcc-review-text {
        font-size: 0.85em;
        line-height: 1.4;
        margin: 8px 0;
    }

    .wcc-carousel-prev,
    .wcc-carousel-next {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
}