/**
 * BanglarServer Reviews - Frontend Stylesheet
 * Version: 2.2.0
 * Section Header & Footer, Fluid Auto-Fit Grid, Centered Mobile Carousel, Read-More Modal & Theming
 */

:root {
    --bsr-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --bsr-star-filled: #f59e0b;
    --bsr-star-empty: #d1d5db;
    --bsr-verified-green: #10b981;
    --bsr-primary-blue: #2563eb;
    --bsr-primary-blue-dark: #1d4ed8;
    --bsr-radius-sm: 8px;
    --bsr-radius-md: 14px;
    --bsr-radius-lg: 20px;
    --bsr-radius-full: 9999px;
    --bsr-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    /* Dynamic Custom Colors */
    --bsr-heading-color: #0f172a;
    --bsr-subheading-color: #64748b;
    --bsr-footer-color: #64748b;
    --bsr-card-bg: #ffffff;
    --bsr-card-border: #e2e8f0;
    --bsr-card-text: #334155;
    --bsr-staff-color: #1e293b;
}

/* ==========================================================================
   Base Wrapper & Scoping
   ========================================================================== */
.bsr-wrapper {
    font-family: var(--bsr-font);
    box-sizing: border-box;
    width: 100%;
    margin: 36px 0;
    line-height: 1.5;
    position: relative;
}

.bsr-wrapper *,
.bsr-wrapper *::before,
.bsr-wrapper *::after,
.bsr-badge-wrapper *,
.bsr-summary-container *,
.bsr-drawer-modal *,
.bsr-modal-backdrop * {
    box-sizing: border-box;
}

/* ==========================================================================
   Section Header (Title, Subtitle & Badge - Top Red Mark)
   ========================================================================== */
.bsr-section-header {
    margin-bottom: 28px;
    width: 100%;
}

.bsr-section-header.bsr-header-align-center {
    text-align: center;
}
.bsr-section-header.bsr-header-align-left {
    text-align: left;
}
.bsr-section-header.bsr-header-align-right {
    text-align: right;
}

.bsr-section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eff6ff;
    color: var(--bsr-primary-blue);
    padding: 5px 14px;
    border-radius: var(--bsr-radius-full);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    border: 1px solid rgba(37, 99, 235, 0.15);
}

.bsr-section-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--bsr-heading-color);
    margin: 0 0 8px;
    line-height: 1.25;
}

.bsr-section-subtitle {
    font-size: 15px;
    color: var(--bsr-subheading-color);
    margin: 0 auto;
    max-width: 680px;
    line-height: 1.6;
}

/* ==========================================================================
   Section Footer (Reassurance Note / CTA - Bottom Green Mark)
   ========================================================================== */
.bsr-section-footer {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px dashed #e2e8f0;
    width: 100%;
}

.bsr-section-footer.bsr-footer-align-center {
    text-align: center;
}
.bsr-section-footer.bsr-footer-align-left {
    text-align: left;
}
.bsr-section-footer.bsr-footer-align-right {
    text-align: right;
}

.bsr-footer-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--bsr-heading-color);
    margin: 0 0 6px;
}

.bsr-footer-subtitle {
    font-size: 13.5px;
    color: var(--bsr-footer-color);
    margin: 0 auto;
    max-width: 720px;
    line-height: 1.55;
}

/* ==========================================================================
   Category Filter Tabs
   ========================================================================== */
.bsr-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 28px;
}

.bsr-filter-tab {
    font-family: var(--bsr-font);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: var(--bsr-radius-full);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    transition: var(--bsr-transition);
    outline: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.bsr-filter-tab:hover {
    background: #f8fafc;
    color: #1e293b;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.bsr-filter-tab.active {
    background: var(--bsr-primary-blue);
    color: #ffffff;
    border-color: var(--bsr-primary-blue);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* ==========================================================================
   Review Card Structure & Equal Heights (Compact & Sleek Design)
   ========================================================================== */
.bsr-grid-item,
.bsr-carousel-slide {
    display: flex !important;
    height: auto;
}

.bsr-card {
    background: var(--bsr-card-bg);
    border-radius: var(--bsr-radius-md);
    border: 1px solid var(--bsr-card-border);
    padding: 18px 18px 14px;
    box-shadow: 0 4px 18px -2px rgba(0, 0, 0, 0.05);
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    transition: var(--bsr-transition);
    position: relative;
    overflow: hidden;
}

.bsr-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 26px -4px rgba(0, 0, 0, 0.09);
    border-color: #cbd5e1;
}

/* Card Header */
.bsr-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.bsr-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
}

