/**
 * Google Reviews Widget - Frontend CSS
 *
 * @author Ovidiu Ciucu
 * @copyright 2025
 */

.google-reviews-widget {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin: 30px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.reviews-badge {
    max-width: 100%;
}

.reviews-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

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

.reviews-label {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.reviews-rating {
    text-align: center;
    margin-bottom: 25px;
}

.stars {
    font-size: 32px;
    color: #fbbc04;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.star.filled {
    color: #fbbc04;
}

.star.half {
    color: #fbbc04;
    position: relative;
    display: inline-block;
}

.star.empty {
    color: #ddd;
}

.rating-score {
    font-size: 16px;
    line-height: 1.4;
}

.rating-score strong {
    font-size: 36px;
    color: #333;
    margin-right: 8px;
    font-weight: 700;
}

.reviews-count {
    color: #666;
    font-size: 14px;
    display: block;
    margin-top: 5px;
}

.recent-reviews {
    margin: 25px 0;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.recent-reviews h4 {
    font-size: 16px;
    margin: 0 0 20px;
    color: #333;
    font-weight: 600;
}

.review-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f5f5f5;
}

.review-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    position: relative;
}

.author-photo,
.author-photo-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

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

.author-info {
    flex: 1;
}

.author-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    display: block;
    margin-bottom: 3px;
}

.review-stars-small {
    color: #fbbc04;
    font-size: 14px;
    line-height: 1;
}

.review-time {
    font-size: 12px;
    color: #999;
    position: absolute;
    top: 0;
    right: 0;
}

.review-text {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin: 0;
    padding-left: 52px;
}

.reviews-cta {
    text-align: center;
    margin: 25px 0 15px;
}

.google-review-btn {
    background: linear-gradient(135deg, #4285f4 0%, #357ae8 100%);
    color: #fff !important;
    border: none;
    padding: 14px 32px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.google-review-btn:hover {
    background: linear-gradient(135deg, #357ae8 0%, #2a5fcf 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(66, 133, 244, 0.4);
    color: #fff !important;
}

.google-review-btn:active {
    transform: translateY(0);
}

.powered-by {
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.powered-by small {
    font-size: 11px;
    color: #999;
}

/* Footer placement */
footer .google-reviews-widget {
    margin: 40px auto;
    max-width: 450px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .google-reviews-widget {
        padding: 20px 16px;
        margin: 20px 0;
    }

    .stars {
        font-size: 28px;
    }

    .rating-score strong {
        font-size: 30px;
    }

    .reviews-count {
        font-size: 13px;
    }

    .review-text {
        padding-left: 0;
        margin-top: 10px;
    }

    .review-time {
        position: static;
        display: block;
        margin-top: 3px;
    }

    .google-review-btn {
        padding: 12px 28px;
        font-size: 15px;
        width: 100%;
    }

    .review-author {
        flex-wrap: wrap;
    }

    .author-info {
        flex: none;
        width: calc(100% - 52px);
    }
}

@media (max-width: 480px) {
    .google-reviews-widget {
        padding: 16px 12px;
    }

    .google-logo {
        height: 20px;
    }

    .reviews-label {
        font-size: 16px;
    }

    .stars {
        font-size: 24px;
        letter-spacing: 1px;
    }

    .rating-score strong {
        font-size: 26px;
    }

    .recent-reviews h4 {
        font-size: 15px;
    }

    .author-photo,
    .author-photo-placeholder {
        width: 36px;
        height: 36px;
    }

    .author-name {
        font-size: 13px;
    }

    .review-stars-small {
        font-size: 12px;
    }

    .review-text {
        font-size: 13px;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .google-reviews-widget {
        background: #1e1e1e;
        color: #e0e0e0;
    }

    .reviews-label,
    .rating-score strong,
    .author-name,
    .recent-reviews h4 {
        color: #e0e0e0;
    }

    .reviews-count,
    .review-text {
        color: #b0b0b0;
    }

    .reviews-header,
    .recent-reviews,
    .powered-by,
    .review-item {
        border-color: #333;
    }

    .star.empty {
        color: #444;
    }

    .review-time {
        color: #888;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.google-reviews-widget {
    animation: fadeInUp 0.6s ease-out;
}

.review-item {
    animation: fadeInUp 0.4s ease-out backwards;
}

.review-item:nth-child(1) {
    animation-delay: 0.1s;
}

.review-item:nth-child(2) {
    animation-delay: 0.2s;
}

.review-item:nth-child(3) {
    animation-delay: 0.3s;
}
