/* ============================================
   Enfold Reviews Widget — Trust Signal Block
   ============================================ */

/* ─── Outer Wrapper (heading + pill) ─── */
.efr-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
}

/* Heading */
.efr-heading {
    margin: 0 0 4px;
    padding: 0;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.25;
    color: #111827;
    letter-spacing: -0.02em;
}

/* Subheading */
.efr-subheading {
    margin: 0 0 10px;
    padding: 0;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.4;
    color: #ffffff;
}

/* Center variant (use class="efr-center" on the shortcode) */
.efr-wrapper.efr-center {
    align-items: center;
    text-align: center;
}

/* ─── Star Rating ─── */
.efr-stars {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 10px;
}

.efr-star {
    display: block;
    flex-shrink: 0;
}

.efr-rating-number {
    margin-left: 6px;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.01em;
}

/* ─── Pill ─── */
.efr-widget {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 20px 8px 10px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06),
                0 0 0 1px rgba(0, 0, 0, 0.03);
    text-decoration: none;
    color: inherit;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    cursor: default;
    line-height: 1;
    max-width: 100%;
}

/* Interactive state when rendered as a link */
a.efr-widget {
    cursor: pointer;
}
a.efr-widget:hover,
a.efr-widget:focus-visible {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.10),
                0 0 0 2px rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
    text-decoration: none;
    color: inherit;
}
a.efr-widget:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* ─── Avatar Stack ─── */
.efr-avatars {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.efr-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    margin-right: -10px;
    position: relative;
    background-color: #e5e7eb;
}

.efr-avatar:last-of-type {
    margin-right: 0;
}

/* "+N" overflow badge */
.efr-overflow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #6366f1;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    border: 2px solid #ffffff;
    margin-left: -10px;
    position: relative;
    z-index: 0;
    flex-shrink: 0;
    letter-spacing: -0.02em;
}

/* ─── Text Block ─── */
.efr-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.efr-headline {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.efr-headline strong {
    font-weight: 800;
}

.efr-sub {
    font-size: 13px;
    font-weight: 400;
    color: #6b7280;
    white-space: nowrap;
}

/* ─── Responsive ─── */

/* Tablets and smaller */
@media (max-width: 768px) {
    .efr-heading {
        font-size: 19px;
    }
    .efr-subheading {
        font-size: 14px;
    }
}

/* Small phones */
@media (max-width: 380px) {
    .efr-heading {
        font-size: 17px;
    }
    .efr-subheading {
        font-size: 13px;
        margin-bottom: 8px;
    }
    .efr-widget {
        gap: 8px;
        padding: 6px 14px 6px 8px;
    }
    .efr-avatar,
    .efr-overflow {
        width: 30px;
        height: 30px;
        font-size: 10px;
    }
    .efr-avatar {
        margin-right: -8px;
    }
    .efr-overflow {
        margin-left: -8px;
    }
    .efr-headline {
        font-size: 13px;
    }
    .efr-sub {
        font-size: 12px;
    }
}

/* ─── Prefers Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {
    .efr-widget,
    a.efr-widget:hover,
    a.efr-widget:focus-visible {
        transition: none;
        transform: none;
    }
}

/* ─── High Contrast / Forced Colors ─── */
@media (forced-colors: active) {
    .efr-widget {
        border: 2px solid ButtonText;
    }
    .efr-overflow {
        background: Highlight;
        color: HighlightText;
    }
    .efr-avatar {
        border-color: Canvas;
    }
}

/* ─── Dark background helper class ─── */
.efr-wrapper--dark .efr-heading {
    color: #f9fafb;
}
.efr-wrapper--dark .efr-subheading {
    color: #d1d5db;
}
.efr-wrapper--dark .efr-rating-number {
    color: #f9fafb;
}
.efr-wrapper--dark .efr-widget {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
