/* Google Reviews Display Plugin Styles */

#reviews {
    padding: 2rem 0;
    background-color: #eeeeee;
    margin-top:2rem;
}

.reviews-container{
    width: 90%;
    max-width: 1200px;
    text-align: center;
    margin: auto;
}

.grd-reviews-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.grd-overall-rating {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #2b9c8e;
    color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.grd-rating-stars {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.grd-rating-number {
    font-size: 2em;
    font-weight: bold;
    margin: 0 10px;
}

.grd-total-reviews {
    font-size: 1.2em;
    opacity: 0.9;
}

/* Flickity-style carousel display */
.grd-reviews-carousel {
    position: relative;
    overflow: hidden;
    padding: 10px 0;
    width: 100%;
    height: 300px;
}

/* Loading spinner overlay */
.grd-reviews-container {
    position: relative;
}

.grd-loading-spinner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: #eeeeee;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.grd-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2b9c8e;
    border-radius: 50%;
    animation: grd-spin 1s linear infinite;
}

.grd-loading-text {
    color: #264653;
    font-size: 14px;
    font-weight: 500;
}

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

.grd-reviews-container.loaded .grd-loading-spinner {
    opacity: 0;
    pointer-events: none;
}

.grd-reviews-carousel .grd-review-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: transform 0.3s ease, opacity 0.3s ease;
    visibility: hidden;
}

.grd-reviews-carousel .grd-review-item.active {
    opacity: 1;
    transform: translateX(0);
    visibility: visible;
}

.grd-reviews-carousel .grd-review-item.prev {
    transform: translateX(-100%);
    opacity: 0;
}

.grd-reviews-carousel .grd-review-item.next {
    transform: translateX(100%);
    opacity: 0;
}

/* Grid display for larger screens or when explicitly set */
.grd-reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.grd-review-item {
    padding: 25px 100px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.grd-review-item:hover {
    transform: translateY(-5px);
}

.grd-review-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.grd-reviewer-photo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin: auto;
    object-fit: cover;
    border: 3px solid #f0f0f0;
}

.grd-reviewer-info {
    flex: 1;
}

.grd-reviewer-name {
    font-weight: 600;
    font-size: 1.1em;
    color: #264653;
    margin-bottom: 5px;
}

.grd-review-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin:auto;
}

.grd-verified-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #4285f4;
    border-radius: 50%;
    margin-left: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.grd-verified-badge:hover {
    background: #3367d6;
    transform: scale(1.1);
}

.grd-verified-badge::before {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
}

.grd-verified-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    margin-bottom: 5px;
}

.grd-verified-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
}

.grd-verified-badge:hover .grd-verified-tooltip {
    opacity: 1;
    visibility: visible;
}

.grd-review-time {
    font-size: 0.9em;
    color: #7f8c8d;
}

.grd-review-text {
    line-height: 1.6;
    color: #264653;
    font-size: 1em;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ecf0f1;
}

.grd-read-more,
.grd-read-less {
    background: none;
    border: none;
    color: #2b9c8e;
    cursor: pointer;
    font-size: 0.9em;
    text-decoration: underline;
    padding: 0;
    margin-left: 5px;
    font-family: inherit;
}

.grd-read-more:hover,
.grd-read-less:hover {
    color: #264653;
    text-decoration: none;
}

.grd-star {
    color: #ddd;
    font-size: 1.2em;
    margin-right: 2px;
    transition: color 0.2s ease;
}

.grd-star.filled {
    color: #f39c12;
}

.grd-no-reviews {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px dashed #dee2e6;
}

/* Carousel Navigation Controls */
.grd-reviews-container {
    position: relative;
}

.grd-carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 20px;
}

.grd-carousel-controls button {
    background: #2b9c8e;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.grd-carousel-controls .grd-prev {
    left: -25px;
}

.grd-carousel-controls .grd-next {
    right: -25px;
}

.grd-carousel-controls button:hover {
    background: #264653;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 5px 15px rgba(43, 156, 142, 0.4);
}

.grd-carousel-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: translateY(-50%);
}

.grd-counter {
    display:none;
    font-weight: 600;
    color: #264653;
    font-size: 1.1em;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .grd-reviews-carousel .grd-review-item {
        flex: 0 0 100%;
        min-width: 100%;
        max-width: 100%;
    }
    
    .grd-reviews-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .grd-review-item {
        padding: 20px;
    }
    
    .grd-rating-stars {
        font-size: 2em;
    }
    
    .grd-rating-number {
        font-size: 1.5em;
    }
    
    .grd-total-reviews {
        font-size: 1em;
    }
    
    .grd-carousel-controls button {
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }
    
    .grd-carousel-controls .grd-prev {
        left: -20px;
    }
    
    .grd-carousel-controls .grd-next {
        right: -20px;
    }
}

@media (max-width: 480px) {
    .grd-reviews-container {
        padding: 10px;
    }
    
    .grd-overall-rating {
        padding: 15px;
    }
    
    .grd-review-item {
        padding: 15px;
    }
    
    .grd-reviewer-photo {
        width: 60px;
        height: 60px;
    }
}

/* Loading Animation */
.grd-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.grd-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2b9c8e;
    border-radius: 50%;
    animation: grd-spin 1s linear infinite;
}

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

/* Error States */
.grd-error {
    background: #fee;
    color: #c33;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #fcc;
    text-align: center;
}

/* Custom scrollbar for review text */
.grd-review-text::-webkit-scrollbar {
    width: 6px;
}

.grd-review-text::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.grd-review-text::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.grd-review-text::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Animation for new reviews */
@keyframes grd-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.grd-review-item {
    animation: grd-fadeInUp 0.6s ease-out;
}

.grd-review-item:nth-child(1) { animation-delay: 0.1s; }
.grd-review-item:nth-child(2) { animation-delay: 0.2s; }
.grd-review-item:nth-child(3) { animation-delay: 0.3s; }
.grd-review-item:nth-child(4) { animation-delay: 0.4s; }
.grd-review-item:nth-child(5) { animation-delay: 0.5s; }
