/* ==========================================================================
   My Spectacles – [reviews_slider] (inc/reviews-slider.php)
   Loaded only on pages that show the shortcode.
   ========================================================================== */

.msp-reviews-section {
    background: #ffffff;
    padding: 38px 0;
    overflow: hidden;
    box-sizing: border-box;
    font-family: inherit;
}

.msp-reviews-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 32px;
    box-sizing: border-box;
}

/* ── Left panel: Customer Review branding ── */
.msp-reviews-brand {
    flex: 0 0 160px;
    min-width: 150px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.msp-reviews-brand .msp-reviews-title {
    font-size: 20px;
    font-weight: 700;
    color: #191919;
    line-height: 1.2;
    letter-spacing: -0.3px;
    display: inline-block;
    text-decoration: none;
    margin: 0;
}

.msp-brand-stars {
    display: flex;
    gap: 3px;
}

.msp-brand-stars .msp-star-block {
    width: 27px;
    height: 27px;
    background: #00b67a;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1px;
}

.msp-brand-stars .msp-star-block svg {
    width: 16px;
    height: 16px;
    fill: #fff;
}

.msp-write-review-btn {
    display: inline-block;
    padding: 9px 18px;
    border: 1.5px solid #191919;
    color: #191919;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.2s ease;
    white-space: nowrap;
    border-radius: 2px;
    background: #ffffff;
    text-align: center;
    line-height: 1.2;
}

.msp-write-review-btn:hover {
    background: #191919;
    color: #ffffff;
}

/* ── Slider area with side chevrons ── */
.msp-reviews-slider-wrap {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

/* Side navigation chevrons */
.msp-reviews-nav-btn {
    background: transparent;
    border: none;
    padding: 6px 2px;
    cursor: pointer;
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
    z-index: 5;
    outline: none;
}

.msp-reviews-nav-btn:hover {
    color: #00b67a;
    transform: scale(1.15);
}

.msp-reviews-nav-btn svg {
    width: 28px;
    height: 28px;
}

/* Swiper track */
.msp-reviews-swiper {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    padding: 4px 2px;
}

.msp-reviews-swiper .swiper-wrapper {
    display: flex;
    align-items: stretch;
}

.msp-reviews-swiper .swiper-slide {
    height: auto;
    display: flex;
}

/* ── Review Card (Equal Height) ── */
.msp-review-card {
    background: #f7f9fa;
    border-radius: 4px;
    padding: 24px 24px;
    display: flex !important;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 185px;
    box-sizing: border-box;
    border: 1px solid #edf1f2;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.msp-review-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    border-color: #e2e8f0;
}

/* Star rating blocks */
.msp-card-stars {
    display: flex;
    gap: 2.5px;
    margin-bottom: 9px;
}

.msp-card-stars .msp-star-block {
    width: 22px;
    height: 22px;
    background: #00b67a;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1px;
}

.msp-card-stars .msp-star-block.empty {
    background: #dbe2e6;
}

.msp-card-stars .msp-star-block svg {
    width: 13px;
    height: 13px;
    fill: #fff;
}

/* Reviewer */
.msp-card-reviewer {
    font-size: 13.5px;
    color: #718096;
    margin: 0 0 10px;
    line-height: 1.3;
}

.msp-card-reviewer strong {
    color: #1a202c;
    font-weight: 600;
}

/* Title */
.msp-card-title {
    font-size: 15.5px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 8px;
    line-height: 1.35;
}

/* Body */
.msp-card-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.msp-review-preview {
    font-size: 14px;
    color: #4a5568;
    line-height: 1.55;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.msp-see-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 13px;
    color: #00b67a;
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    margin-top: auto;
    align-self: flex-start;
    transition: color 0.2s ease;
    line-height: 1.2;
}

.msp-see-more-btn:hover {
    color: #00875a;
    text-decoration: underline;
}

.msp-see-more-btn .msp-arrow {
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

/* ── Full Review Modal ── */
.msp-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    box-sizing: border-box;
}

.msp-modal-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

body.msp-modal-open {
    overflow: hidden;
}

.msp-modal-container {
    background: #ffffff;
    border-radius: 8px;
    max-width: 520px;
    width: 100%;
    padding: 32px 32px 26px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    transform: scale(0.96);
    transition: transform 0.2s ease;
    max-height: 85vh;
    overflow-y: auto;
    box-sizing: border-box;
}

.msp-modal-overlay.is-active .msp-modal-container {
    transform: scale(1);
}

.msp-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.2s ease, background 0.2s ease;
}

.msp-modal-close:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.msp-modal-stars {
    display: flex;
    gap: 3px;
    margin-bottom: 10px;
}

.msp-modal-reviewer {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 12px;
}

.msp-modal-reviewer strong {
    color: #0f172a;
    font-weight: 600;
}

.msp-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 12px;
    line-height: 1.35;
}

.msp-modal-body {
    font-size: 14.5px;
    color: #334155;
    line-height: 1.65;
    margin-bottom: 18px;
    white-space: pre-line;
}

.msp-modal-meta {
    font-size: 12px;
    color: #94a3b8;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ── Responsive rules ── */
@media (max-width: 900px) {
    .msp-reviews-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 24px;
    }

    .msp-reviews-brand {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        flex: auto;
    }
}

@media (max-width: 600px) {
    .msp-reviews-section {
        padding: 24px 0;
    }

    .msp-reviews-brand {
        justify-content: center;
        gap: 12px;
        text-align: center;
    }

    .msp-reviews-slider-wrap {
        gap: 2px;
    }

    .msp-reviews-nav-btn svg {
        width: 22px;
        height: 22px;
    }

    .msp-review-card {
        padding: 20px 18px;
    }

    .msp-modal-container {
        padding: 24px 20px 20px;
    }
}