.bsr-avatar-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

.bsr-verified-check {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: #ffffff;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.bsr-verified-check svg {
    width: 12px;
    height: 12px;
}

.bsr-client-info {
    flex-grow: 1;
    min-width: 0;
}

.bsr-client-meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.bsr-client-name {
    font-size: 14.5px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bsr-verified-tag {
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #ecfdf5;
    color: var(--bsr-verified-green);
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1.2;
}

.bsr-category-badge {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--bsr-primary-blue);
    background: #eff6ff;
    padding: 2px 7px;
    border-radius: 5px;
}

/* Star Rating Row */
.bsr-rating-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.bsr-stars-display {
    display: inline-flex;
    gap: 2px;
    font-size: 15px;
    line-height: 1;
    letter-spacing: 0.5px;
}

.bsr-star-filled {
    color: var(--bsr-star-filled);
    text-shadow: 0 1px 2px rgba(245, 158, 11, 0.2);
}

.bsr-star-empty {
    color: var(--bsr-star-empty);
}

.bsr-score-number {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1;
}

/* Review Text Content & Read More (Guaranteed directly beneath) */
.bsr-review-body {
    flex: 1 1 auto;
    margin-bottom: 10px;
}

.bsr-review-text {
    color: var(--bsr-card-text);
    font-size: 13.5px;
    line-height: 1.55;
    margin: 0;
    word-break: break-word;
}

.bsr-read-more-btn {
    display: block;
    margin-top: 5px;
    margin-bottom: 0;
    background: none;
    border: none;
    color: var(--bsr-primary-blue);
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: var(--bsr-transition);
}
.bsr-read-more-btn:hover {
    color: var(--bsr-primary-blue-dark);
}

/* Client Suggestion Box */
.bsr-suggestion-box {
    background: #f8fafc;
    border-left: 3px solid #64748b;
    border-radius: 0 var(--bsr-radius-sm) var(--bsr-radius-sm) 0;
    padding: 8px 12px;
    margin-bottom: 10px;
}

.bsr-suggestion-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin-bottom: 3px;
}

.bsr-suggestion-text {
    font-size: 12.5px;
    font-style: italic;
    color: #475569;
    margin: 0;
    line-height: 1.45;
}

/* Card Footer */
.bsr-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
    font-size: 11.5px;
    color: #64748b;
    gap: 6px;
    margin-top: auto;
    width: 100%;
}

.bsr-staff-credit {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    line-height: 1.25;
}

.bsr-staff-credit strong {
    color: var(--bsr-staff-color);
    font-weight: 600;
}

.bsr-review-date {
    margin-left: auto;
    font-size: 11.5px;
    color: #94a3b8;
    white-space: nowrap;
}

/* ==========================================================================
   Center Alignment Mode (.bsr-align-center)
   ========================================================================== */
.bsr-align-center .bsr-card {
    text-align: center;
}

.bsr-align-center .bsr-card-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    margin-bottom: 8px;
}

.bsr-align-center .bsr-avatar-wrapper {
    margin: 0 auto;
}

.bsr-align-center .bsr-client-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bsr-align-center .bsr-client-meta-row {
    justify-content: center;
}

.bsr-align-center .bsr-rating-row {
    justify-content: center;
    margin-bottom: 8px;
}

.bsr-align-center .bsr-read-more-btn {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.bsr-align-center .bsr-suggestion-box {
    border-left: none;
    border-top: 3px solid #64748b;
    border-radius: var(--bsr-radius-sm);
    text-align: center;
}

.bsr-align-center .bsr-suggestion-label {
    justify-content: center;
}

.bsr-align-center .bsr-card-footer {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 4px;
    padding-top: 8px;
}

.bsr-align-center .bsr-review-date {
    margin-left: 0;
}

/* ==========================================================================
   Layouts: Fluid Auto-Fit Grid, Carousel, Masonry, List
   ========================================================================== */

/* 1. Fluid Auto-Fit Responsive Grid (Centralized) */
.bsr-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--bsr-card-width, 320px)), 1fr));
    gap: 24px;
    justify-content: center;
    align-content: center;
    width: 100%;
}

/* Fixed Columns Mode (when columns="1" to "10" is explicitly provided) */
.bsr-grid-container.bsr-fixed-cols {
    grid-template-columns: repeat(var(--bsr-cols, 3), minmax(0, 1fr));
}

