/* ============================================================
   Elementor Review Cards Widget — v2.1
   ============================================================ */

/* ============================================================
   Component wrapper (business details + reviews)
   ============================================================ */
.erc-component {
    display: flex;
    gap: 28px;
    align-items: center;
    width: 100%;
}

.erc-component.erc-business-top {
    flex-direction: column;
    align-items: stretch;
}

.erc-component.erc-business-left {
    flex-direction: row;
}

/* In "left" mode the reviews take the remaining space */
.erc-component.erc-business-left .erc-business {
    flex: 0 0 240px;
    max-width: 240px;
}

.erc-component.erc-business-left .erc-carousel-wrap,
.erc-component.erc-business-left .erc-grid {
    flex: 1 1 auto;
    min-width: 0; /* allow swiper to shrink */
}

/* ============================================================
   Business details box
   ============================================================ */
.erc-business {
    box-sizing: border-box;
}

.erc-business-logo {
    display: block;
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 10px;
}

.erc-business-name {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: #1f1f1f;
}

.erc-business-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.erc-business-rating-num {
    font-size: 18px;
    font-weight: 700;
    color: #1f1f1f;
}

.erc-business-stars {
    color: #fbbc04;
    font-size: 18px;
}

.erc-business-count {
    font-size: 14px;
    color: #5f6368;
    margin-top: 6px;
}

.erc-powered-by {
    font-size: 13px;
    font-weight: 600;
    color: #5f6368;
    margin-top: 10px;
}

.erc-powered-by .erc-g-word {
    font-weight: 700;
}

.erc-business-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    padding: 8px 16px;
    background: #1a73e8;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.erc-business-btn:hover {
    opacity: 0.9;
    color: #fff;
}

.erc-business-btn-icon {
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    padding: 1px;
}

/* ============================================================
   Grid layout
   ============================================================ */
.erc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

/* ============================================================
   Card
   ============================================================ */
.erc-card {
    display: block;
    padding: 20px;
    border-radius: 12px;
    position: relative;
    /* baseline shadow — overridden by the Box Shadow control */
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
}

.erc-card:hover {
    transform: translateY(-4px);
}

a.erc-card {
    cursor: pointer;
}

/* Google logo */
.erc-google {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 20px;
    height: 20px;
}

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

.erc-meta {
    flex: 1;
    min-width: 0;
}

/* --- Avatar ----------------------------------------------- */
.erc-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.erc-avatar-initial {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #4285f4;
    color: #fff;
    font-weight: 700;
    text-align: center;
    line-height: 44px;
    font-size: 18px;
    flex-shrink: 0;
    user-select: none;
}

/* --- Name -------------------------------------------------- */
.erc-name {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    font-size: 15px;
    min-width: 0;
}

.erc-name > a,
.erc-name > span {
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.erc-name > a:hover {
    text-decoration: underline;
}

/* blue verified check, shown inline right after the name */
.erc-verified-inline {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

/* --- Date -------------------------------------------------- */
.erc-date {
    font-size: 12px;
    margin-top: 2px;
}

/* --- Stars ------------------------------------------------- */
.erc-stars {
    font-size: 18px;
    margin: 8px 0 4px;
    letter-spacing: 1px;
    display: flex;
    gap: 2px;
}

/* business stars sit inline, no top margin */
.erc-business-stars {
    margin: 0;
}

.erc-star.empty {
    opacity: 0.25;
}

/* --- Review text ------------------------------------------ */
.erc-text {
    font-size: 14px;
    line-height: 1.6;
    margin-top: 6px;
}

/* --- Link button ------------------------------------------ */
.erc-link-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s ease;
    cursor: pointer;
}

.erc-link-btn:hover {
    opacity: 0.85;
}

/* ============================================================
   Carousel / Swiper
   ============================================================ */
.erc-carousel-wrap {
    position: relative;
    /* side gutters reserve room for the arrows (outside the cards,
       still inside the container); bottom room for dots */
    padding: 0 52px 44px;
    box-sizing: border-box;
}

/* When the arrows are turned off, reclaim the side gutters so the
   reviews fill the full width. When dots are off, drop the bottom room. */
.erc-carousel-wrap.erc-no-arrows {
    padding-left: 0;
    padding-right: 0;
}

.erc-carousel-wrap.erc-no-dots {
    padding-bottom: 0;
}

/* Ensure swiper clips correctly */
.erc-carousel-wrap .swiper {
    overflow: hidden;
}

/* Cards inside swiper should fill the slide */
.erc-carousel-wrap .swiper-slide {
    height: auto;
    display: flex;
}

.erc-carousel-wrap .swiper-slide .erc-card {
    width: 100%;
    height: 100%;
}

/* --- Navigation arrows ------------------------------------ */
/* Scoped under .erc-carousel-wrap and reset hard so theme button
   styles (which often win against a single class) can't deform them. */
.erc-carousel-wrap .erc-swiper-prev,
.erc-carousel-wrap .erc-swiper-next {
    -webkit-appearance: none;
    appearance: none;
    position: absolute;
    /* vertically centre on the cards area (exclude bottom dots room) */
    top: calc(50% - 22px);
    transform: translateY(-50%);
    z-index: 10;
    margin: 0;
    width: 36px;
    height: 36px;
    min-width: 0;
    border-radius: 50%;
    border: none;
    outline: none;
    background: #fff;
    color: #5f6368;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: box-shadow 0.2s ease, opacity 0.2s ease;
    padding: 0;
    box-sizing: border-box;
}

.erc-carousel-wrap .erc-swiper-prev:hover,
.erc-carousel-wrap .erc-swiper-next:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

/* sit in the side gutter — outside the cards, inside the container */
.erc-carousel-wrap .erc-swiper-prev {
    left: 0;
}

.erc-carousel-wrap .erc-swiper-next {
    right: 0;
}

.erc-carousel-wrap .erc-swiper-prev svg,
.erc-carousel-wrap .erc-swiper-next svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: #5f6368;
    pointer-events: none;
}

/* Disabled state */
.erc-carousel-wrap .erc-swiper-prev.swiper-button-disabled,
.erc-carousel-wrap .erc-swiper-next.swiper-button-disabled {
    opacity: 0.35;
    cursor: default;
}

/* Never let Swiper's lock state fully hide the arrows */
.erc-carousel-wrap .erc-swiper-prev.swiper-button-lock,
.erc-carousel-wrap .erc-swiper-next.swiper-button-lock {
    display: flex !important;
}

/* --- Pagination dots --------------------------------------- */
/* Rendered as a direct child of .erc-carousel-wrap (NOT inside the
   overflow:hidden .swiper) so a custom top margin / bottom offset is
   never clipped. */
.erc-swiper-pagination {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    line-height: 1;
    z-index: 5;
}

.erc-swiper-pagination.swiper-pagination-lock {
    display: block !important;
}

.erc-swiper-pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #d0d3d8;
    opacity: 1;
    margin: 0 4px;
}

.erc-swiper-pagination .swiper-pagination-bullet-active {
    background: #5f6368;
}

/* ============================================================
   Responsive helpers
   ============================================================ */
@media (max-width: 767px) {
    /* business box stacks above reviews on small screens */
    .erc-component.erc-business-left {
        flex-direction: column;
        align-items: stretch;
    }
    .erc-component.erc-business-left .erc-business {
        flex-basis: auto;
        max-width: none;
    }

    /* keep arrows snug on small screens */
    .erc-carousel-wrap {
        padding-left: 44px;
        padding-right: 44px;
    }
}
