/**
 * Google Reviews Carousel - Main Styles
 * Modern carousel design for Google Reviews
 */

/* ======================================
   Container & Layout
   ====================================== */
.grc-container {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    margin: 10px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* ======================================
   Rating Badge (Left Side)
   ====================================== */
.grc-rating-badge {
    flex-shrink: 0;
    width: 25%;
    min-width: 200px;
    padding: 25px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.grc-rating-score {
    font-size: 48px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1;
    margin-bottom: 5px;
}

.grc-rating-badge .grc-stars {
    font-size: 20px;
    margin-bottom: 8px;
}

.grc-rating-count {
    font-size: 13px;
    color: #5f6368;
    margin-bottom: 15px;
}

.grc-powered-by {
    font-size: 12px;
    color: #9aa0a6;
    margin-bottom: 15px;
}

.grc-powered-by strong {
    color: #5f6368;
}

.grc-review-button {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    background: #096584;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.2s ease, transform 0.2s ease;
    line-height: 1.4;
    text-align: left;
    min-width: 140px;
}

.grc-review-button:hover {
    background: #07526b;
    color: white;
    transform: translateY(-1px);
}

.grc-review-button .grc-btn-text {
    font-size: 13px;
    line-height: 1.3;
}

.grc-review-button .grc-google-icon {
    width: 32px !important;
    height: 32px !important;
    flex-shrink: 0;
    vertical-align: middle;
}

/* ======================================
   Carousel Wrapper
   ====================================== */
.grc-carousel-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.grc-carousel-inner {
    display: flex;
    align-items: center;
    position: relative;
}

.grc-carousel {
    width: 100%;
    overflow: hidden;
    padding: 10px 0;
}

.grc-carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    padding: 5px;
}

/* ======================================
   Review Cards
   ====================================== */
.grc-review-card {
    flex-shrink: 0;
    width: 280px;
    min-height: 200px;
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 12px;
    padding: 20px;
    box-shadow: none;
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.grc-review-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Review Header */
.grc-review-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.grc-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.grc-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grc-avatar-initial {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
}

.grc-author-info {
    flex: 1;
    min-width: 0;
}

.grc-author-name {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #202124;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.grc-review-date {
    display: block;
    font-size: 12px;
    color: #9aa0a6;
}

.grc-google-badge {
    flex-shrink: 0;
}

.grc-google-badge img {
    width: 20px;
    height: 20px;
}

/* Review Rating */
.grc-review-rating {
    margin-bottom: 12px;
}

/* Stars */
.grc-stars {
    display: inline-flex;
    gap: 1px;
}

.grc-star {
    color: #fbbc04;
    font-size: 16px;
    line-height: 1;
}

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

.grc-star-half {
    position: relative;
    color: #dadce0;
}

.grc-star-half::before {
    content: '★';
    position: absolute;
    left: 0;
    width: 50%;
    overflow: hidden;
    color: #fbbc04;
}

/* Review Text */
.grc-review-text {
    font-size: 14px;
    line-height: 1.6;
    color: #3c4043;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
}

/* ======================================
   Navigation Arrows
   ====================================== */
.grc-nav {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
    opacity: 0.4;
}

.grc-nav:hover {
    opacity: 0.8;
}

.grc-nav:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

.grc-nav svg {
    width: 24px;
    height: 24px;
    color: #5f6368;
}

.grc-nav-prev {
    left: 0;
}

.grc-nav-next {
    right: 0;
}

/* ======================================
   Dots Navigation
   ====================================== */
.grc-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 15px 0;
    width: 100%;
    clear: both;
}

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

.grc-dot:hover {
    background: #9aa0a6;
}

.grc-dot.active {
    background: #1a73e8;
}

/* ======================================
   Error & Empty States
   ====================================== */
.grc-error {
    padding: 20px;
    background: #fce8e6;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    color: #c5221f;
    text-align: center;
}

.grc-no-reviews {
    padding: 40px 20px;
    text-align: center;
    color: #5f6368;
    font-size: 14px;
}

/* ======================================
   Responsive Design
   ====================================== */
@media (max-width: 1024px) {
    .grc-container {
        flex-direction: column;
        align-items: center;
    }
    
    .grc-rating-badge {
        width: 100%;
        min-width: unset;
        max-width: none;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        padding: 20px;
        border-bottom: 1px solid #e8eaed;
    }
    
    .grc-rating-score {
        font-size: 36px;
    }
    
    .grc-carousel-wrapper {
        width: 100%;
    }
    
    .grc-nav-prev {
        left: 10px;
    }
    
    .grc-nav-next {
        right: 10px;
    }
}

@media (max-width: 768px) {
    .grc-container {
        padding: 15px;
        gap: 20px;
    }
    
    .grc-review-card {
        width: 260px;
        padding: 16px;
    }
    
    .grc-carousel-track {
        gap: 15px;
    }
    
    .grc-nav {
        width: 36px;
        height: 36px;
    }
    
    .grc-nav svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .grc-review-card {
        width: calc(100vw - 80px);
        max-width: 300px;
    }
    
    .grc-rating-badge {
        flex-direction: column;
    }
}

/* ======================================
   Animations
   ====================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.grc-review-card {
    animation: fadeIn 0.3s ease forwards;
}

.grc-review-card:nth-child(1) { animation-delay: 0s; }
.grc-review-card:nth-child(2) { animation-delay: 0.1s; }
.grc-review-card:nth-child(3) { animation-delay: 0.2s; }
.grc-review-card:nth-child(4) { animation-delay: 0.3s; }
.grc-review-card:nth-child(5) { animation-delay: 0.4s; }