@media (max-width: 1440px) {
    .bsr-grid-container.bsr-fixed-cols[style*="--bsr-cols: 10"],
    .bsr-grid-container.bsr-fixed-cols[style*="--bsr-cols: 9"],
    .bsr-grid-container.bsr-fixed-cols[style*="--bsr-cols: 8"],
    .bsr-grid-container.bsr-fixed-cols[style*="--bsr-cols: 7"] {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 1200px) {
    .bsr-grid-container.bsr-fixed-cols[style*="--bsr-cols: 10"],
    .bsr-grid-container.bsr-fixed-cols[style*="--bsr-cols: 9"],
    .bsr-grid-container.bsr-fixed-cols[style*="--bsr-cols: 8"],
    .bsr-grid-container.bsr-fixed-cols[style*="--bsr-cols: 7"],
    .bsr-grid-container.bsr-fixed-cols[style*="--bsr-cols: 6"],
    .bsr-grid-container.bsr-fixed-cols[style*="--bsr-cols: 5"] {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .bsr-grid-container.bsr-fixed-cols {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* 2. Carousel / Slider Layout */
.bsr-carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0 4px;
}

.bsr-carousel-track-wrapper {
    overflow: hidden;
    width: 100%;
    padding: 12px 6px;
}

.bsr-carousel-track {
    display: flex;
    transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
    gap: 24px;
    align-items: stretch;
}

.bsr-carousel-slide {
    flex: 0 0 calc((100% - (var(--bsr-cols, 3) - 1) * 24px) / var(--bsr-cols, 3));
    min-width: 0;
    max-width: 100%;
}

.bsr-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--bsr-transition);
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-focus-ring-color: transparent !important;
    user-select: none;
    padding: 0;
}

.bsr-carousel-nav svg {
    width: 20px;
    height: 20px;
    stroke: #0f172a !important;
    stroke-width: 2.5 !important;
    fill: none !important;
    display: block;
    margin: auto;
    pointer-events: none;
}

.bsr-carousel-nav:hover,
.bsr-carousel-nav:active {
    background: var(--bsr-primary-blue);
    border-color: var(--bsr-primary-blue);
    color: #ffffff;
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

.bsr-carousel-nav:focus,
.bsr-carousel-nav:focus-visible {
    outline: none !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
}

.bsr-carousel-nav:hover svg,
.bsr-carousel-nav:active svg {
    stroke: #ffffff !important;
}

.bsr-carousel-nav.bsr-prev {
    left: -14px;
}

.bsr-carousel-nav.bsr-next {
    right: -14px;
}

.bsr-carousel-controls-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 20px;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

.bsr-carousel-controls-wrapper,
.bsr-carousel-controls-wrapper *,
.bsr-carousel-dot,
.bsr-carousel-dot *,
.bsr-mobile-nav-btn,
.bsr-mobile-nav-btn *,
.bsr-carousel-nav,
.bsr-carousel-nav * {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
    outline: none !important;
    outline-style: none !important;
    outline-width: 0 !important;
    outline-color: transparent !important;
    -webkit-focus-ring-color: transparent !important;
}

.bsr-carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    user-select: none !important;
    -webkit-user-select: none !important;
}

.bsr-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 5px;
    background: #cbd5e1;
    border: none !important;
    cursor: pointer;
    transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.25s ease, border-radius 0.25s ease !important;
    padding: 0;
    margin: 0;
    outline: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-focus-ring-color: transparent !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    touch-action: manipulation !important;
}

.bsr-carousel-dot:focus,
.bsr-carousel-dot:focus-visible,
.bsr-carousel-dot:active {
    outline: none !important;
    outline-color: transparent !important;
    box-shadow: none !important;
}

.bsr-carousel-dot.active {
    background: var(--bsr-primary-blue, #2563eb) !important;
    width: 26px;
    border-radius: 5px;
}

.bsr-mobile-nav-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50% !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    cursor: pointer;
    padding: 0;
    margin: 0;
    overflow: hidden !important;
    outline: none !important;
    outline-style: none !important;
    outline-width: 0 !important;
    outline-color: transparent !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
    -webkit-focus-ring-color: transparent !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    touch-action: manipulation !important;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease !important;
    flex-shrink: 0;
    line-height: 1;
}

