/* ============================================================
   Somnium Google Reviews – Widget Styles (sgr- prefix)
   ============================================================ */

/* ── Full Widget (badge + slider in a row) ── */
.sgr-full-widget {
    display: flex;
    align-items: stretch;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    font-family: inherit;
}

/* ── Theme: Dark ── */
.sgr-theme-dark {
    background: #1a1a2e;
    color: #ffffff;
}

.sgr-theme-dark .sgr-badge {
    background: #16213e;
    border-right: 1px solid rgba(255,255,255,.08);
}

.sgr-theme-dark .sgr-review-card {
    background: #16213e;
    border: 1px solid rgba(255,255,255,.06);
}

.sgr-theme-dark .sgr-review-card:hover {
    border-color: rgba(255,255,255,.15);
}

.sgr-theme-dark .sgr-review-text {
    color: rgba(255,255,255,.85);
}

.sgr-theme-dark .sgr-review-time {
    color: rgba(255,255,255,.5);
}

.sgr-theme-dark .sgr-badge-meta {
    color: rgba(255,255,255,.7);
}

.sgr-theme-dark .sgr-read-more {
    color: #64b5f6;
}

.sgr-theme-dark .sgr-reviews-splide .splide__arrow {
    background: rgba(255,255,255,.12);
}

.sgr-theme-dark .sgr-reviews-splide .splide__arrow svg {
    fill: #fff;
}

.sgr-theme-dark .sgr-reviews-splide .splide__arrow:hover {
    background: rgba(255,255,255,.22);
}

.sgr-theme-dark .sgr-avatar-placeholder {
    background: #0f3460;
    color: #64b5f6;
}

/* ── Theme: Light ── */
.sgr-theme-light {
    background: #ffffff;
    color: #1a1a1a;
    border: 1px solid #e8e8e8;
}

.sgr-theme-light .sgr-badge {
    background: #fafafa;
    border-right: 1px solid #e8e8e8;
}

.sgr-theme-light .sgr-review-card {
    background: #ffffff;
    border: 1px solid #e8e8e8;
}

.sgr-theme-light .sgr-review-card:hover {
    border-color: #ccc;
}

.sgr-theme-light .sgr-review-text {
    color: #555;
}

.sgr-theme-light .sgr-review-time {
    color: #999;
}

.sgr-theme-light .sgr-badge-meta {
    color: #666;
}

.sgr-theme-light .sgr-read-more {
    color: #1a73e8;
}

.sgr-theme-light .sgr-reviews-splide .splide__arrow {
    background: #f0f0f0;
}

.sgr-theme-light .sgr-reviews-splide .splide__arrow svg {
    fill: #333;
}

.sgr-theme-light .sgr-reviews-splide .splide__arrow:hover {
    background: #ddd;
}

.sgr-theme-light .sgr-avatar-placeholder {
    background: #e8f0fe;
    color: #1a73e8;
}

/* ── Badge ── */
.sgr-badge {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 28px 24px;
    flex-shrink: 0;
    gap: 6px;
}

.sgr-badge-standalone {
    border-radius: 8px;
    padding: 24px 28px;
}

/* Google header: wordmark + "Reseñas" */
.sgr-badge-google-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.sgr-google-wordmark {
    display: block;
    height: 22px;
    width: auto;
}

.sgr-badge-reviews-label {
    font-size: 18px;
    font-weight: 300;
    letter-spacing: -0.3px;
    opacity: 0.7;
}

/* Rating row: large number + stars */
.sgr-badge-rating-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sgr-badge-rating-number {
    font-size: 42px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -1px;
}

