/**
 * Google Review Template - Frontend Styles
 */

/* ==========================================================================
   Base & Reset for GRT
   ========================================================================== */
.grt-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #202124;
    box-sizing: border-box;
    width: 100%;
    margin: 20px 0;
}

.grt-wrapper *,
.grt-wrapper *::before,
.grt-wrapper *::after {
    box-sizing: border-box;
}

/* ==========================================================================
   Shared Component: Card
   ========================================================================== */
.grt-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 22px 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f3f4;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.grt-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.09);
}

/* Header */
.grt-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.grt-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.grt-avatar-container {
    position: relative;
    width: 44px;
    height: 44px;
}

.grt-avatar-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.grt-avatar-letter {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 18px;
    text-transform: uppercase;
    user-select: none;
}

/* Mini Google Badge on Avatar (Image 2) */
.grt-avatar-google-mini {
    position: absolute;
    bottom: -2px;
    right: -3px;
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.grt-user-info {
    flex-grow: 1;
    min-width: 0;
}

.grt-name-verified-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.grt-reviewer-name {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #202124;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.grt-verified-badge {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.grt-verified-icon {
    width: 16px;
    height: 16px;
}

.grt-review-date {
    display: block;
    font-size: 13px;
    color: #70757a;
    margin-top: 3px;
}

/* Stars */
.grt-card-rating {
    margin: 6px 0 12px 0;
}

.grt-stars-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    letter-spacing: 1px;
}

.grt-star-icon {
    font-size: 18px;
    line-height: 1;
}

.grt-star-filled {
    color: #fbbc04;
}

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

/* Review Text */
.grt-card-body {
    font-size: 14px;
    line-height: 1.6;
    color: #3c4043;
}

.grt-review-text {
    margin: 0;
    color: #3c4043;
    word-break: break-word;
}

/* Read More Button */
.grt-read-more-btn {
    background: none;
    border: none;
    padding: 0;
    margin-left: 5px;
    color: #70757a;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    outline: none;
}

.grt-read-more-btn:hover {
    color: #1a73e8;
    text-decoration: underline;
}

/* Footer Badge ("Verified on Google") */
.grt-card-footer {
    margin-top: 16px;
    padding-top: 10px;
}

.grt-google-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #5f6368;
    font-size: 13px;
    font-weight: 500;
    user-select: none;
    cursor: default;
}

.grt-google-g-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}


/* ==========================================================================
   IMAGE 1: Review Page - Grid / Masonry Layout
   ========================================================================== */
.grt-masonry-grid {
    column-count: 3;
    column-gap: 20px;
    width: 100%;
}

.grt-masonry-grid .grt-card {
    break-inside: avoid;
    margin-bottom: 20px;
    display: inline-block;
    width: 100%;
}

/* Summary Card (Top-Left Badge) */
.grt-summary-card {
    text-align: center;
    background: #ffffff;
    border: 1px solid #eef0f3;
    padding: 28px 20px;
}

.grt-summary-title {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 700;
    color: #202124;
}

.grt-summary-rating-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 14px;
}

.grt-summary-score {
    font-size: 24px;
    font-weight: 700;
    color: #202124;
    line-height: 1;
}

.grt-summary-stars .grt-star-icon {
    font-size: 20px;
}

.grt-summary-avatar-stack {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

.grt-avatar-circle-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    margin-left: -8px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.grt-avatar-circle-sm:first-child {
    margin-left: 0;
}

/* Grid Breakpoints */
@media (max-width: 991px) {
    .grt-masonry-grid {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .grt-masonry-grid {
        column-count: 1;
    }
}


/* ==========================================================================
   IMAGE 2: Homepage - Google Reviews Carousel Slider
   ========================================================================== */
.grt-carousel-container {
    background: #ffffff;
    border: 1px solid #ebebeb;
    border-radius: 16px;
    padding: 28px 28px 32px 28px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

/* Carousel Header */
.grt-carousel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 26px;
    padding-bottom: 18px;
    border-bottom: 1px solid #f1f3f4;
}

.grt-google-brand {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.grt-google-wordmark {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.5px;
    display: inline-flex;
}

.grt-brand-sub {
    font-size: 22px;
    font-weight: 600;
    color: #3c4043;
}

.grt-header-rating-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.grt-header-rating-score {
    font-size: 18px;
    font-weight: 700;
    color: #202124;
}

.grt-header-stars .grt-star-icon {
    font-size: 18px;
}

.grt-header-count {
    font-size: 14px;
    color: #70757a;
    font-weight: 400;
}

/* "Write a Review" Button */
.grt-write-review-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e8f0fe;
    color: #1a73e8;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.grt-write-review-btn:hover {
    background: #d2e3fc;
    color: #174ea6;
}

/* Carousel Viewport & Slider */
.grt-carousel-viewport-wrapper {
    position: relative;
    padding: 0 4px;
}

.grt-carousel-viewport {
    overflow: hidden;
    width: 100%;
}

.grt-carousel-track {
    display: flex;
    transition: transform 0.4s ease-in-out;
    will-change: transform;
}

.grt-carousel-slide {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 0 10px;
    box-sizing: border-box;
    display: flex;
}

.grt-slider-card {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    border: 1px solid #ebebeb;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    padding: 24px 22px;
    background: #ffffff;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.grt-slider-card:hover {
    border-color: #dadce0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

/* Premium Carousel Navigation Arrows */
.grt-carousel-arrow {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
    max-width: 46px !important;
    max-height: 46px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    border: 1px solid #eef0f3 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06) !important;
    color: #3c4043 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 10 !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
}

.grt-carousel-arrow:hover {
    background: #ffffff !important;
    color: #1a73e8 !important;
    border-color: #d2e3fc !important;
    transform: translateY(-50%) scale(1.08) !important;
    box-shadow: 0 8px 22px rgba(26, 115, 232, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.grt-carousel-arrow:active {
    transform: translateY(-50%) scale(0.96) !important;
}

.grt-carousel-arrow svg {
    display: block !important;
    width: 22px !important;
    height: 22px !important;
    stroke: currentColor !important;
    stroke-width: 2.5 !important;
    transition: transform 0.2s ease, stroke 0.2s ease !important;
}

.grt-carousel-arrow.grt-prev {
    left: -18px !important;
}

.grt-carousel-arrow.grt-prev:hover svg {
    transform: translateX(-2px) !important;
}

.grt-carousel-arrow.grt-next {
    right: -18px !important;
}

.grt-carousel-arrow.grt-next:hover svg {
    transform: translateX(2px) !important;
}

/* Carousel Responsive */
@media (max-width: 991px) {
    .grt-carousel-slide {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 650px) {
    .grt-carousel-container {
        padding: 20px 16px;
    }
    .grt-carousel-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .grt-write-review-btn {
        width: 100%;
        text-align: center;
    }
    .grt-carousel-slide {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .grt-carousel-arrow.grt-prev {
        left: -6px !important;
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        min-height: 38px !important;
    }
    .grt-carousel-arrow.grt-next {
        right: -6px !important;
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        min-height: 38px !important;
    }
}
