/* =========================================================
   GEMTech Elementor AddOns — Google Reviews Widget Styles
   ========================================================= */

/* Outer wrapper — flex row: summary panel + carousel */
.gemtech-google-reviews-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 32px;
}

/* On mobile, stack vertically: summary above carousel */
@media ( max-width: 767px ) {
    .gemtech-google-reviews-wrapper {
        flex-direction: column;
        align-items: stretch; /* children fill full width in column mode */
        gap: 24px;
    }

    .gemtech-google-reviews__summary {
        width: 100% !important;
        flex: none !important;
        flex-direction: row;
        justify-content: center;
        gap: 16px;
        text-align: center;
        order: -1;
    }

    .gemtech-google-reviews-wrapper .gemtech-google-reviews {
        width: 100% !important;
        flex: none !important;
        min-width: 0;
    }
}

/* ── Summary panel ──────────────────────────────────────── */
.gemtech-google-reviews__summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex: 0 0 180px;
    width: 180px;
    padding: 30px 20px;
    border-radius: 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
    background-color: #ffffff;
    box-sizing: border-box;
    gap: 10px;
    /* Align panel height with the carousel card height */
    align-self: stretch;
}

.gemtech-google-reviews__summary-score {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    color: #111827;
}

.gemtech-google-reviews__summary-stars {
    display: flex;
    justify-content: center;
    font-size: 1.4rem;
    gap: 2px;
    color: #f59e0b;
}

.gemtech-google-reviews__summary-label {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.4;
}

/* ── "Powered by Google" label ──────────────────────────── */
.gemtech-google-reviews__powered-by {
    margin: 0;
    font-size: 0.75rem;
    color: #9ca3af;
    line-height: 1.4;
}

.gemtech-google-reviews__google-wordmark {
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

/* ── "Review us on Google" button ───────────────────────── */
.gemtech-google-reviews__review-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    padding: 9px 16px;
    background-color: #1a73e8;
    border-radius: 24px;
    text-decoration: none;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.gemtech-google-reviews__review-btn:hover {
    background-color: #1557b0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    color: #ffffff;
}

.gemtech-google-reviews__review-btn-text {
    line-height: 1;
}

.gemtech-google-reviews__review-btn-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: #ffffff;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Carousel takes all remaining space */
.gemtech-google-reviews-wrapper .gemtech-google-reviews {
    flex: 1 1 0;
    min-width: 0; /* prevents flex blowout */
}

.gemtech-google-reviews {
    position: relative;
    overflow: hidden;
}

/* Track — horizontally scrollable flex row driven by JS */
.gemtech-google-reviews__track {
    display: flex;
    align-items: stretch;
    transition: transform 0.4s ease;
    will-change: transform;
}

.gemtech-google-reviews__item {
    flex: 0 0 auto;
    /* JS sets an explicit px width. This fallback (100%) ensures items are
       visible and usable even before JS has run or if JS fails to load. */
    width: 100%;
    box-sizing: border-box;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
    background-color: #ffffff;
}

/* Row 1: photo + name */
.gemtech-google-reviews__author-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.gemtech-google-reviews__author-photo {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
}

.gemtech-google-reviews__author-photo img {
    display: block;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(15, 23, 42, 0.08);
}

.gemtech-google-reviews__author {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
}

/* Row 2: place name */
.gemtech-google-reviews__place-name {
    display: inline-flex;
    padding: 4px 10px;
    background: rgba(15, 23, 42, 0.04);
    border-radius: 999px;
    font-size: 0.85rem;
    color: #374151;
    margin-bottom: 10px;
}

/* Row 3: star rating */
.gemtech-google-reviews__rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.95rem;
    color: #f59e0b;
    margin-bottom: 16px;
}

.gemtech-google-reviews__star {
    display: inline-block;
    color: #d1d5db;
}

.gemtech-google-reviews__star.is-filled {
    color: #f59e0b;
}

.gemtech-google-reviews__text {
    margin-bottom: 18px;
    line-height: 1.75;
    color: #475569;
    white-space: pre-line;
    max-height: 120px;
    overflow-y: auto;
    /* Tidy scrollbar on supported browsers */
    scrollbar-width: thin;
    scrollbar-color: rgba(15, 23, 42, 0.2) transparent;
}

.gemtech-google-reviews__text::-webkit-scrollbar {
    width: 4px;
}

.gemtech-google-reviews__text::-webkit-scrollbar-track {
    background: transparent;
}

.gemtech-google-reviews__text::-webkit-scrollbar-thumb {
    background-color: rgba(15, 23, 42, 0.2);
    border-radius: 4px;
}

.gemtech-google-reviews__owner-response {
    padding: 18px;
    border-left: 4px solid #6366f1;
    background: rgba(99, 102, 241, 0.06);
    border-radius: 12px;
}

.gemtech-google-reviews__owner-response strong {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    color: #111827;
}

.gemtech-google-reviews__owner-response p {
    margin: 0;
    color: #334155;
}

.gemtech-google-reviews__dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}

.gemtech-google-reviews__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.3);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.2s ease, width 0.2s ease, height 0.2s ease;
}

.gemtech-google-reviews__dot.is-active {
    width: 14px;
    height: 14px;
    background: #f59e0b;
}