/* Legacy label (hidden in new design but kept for compatibility) */
.sgr-badge-label {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.sgr-badge-meta {
    font-size: 13px;
    line-height: 1.4;
}

.sgr-badge-meta strong {
    font-weight: 700;
}

/* Legacy logo wrapper */
.sgr-badge-logo {
    margin-top: 4px;
}

.sgr-badge-logo img {
    display: block;
    width: 80px;
    height: auto;
}

/* ── Stars ── */
.sgr-stars {
    display: flex;
    gap: 2px;
    font-size: 24px;
    line-height: 1;
}

.sgr-stars-sm {
    font-size: 16px;
    margin-bottom: 6px;
}

.sgr-star {
    display: inline-block;
}

.sgr-star-full {
    color: #FBBC04;
}

.sgr-star-half {
    color: #FBBC04;
    opacity: .6;
}

.sgr-star-empty {
    color: #FBBC04;
    opacity: .25;
}

/* ── Slider Wrap ── */
.sgr-slider-wrap {
    flex: 1;
    min-width: 0; /* prevent flex overflow */
    padding: 16px 12px;
}

.sgr-slider-standalone {
    border-radius: 8px;
    padding: 16px 8px;
    font-family: inherit;
}

/* Add side padding when arrows are shown to prevent overlap */
.sgr-nav-arrows .sgr-reviews-splide,
.sgr-nav-both .sgr-reviews-splide {
    padding: 0 44px;
}

.sgr-reviews-splide .splide__slide {
    padding: 4px 2px;
}

/* ── Arrows ── */
.sgr-reviews-splide .splide__arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    opacity: 1;
    transition: background .2s ease, transform .2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,.1);
}

.sgr-reviews-splide .splide__arrow:hover {
    transform: scale(1.1);
}

.sgr-reviews-splide .splide__arrow--prev {
    left: 0;
}

.sgr-reviews-splide .splide__arrow--next {
    right: 0;
}

/* ── Pagination / Bullets ── */
.sgr-reviews-splide .splide__pagination {
    bottom: -28px;
    padding: 0;
    gap: 6px;
}

.sgr-reviews-splide .splide__pagination__page {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    opacity: .4;
    transition: opacity .2s, transform .2s;
}

.sgr-reviews-splide .splide__pagination__page.is-active {
    background: #FBBC04;
    opacity: 1;
    transform: scale(1.3);
}

/* Extra bottom padding when pagination is visible */
.sgr-nav-dots .sgr-slider-standalone,
.sgr-nav-both .sgr-slider-standalone,
.sgr-nav-dots.sgr-slider-standalone,
.sgr-nav-both.sgr-slider-standalone {
    padding-bottom: 44px;
}

/* ── Review Card ── */
.sgr-review-card {
    border-radius: 8px;
    padding: 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.sgr-review-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.sgr-review-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

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

.sgr-review-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.sgr-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 700;
}

.sgr-review-author-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sgr-review-author {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sgr-review-time {
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.sgr-review-g-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.sgr-review-text {
    font-size: 13px;
    line-height: 1.55;
    margin-top: 4px;
    flex: 1;
}

.sgr-read-more {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    margin-top: 4px;
    transition: opacity .2s;
}

.sgr-read-more:hover {
    opacity: .8;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .sgr-full-widget {
        flex-direction: column;
    }

    .sgr-badge {
        min-width: 100% !important;
        max-width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid rgba(255,255,255,.08);
        align-items: center;
        text-align: center;
        padding: 20px 16px;
    }

    .sgr-badge-google-header {
        justify-content: center;
    }

    .sgr-badge-rating-row {
        justify-content: center;
    }

    .sgr-badge-rating-number {
        font-size: 32px;
    }

    .sgr-theme-light .sgr-badge {
        border-bottom-color: #e8e8e8;
    }

    .sgr-slider-wrap {
        padding: 12px 8px;
    }

    .sgr-badge-label {
        font-size: 16px;
    }

    .sgr-stars {
        font-size: 20px;
    }

    /* Smaller arrows on mobile */
    .sgr-nav-arrows .sgr-reviews-splide,
    .sgr-nav-both .sgr-reviews-splide {
        padding: 0 32px;
    }

    .sgr-reviews-splide .splide__arrow {
        width: 28px;
        height: 28px;
    }
}
