/**
 * Google Reviews Widget Frontend Styles — Premium Edition
 */

/* ============================================================
   BASE WIDGET
   ============================================================ */
.gr-reviews-widget {
    max-width: 100%;
    padding: 10px 0;
    font-family: inherit;
    color: inherit;
}

/* ============================================================
   RATING SUMMARY — 2-COLUMN PREMIUM LAYOUT
   ============================================================ */
.gr-rating-summary-wrap {
    margin-bottom: 40px;
    border: 2px solid #e2e8f0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
    background: #ffffff;
}

.gr-summary-inner {
    display: flex;
    align-items: stretch;
    min-height: 220px;
}

/* LEFT COLUMN */
.gr-summary-left {
    flex: 1;
    padding: 40px 44px;
    background: linear-gradient(135deg, #1a3a5c 0%, #0f2640 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    position: relative;
    overflow: hidden;
}

/* subtle decorative circle */
.gr-summary-left::before {
    content: '';
    position: absolute;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    top: -60px;
    right: -60px;
    pointer-events: none;
}

.gr-rating-headline {
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    line-height: 1.25;
    letter-spacing: -0.3px;
}

.gr-rating-subtitle {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.72);
    margin: 0;
    line-height: 1.6;
    max-width: 420px;
}

/* Trust list */
.gr-trust-list {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gr-trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

.gr-trust-item svg {
    flex-shrink: 0;
}

/* RIGHT COLUMN */
.gr-summary-right {
    flex: 0 0 280px;
    display: flex;
    align-items: stretch;
    border-left: 2px solid #e2e8f0;
}

.gr-rating-card {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.gr-rating-card-top {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 28px 24px;
    gap: 8px;
    text-align: center;
    background: #ffffff;
}

.gr-rating-brand {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 4px;
}

.gr-google-label {
    font-size: 13px;
    font-weight: 700;
    color: #5f6368;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.gr-rating-score {
    display: flex;
    align-items: baseline;
    gap: 6px;
    line-height: 1;
}

.gr-rating-number {
    font-size: 56px;
    font-weight: 800;
    color: #1a3a5c;
    line-height: 1;
    letter-spacing: -2px;
}

.gr-rating-out-of {
    font-size: 20px;
    font-weight: 400;
    color: #9aa0a6;
    align-self: center;
}

/* keep old class for sidebar compat */
.gr-rating-total {
    font-size: 18px;
    font-weight: 400;
    color: #9aa0a6;
}

.gr-rating-stars-large {
    margin: 2px 0;
}

.gr-rating-meta {
    font-size: 13px;
    color: #6b7280;
    margin-top: 2px;
}

.gr-rating-meta strong {
    color: #374151;
    font-weight: 700;
}

/* Rating card footer — "See all reviews" CTA */
.gr-rating-card-footer {
    border-top: 2px solid #e2e8f0;
    padding: 0;
}

.gr-see-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #1a3a5c !important;
    text-decoration: none;
    padding: 14px 20px;
    background: #f8fafc;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.gr-see-all:hover {
    background: #1a3a5c;
    color: #ffffff !important;
    text-decoration: none;
}

.gr-see-all:hover svg {
    stroke: #ffffff;
}

/* ============================================================
   GRID LAYOUT
   ============================================================ */
.gr-layout-grid .gr-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

/* ============================================================
   SIDEBAR LAYOUT
   ============================================================ */
.gr-layout-sidebar .gr-sidebar-layout {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.gr-layout-sidebar .gr-sidebar-left {
    flex: 0 0 280px;
    min-width: 240px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 20px;
}

/* Sidebar rating box — single column, no 2-col summary here */
.gr-layout-sidebar .gr-rating-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px 20px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    text-align: center;
    gap: 6px;
    width: 100%;
    box-sizing: border-box;
}

.gr-layout-sidebar .gr-sidebar-left .gr-rating-headline {
    font-size: 20px;
    color: #1a3a5c;
    font-weight: 800;
    margin: 0;
}

.gr-layout-sidebar .gr-sidebar-left .gr-rating-box .gr-rating-card-footer,
.gr-layout-sidebar .gr-sidebar-left .gr-see-all {
    width: 100%;
    margin-top: 12px;
    border-top: 2px solid #e2e8f0;
}

.gr-layout-sidebar .gr-sidebar-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.gr-layout-sidebar .gr-sidebar-right .gr-card {
    width: 100%;
}

.gr-layout-sidebar .gr-bottom-cta {
    width: 100%;
}

.gr-layout-sidebar .gr-bottom-cta .gr-cta {
    width: 100%;
    justify-content: center;
    text-align: center;
}

/* ============================================================
   SLIDER LAYOUT
   ============================================================ */
.gr-layout-slider .gr-slider-wrapper {
    position: relative;
    display: flex;
    align-items: stretch;
    margin-bottom: 16px;
}

.gr-layout-slider .gr-slider-viewport {
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.gr-layout-slider .gr-slider-track {
    display: flex;
    gap: 0; /* Gap handled by slide padding to prevent side clipping */
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    /* Give cards room to hover and cast shadows vertically */
    padding: 15px 0 35px 0;
}

.gr-layout-slider .gr-slide {
    flex-shrink: 0;
    display: flex;
    /* Creates 20px gap between cards, and 10px safety buffer on edges for box-shadow */
    padding: 0 10px;
}

.gr-layout-slider .gr-slide .gr-card {
    width: 100%;
    flex: 1;
}

/* Slider Arrow Buttons */
.gr-slider-btn {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    background: #ffffff;
    color: #1a3a5c;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    z-index: 2;
    padding: 0;
}

.gr-slider-btn:hover {
    background: #1a3a5c;
    color: #ffffff;
    border-color: #1a3a5c;
    box-shadow: 0 4px 16px rgba(26,58,92,0.22);
}

.gr-slider-prev { margin-right: 12px; }
.gr-slider-next { margin-left: 12px; }

/* Slider Dots */
.gr-slider-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-bottom: 24px;
}

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

.gr-dot.active {
    background: #1a3a5c;
    width: 24px;
    border-radius: 4px;
}

/* ============================================================
   CARD — shared across all layouts
   ============================================================ */
.gr-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 22px 24px 18px;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.gr-card:hover {
    border-color: #4285F4;
    box-shadow: 0 8px 28px rgba(66, 133, 244, 0.12);
    transform: translateY(-3px);
}

.gr-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.gr-author {
    font-weight: 700;
    font-size: 15px;
    color: #1a3a5c;
}

.gr-card-stars {
    flex-shrink: 0;
}

.gr-card-text {
    font-size: 14.5px;
    line-height: 1.7;
    color: #374151;
    margin-bottom: 14px;
    flex-grow: 1;
}

.gr-read-more {
    display: inline-block;
    margin-left: 3px;
    font-weight: 600;
    color: #4285F4 !important;
    text-decoration: none;
    font-size: 13.5px;
}

.gr-read-more:hover {
    text-decoration: underline;
    color: #1a56db !important;
}

.gr-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 2px solid #f1f5f9;
    font-size: 12.5px;
}

