/* Custom Google Reviews - Frontend Styles */

.cgr-widget-wrapper {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Grid Layout */
.cgr-grid-container {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .cgr-grid-container {
        grid-template-columns: 1fr !important;
    }
}

/* List Layout */
.cgr-list-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Slider Layout */
.cgr-slider-container {
    position: relative;
    margin-bottom: 40px;
}

.cgr-swiper {
    width: 100%;
    padding: 10px 0;
}

.swiper-button-prev,
.swiper-button-next {
    color: #4285f4;
}

.swiper-pagination-bullet-active {
    background: #4285f4;
}

/* Review Item */
.cgr-review-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.cgr-review-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.cgr-review-inner {
    display: flex;
    gap: 15px;
}

.cgr-review-photo {
    flex-shrink: 0;
}

.cgr-review-photo img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.cgr-review-photo-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #4285f4;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
}

.cgr-review-content-wrapper {
    flex: 1;
}

.cgr-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.cgr-review-author {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #202124;
}

.cgr-review-author a {
    color: #202124;
    text-decoration: none;
}

.cgr-review-author a:hover {
    color: #4285f4;
}

.cgr-review-google-icon img {
    width: 20px;
    height: 20px;
}

.cgr-review-rating {
    margin-bottom: 8px;
}

.cgr-stars {
    display: inline-flex;
    gap: 2px;
}

.cgr-star {
    color: #fbbc04;
    font-size: 18px;
}

.cgr-star-empty {
    color: #dadce0;
}

.cgr-review-date {
    font-size: 13px;
    color: #5f6368;
    margin-bottom: 10px;
}

.cgr-review-text {
    font-size: 14px;
    line-height: 1.6;
    color: #3c4043;
}

.cgr-review-text p {
    margin: 0 0 10px 0;
}

.cgr-read-more {
    color: #4285f4;
    text-decoration: none;
    font-weight: 500;
}

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

/* Badge Layout */
.cgr-badge-container {
    display: inline-block;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cgr-badge-inner {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cgr-badge-google-icon img {
    width: 40px;
    height: 40px;
}

.cgr-badge-rating {
    text-align: center;
}

.cgr-badge-stars {
    margin-bottom: 5px;
}

.cgr-badge-score {
    font-size: 24px;
    font-weight: bold;
    color: #202124;
}

.cgr-badge-count {
    font-size: 14px;
    color: #5f6368;
}

/* Popup Layout */
.cgr-popup-trigger {
    margin: 20px 0;
}

.cgr-popup-btn {
    background: #4285f4;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.cgr-popup-btn:hover {
    background: #3367d6;
}

.cgr-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cgr-popup-container {
    background: #fff;
    border-radius: 8px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 30px;
}

.cgr-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 32px;
    color: #5f6368;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
}

.cgr-popup-close:hover {
    color: #202124;
}

.cgr-popup-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Load More Button */
.cgr-load-more-wrapper {
    text-align: center;
    margin-top: 20px;
}

.cgr-load-more-btn {
    background: #4285f4;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.cgr-load-more-btn:hover {
    background: #3367d6;
}

.cgr-load-more-btn:disabled {
    background: #dadce0;
    cursor: not-allowed;
}

/* Loading State */
.cgr-loading {
    opacity: 0.6;
    pointer-events: none;
}

.cgr-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4285f4;
    border-radius: 50%;
    animation: cgr-spin 1s linear infinite;
}

@keyframes cgr-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