.bsr-mobile-nav-btn:hover {
    background: var(--bsr-primary-blue, #2563eb) !important;
    border-color: var(--bsr-primary-blue, #2563eb) !important;
    color: #ffffff !important;
}

.bsr-mobile-nav-btn:active {
    background: var(--bsr-primary-blue, #2563eb) !important;
    border-color: var(--bsr-primary-blue, #2563eb) !important;
    color: #ffffff !important;
    transform: scale(0.95);
}

.bsr-mobile-nav-btn:focus,
.bsr-mobile-nav-btn:focus-visible,
.bsr-mobile-nav-btn:focus-within {
    outline: none !important;
    outline-style: none !important;
    outline-width: 0 !important;
    outline-color: transparent !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.bsr-mobile-nav-btn svg {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    stroke: #0f172a !important;
    stroke-width: 2.5 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    fill: none !important;
    display: block !important;
    margin: auto !important;
    pointer-events: none !important;
}

.bsr-mobile-nav-btn:hover svg,
.bsr-mobile-nav-btn:active svg {
    stroke: #ffffff !important;
}

/* 3. Masonry Layout */
.bsr-masonry-grid {
    column-width: var(--bsr-card-width, 320px);
    column-gap: 24px;
}

.bsr-masonry-item {
    break-inside: avoid;
    margin-bottom: 24px;
}

@media (max-width: 1024px) {
    .bsr-masonry-grid { column-count: 2 !important; }
}

/* 4. List Layout */
.bsr-list-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 860px;
    margin: 0 auto;
}

/* ==========================================================================
   Mobile Auto-Center & Responsiveness (<640px)
   ========================================================================== */
@media (max-width: 640px) {
    .bsr-grid-container,
    .bsr-grid-container.bsr-fixed-cols {
        grid-template-columns: 1fr !important;
    }

    .bsr-masonry-grid {
        column-count: 1 !important;
    }

    /* Carousel 100% Dead Center on Mobile */
    .bsr-carousel-container {
        padding: 0;
        width: 100%;
        overflow: hidden;
    }

    .bsr-carousel-track-wrapper {
        padding: 10px 0;
        width: 100%;
        overflow: hidden;
    }

    .bsr-carousel-track {
        gap: 0 !important;
        width: 100%;
    }

    .bsr-carousel-slide {
        flex: 0 0 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        padding: 0 10px;
        box-sizing: border-box;
        display: flex !important;
        justify-content: center;
    }

    .bsr-carousel-slide .bsr-card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto;
    }

    /* Hide side floating arrows that overlap text on mobile */
    .bsr-carousel-nav {
        display: none !important;
    }

    /* Bottom mobile controls */
    .bsr-mobile-nav-btn {
        display: inline-flex !important;
    }

    /* Auto center content on mobile */
    .bsr-card {
        text-align: center;
        padding: 16px 14px 12px;
    }

    .bsr-card-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 6px;
        margin-bottom: 6px;
    }

    .bsr-avatar-wrapper {
        margin: 0 auto;
    }

    .bsr-client-info {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .bsr-client-meta-row {
        justify-content: center;
    }

    .bsr-rating-row {
        justify-content: center;
        margin-bottom: 6px;
    }

    .bsr-review-body {
        margin-bottom: 8px;
    }

    .bsr-read-more-btn {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .bsr-card-footer {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 4px;
        padding-top: 8px;
    }

    .bsr-review-date {
        margin-left: 0;
    }

    .bsr-suggestion-box {
        border-left: none;
        border-top: 3px solid #64748b;
        border-radius: var(--bsr-radius-sm);
        text-align: center;
    }

    .bsr-suggestion-label {
        justify-content: center;
    }
}

/* ==========================================================================
   Full Review Modal Reader (.bsr-modal-backdrop)
   ========================================================================== */
.bsr-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: var(--bsr-transition);
}

.bsr-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.bsr-modal-card {
    background: #ffffff;
    border-radius: var(--bsr-radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 28px;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bsr-modal-backdrop.active .bsr-modal-card {
    transform: scale(1);
}

.bsr-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--bsr-transition);
}
.bsr-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.bsr-modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.bsr-modal-body {
    font-size: 15px;
    line-height: 1.7;
    color: #1e293b;
    margin-bottom: 20px;
    white-space: pre-line;
}

.bsr-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    font-size: 12px;
    color: #64748b;
}

/* ==========================================================================
   Themes
   ========================================================================== */

/* Theme: Midnight Dark */
.bsr-theme-midnight-dark .bsr-card {
    background: #0f172a;
    border-color: #1e293b;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.bsr-theme-midnight-dark .bsr-card:hover {
    border-color: #334155;
    box-shadow: 0 16px 36px rgba(0,0,0,0.5);
}
.bsr-theme-midnight-dark .bsr-section-title { color: #f8fafc; }
.bsr-theme-midnight-dark .bsr-section-subtitle { color: #94a3b8; }
.bsr-theme-midnight-dark .bsr-footer-title { color: #f8fafc; }
.bsr-theme-midnight-dark .bsr-footer-subtitle { color: #94a3b8; }
.bsr-theme-midnight-dark .bsr-client-name { color: #f8fafc; }
.bsr-theme-midnight-dark .bsr-review-text { color: #cbd5e1; }
.bsr-theme-midnight-dark .bsr-category-badge { background: #1e293b; color: #38bdf8; }
.bsr-theme-midnight-dark .bsr-score-number { color: #f8fafc; }
.bsr-theme-midnight-dark .bsr-suggestion-box { background: #1e293b; border-color: #38bdf8; }
.bsr-theme-midnight-dark .bsr-suggestion-label { color: #38bdf8; }
.bsr-theme-midnight-dark .bsr-suggestion-text { color: #94a3b8; }
.bsr-theme-midnight-dark .bsr-card-footer { border-color: #1e293b; color: #94a3b8; }
.bsr-theme-midnight-dark .bsr-staff-credit strong { color: #f8fafc; }
.bsr-theme-midnight-dark .bsr-carousel-nav { background: #1e293b; border-color: #334155; color: #f8fafc; }
.bsr-theme-midnight-dark .bsr-carousel-nav svg { stroke: #f8fafc !important; }
.bsr-theme-midnight-dark .bsr-mobile-nav-btn { background: #1e293b !important; border-color: #334155 !important; color: #f8fafc !important; }
.bsr-theme-midnight-dark .bsr-mobile-nav-btn svg { stroke: #f8fafc !important; }
.bsr-theme-midnight-dark .bsr-mobile-nav-btn:hover { background: var(--bsr-primary-blue) !important; border-color: var(--bsr-primary-blue) !important; }

/* Theme: Glassmorphism */
.bsr-theme-glassmorphism .bsr-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.08);
}
.bsr-theme-glassmorphism .bsr-card:hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.14);
}

/* Theme: Brand Blue */
.bsr-theme-brand-blue .bsr-card {
    background: linear-gradient(145deg, #1e3a8a, #1d4ed8);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 30px rgba(30, 58, 138, 0.25);
}
.bsr-theme-brand-blue .bsr-client-name { color: #ffffff; }
.bsr-theme-brand-blue .bsr-review-text { color: #e0e7ff; }
.bsr-theme-brand-blue .bsr-category-badge { background: rgba(255, 255, 255, 0.2); color: #ffffff; }
.bsr-theme-brand-blue .bsr-score-number { color: #ffffff; }
.bsr-theme-brand-blue .bsr-suggestion-box { background: rgba(255, 255, 255, 0.1); border-color: #fbbf24; }
.bsr-theme-brand-blue .bsr-suggestion-label { color: #fbbf24; }
.bsr-theme-brand-blue .bsr-suggestion-text { color: #ede9fe; }
.bsr-theme-brand-blue .bsr-card-footer { border-color: rgba(255, 255, 255, 0.15); color: #c7d2fe; }
.bsr-theme-brand-blue .bsr-staff-credit strong { color: #ffffff; }

/* Theme: Emerald Trust */
.bsr-theme-emerald-trust .bsr-card {
    border-top: 4px solid #059669;
}
.bsr-theme-emerald-trust .bsr-category-badge {
    background: #ecfdf5;
    color: #059669;
}

/* Theme: Purple Luxe */
.bsr-theme-purple-luxe .bsr-card {
    border-top: 4px solid #7c3aed;
}
.bsr-theme-purple-luxe .bsr-category-badge {
    background: #f5f3ff;
    color: #7c3aed;
}

/* ==========================================================================
   Rating Badges
   ========================================================================== */
.bsr-badge-wrapper {
    font-family: var(--bsr-font);
    display: inline-block;
    vertical-align: middle;
}

/* Pill Badge */
.bsr-badge-pill-inner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 6px 16px;
    border-radius: var(--bsr-radius-full);
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.bsr-badge-pill-icon {
    color: var(--bsr-star-filled);
    font-size: 15px;
}
.bsr-badge-pill-score {
    font-weight: 700;
    color: #0f172a;
}
.bsr-badge-pill-divider {
    color: #cbd5e1;
}
.bsr-badge-pill-count {
    color: #64748b;
    font-weight: 500;
}

/* Card Badge */
.bsr-badge-card-inner {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 12px 18px;
    border-radius: var(--bsr-radius-md);
    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}
.bsr-badge-card-top {
    display: flex;
    align-items: center;
    gap: 6px;
}
.bsr-badge-card-score {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
}
.bsr-badge-card-stars {
    color: var(--bsr-star-filled);
    letter-spacing: 1px;
}
.bsr-badge-card-label {
    display: block;
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

/* Compact Badge */
.bsr-badge-type-compact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}
.bsr-badge-compact-stars {
    color: var(--bsr-star-filled);
}
.bsr-badge-compact-score {
    font-weight: 700;
    color: #0f172a;
}
.bsr-badge-compact-count {
    color: #64748b;
}

/* ==========================================================================
   Summary Breakdown Bar
   ========================================================================== */
.bsr-summary-container {
    font-family: var(--bsr-font);
    background: #ffffff;
    border-radius: var(--bsr-radius-md);
    border: 1px solid #e2e8f0;
    padding: 28px;
    display: flex;
    gap: 36px;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    margin: 28px 0;
}

@media (max-width: 768px) {
    .bsr-summary-container {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
}

.bsr-summary-left {
    text-align: center;
    min-width: 180px;
    padding-right: 20px;
    border-right: 1px solid #f1f5f9;
}

@media (max-width: 768px) {
    .bsr-summary-left {
        border-right: none;
        border-bottom: 1px solid #f1f5f9;
        padding-right: 0;
        padding-bottom: 18px;
    }
}

.bsr-summary-big-score {
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
    color: #0f172a;
    margin-bottom: 6px;
}

.bsr-summary-stars {
    color: var(--bsr-star-filled);
    font-size: 20px;
    letter-spacing: 2px;
    margin-bottom: 6px;
}

.bsr-summary-count {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 10px;
}

.bsr-summary-satisfaction {
    font-size: 12px;
    color: var(--bsr-verified-green);
    font-weight: 600;
    background: #ecfdf5;
    padding: 4px 10px;
    border-radius: var(--bsr-radius-full);
    display: inline-block;
}

.bsr-sat-pct {
    font-weight: 800;
}

.bsr-summary-bars {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bsr-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #475569;
}

.bsr-bar-label {
    min-width: 50px;
    font-weight: 500;
}

.bsr-bar-track {
    flex-grow: 1;
    height: 10px;
    background: #f1f5f9;
    border-radius: var(--bsr-radius-full);
    overflow: hidden;
}

.bsr-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    border-radius: var(--bsr-radius-full);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.bsr-bar-pct {
    min-width: 38px;
    text-align: right;
    font-weight: 700;
    color: #0f172a;
    font-size: 12px;
}

/* ==========================================================================
   Floating Trust Badge & Drawer Modal
   ========================================================================== */
.bsr-floating-badge {
    position: fixed;
    z-index: 99998;
    bottom: 24px;
    cursor: pointer;
    font-family: var(--bsr-font);
}

.bsr-floating-badge.bsr-float-bottom-right { right: 24px; }
.bsr-floating-badge.bsr-float-bottom-left  { left: 24px; }

.bsr-floating-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #0f172a;
    color: #ffffff;
    padding: 10px 18px;
    border-radius: var(--bsr-radius-full);
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.1);
    transition: var(--bsr-transition);
}

.bsr-floating-pill:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 14px 30px rgba(0,0,0,0.35);
}

.bsr-floating-star {
    font-size: 20px;
    color: var(--bsr-star-filled);
}

.bsr-floating-text strong {
    display: block;
    font-size: 14px;
    line-height: 1.1;
}

.bsr-floating-text span {
    font-size: 11px;
    color: #94a3b8;
}

/* Drawer Modal Overlay */
.bsr-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: var(--bsr-transition);
}

.bsr-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.bsr-drawer-modal {
    position: fixed;
    top: 0;
    right: -480px;
    width: 100%;
    max-width: 460px;
    height: 100vh;
    background: #ffffff;
    z-index: 100000;
    box-shadow: -10px 0 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.bsr-drawer-modal.active {
    right: 0;
}

.bsr-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
}

.bsr-drawer-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
}

.bsr-drawer-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    padding: 0;
}

.bsr-drawer-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px 24px;
}
