/**
 * CBP Customer Reviews Slider
 */

.cbp-reviews-wrapper {
    --cbp-avatar-bg: #0d9488;
    --cbp-star-color: #f59e0b;
    --cbp-card-bg: #ffffff;
    --cbp-text-color: #1f2937;
    --cbp-text-muted: #6b7280;
    --cbp-border-color: #e5e7eb;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
    padding: 20px 0;
}

.cbp-reviews-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--cbp-text-color);
    margin-bottom: 24px;
}

.cbp-reviews-slider {
    position: relative;
    overflow: hidden;
}

.cbp-reviews-track {
    display: flex;
    gap: 20px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: grab;
    user-select: none;
}

.cbp-reviews-track:active {
    cursor: grabbing;
}

.cbp-review-card {
    flex: 0 0 calc(20% - 16px);
    min-width: 220px;
    background: var(--cbp-card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--cbp-border-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cbp-review-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cbp-review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--cbp-avatar-bg);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.cbp-review-avatar-img {
    object-fit: cover;
}

.cbp-review-name {
    font-weight: 600;
    color: var(--cbp-text-color);
    font-size: 15px;
}

.cbp-review-text {
    color: var(--cbp-text-muted);
    font-size: 14px;
    line-height: 1.6;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cbp-review-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
}

.cbp-review-stars {
    color: var(--cbp-star-color);
    font-size: 14px;
    letter-spacing: 2px;
}

.cbp-review-date {
    color: var(--cbp-text-muted);
    font-size: 13px;
}

/* Navigation Arrow */
.cbp-reviews-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--cbp-avatar-bg);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cbp-reviews-arrow:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.cbp-reviews-arrow-next {
    right: 0;
}

.cbp-reviews-arrow-prev {
    left: 0;
}

/* Responsive */
@media (max-width: 1200px) {
    .cbp-review-card {
        flex: 0 0 calc(25% - 15px);
    }
}

@media (max-width: 992px) {
    .cbp-review-card {
        flex: 0 0 calc(33.333% - 14px);
    }
}

@media (max-width: 768px) {
    .cbp-review-card {
        flex: 0 0 100%;
        min-width: 100%;
        max-width: 100%;
        padding: 20px;
    }

    .cbp-reviews-arrow {
        width: 40px;
        height: 40px;
    }

    .cbp-review-text {
        -webkit-line-clamp: 5;
        font-size: 14px;
    }

    .cbp-reviews-track {
        gap: 16px;
    }
}

/* ============================================
   Review Detail Popup Modal
   ============================================ */
.cbp-review-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cbp-review-detail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.cbp-review-detail-content {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 24px;
    padding: 32px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    animation: cbp-modal-slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cbp-modal-slide-up {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.cbp-review-detail-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s ease;
}

.cbp-review-detail-close:hover {
    background: #e5e7eb;
    color: #1f2937;
    transform: rotate(90deg);
}

.cbp-review-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.cbp-review-detail-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 24px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.cbp-review-detail-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.cbp-review-detail-info {
    flex-grow: 1;
}

.cbp-review-detail-name {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 4px 0;
}

.cbp-review-detail-designation {
    font-size: 14px;
    color: #6b7280;
}

.cbp-review-detail-rating {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 12px;
}

.cbp-review-detail-stars {
    font-size: 24px;
    color: #f59e0b;
    letter-spacing: 2px;
}

.cbp-review-detail-rating-text {
    font-size: 16px;
    font-weight: 600;
    color: #92400e;
}

.cbp-review-detail-service {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

.cbp-review-detail-service:empty {
    display: none;
}

.cbp-review-detail-service::before {
    content: "🧹";
}

.cbp-review-detail-text {
    font-size: 16px;
    line-height: 1.8;
    color: #374151;
    padding: 20px;
    background: #f9fafb;
    border-radius: 16px;
    border-left: 4px solid #059669;
    margin-bottom: 20px;
    position: relative;
}

.cbp-review-detail-text::before {
    content: """;
    position: absolute;
    top: 10px;
    left: 16px;
    font-size: 40px;
    color: #d1d5db;
    font-family: Georgia, serif;
    line-height: 1;
}

.cbp-review-detail-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.cbp-review-detail-date {
    font-size: 14px;
    color: #6b7280;
}

.cbp-review-verified {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #059669;
    padding: 6px 12px;
    background: #dcfce7;
    border-radius: 20px;
}

.cbp-review-verified svg {
    width: 14px;
    height: 14px;
}

/* Mobile Responsive */
@media (max-width: 576px) {
    .cbp-review-detail-content {
        padding: 24px;
        border-radius: 20px;
    }

    .cbp-review-detail-avatar {
        width: 56px;
        height: 56px;
        font-size: 20px;
    }

    .cbp-review-detail-name {
        font-size: 18px;
    }

    .cbp-review-detail-stars {
        font-size: 20px;
    }

    .cbp-review-detail-text {
        font-size: 15px;
        padding: 16px;
    }

    .cbp-review-detail-footer {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