.gr-date {
    color: #9aa0a6;
    font-size: 12px;
}

/* ============================================================
   GOOGLE VERIFIED BADGE — premium pill design
   ============================================================ */
.gr-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f0f6ff;
    border: 1.5px solid #c7dcff;
    border-radius: 20px;
    padding: 3px 8px 3px 5px;
    font-size: 11.5px;
    color: #1a3a5c;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

.gr-verified-badge .gr-verified-text {
    font-size: 11px;
    font-weight: 700;
    color: #1a57b5;
    letter-spacing: 0.01em;
}

.gr-verified-badge .gr-check-icon {
    flex-shrink: 0;
}

/* ============================================================
   BOTTOM CTA
   ============================================================ */
.gr-bottom-cta {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.gr-cta {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 30px;
    background: #1a3a5c;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(26, 58, 92, 0.28);
    border: none;
    letter-spacing: 0.01em;
}

.gr-cta:hover {
    background: #0d2a44;
    color: #ffffff !important;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(26, 58, 92, 0.38);
    transform: translateY(-2px);
}

.gr-arrow {
    transition: transform 0.25s ease;
    display: inline-block;
}

.gr-cta:hover .gr-arrow {
    transform: translateX(5px);
}

/* ============================================================
   ERROR STATE
   ============================================================ */
.gr-error {
    padding: 14px 18px;
    background: #fff5f5;
    border: 2px solid #fed7d7;
    border-radius: 10px;
    color: #c53030;
    font-size: 14px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Summary: stack at tablet */
@media (max-width: 900px) {
    .gr-summary-inner {
        flex-direction: column;
    }

    .gr-summary-right {
        border-left: none;
        border-top: 2px solid #e2e8f0;
        flex: none;
    }

    .gr-rating-card-top {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
        padding: 24px;
    }

    /* Sidebar: stack */
    .gr-layout-sidebar .gr-sidebar-layout {
        flex-direction: column;
    }

    .gr-layout-sidebar .gr-sidebar-left {
        flex: none;
        width: 100%;
        position: static;
    }

    .gr-layout-sidebar .gr-bottom-cta .gr-cta {
        width: auto;
    }
}

@media (max-width: 768px) {
    .gr-layout-grid .gr-grid-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .gr-summary-left {
        padding: 28px 24px;
    }

    .gr-rating-headline {
        font-size: 20px;
    }

    .gr-rating-number {
        font-size: 44px;
    }

    .gr-slider-btn {
        width: 36px;
        height: 36px;
    }

    .gr-slider-prev { margin-right: 8px; }
    .gr-slider-next { margin-left: 8px; }
}

@media (max-width: 480px) {
    .gr-summary-left {
        padding: 24px 20px;
    }

    .gr-rating-headline {
        font-size: 18px;
    }

    .gr-rating-subtitle {
        font-size: 13.5px;
    }

    .gr-rating-number {
        font-size: 38px;
    }

    .gr-card {
        padding: 18px 18px 14px;
    }

    .gr-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .gr-card-text {
        font-size: 13.5px;
    }

    .gr-cta {
        width: 100%;
        justify-content: center;
        padding: 13px 20px;
        font-size: 14px;
    }

    .gr-slider-btn {
        display: none;
    }
}