/* TPS Customer Reviews - Frontend Styles v2.1.0 */

/* =============================================
   COLOR TOKENS (used throughout)
   Brand blue: #3498db | Brand blue dark: #2980b9
   Trust green: #00b67a | Trust green dark: #009f6a
   ============================================= */

/* =============================================
   CONTAINERS
   ============================================= */
.tps-reviews-container,
.tps-reviews-page,
.tps-strip-container {
    max-width: 1200px;
    margin: 48px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1a1a1a;
    box-sizing: border-box;
}

.tps-strip-container {
    max-width: 1400px;
    margin: 32px auto;
}

.tps-reviews-container *,
.tps-reviews-page *,
.tps-strip-container * {
    box-sizing: border-box;
}

/* =============================================
   HEADER (product/home grid)
   ============================================= */
.tps-reviews-container .tps-reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 32px;
    padding: 24px 28px;
    background: #fafbfc;
    border: 1px solid #ececec;
    border-radius: 14px;
}

.tps-reviews-container .tps-reviews-header-rating {
    display: flex;
    align-items: center;
    gap: 18px;
}

.tps-reviews-container .tps-rating-big {
    font-size: 52px;
    font-weight: 800;
    color: #00b67a;
    line-height: 1;
    letter-spacing: -1.5px;
}

.tps-reviews-container .tps-rating-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tps-reviews-container .tps-header-stars {
    display: inline-flex;
    gap: 3px;
}

.tps-reviews-container .tps-header-stars .tps-review-star {
    color: #00b67a;
    font-size: 22px;
    line-height: 1;
}

.tps-reviews-container .tps-rating-meta-text {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tps-reviews-container .tps-rating-label {
    background: #00b67a;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.tps-reviews-container .tps-rating-count {
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

.tps-reviews-container .tps-reviews-header-badge {
    display: flex;
    align-items: center;
}

.tps-reviews-container .tps-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    border: 1px solid #e0e6e3;
    white-space: nowrap;
}

/* =============================================
   GRID
   ============================================= */
.tps-reviews-container .tps-reviews-grid,
.tps-reviews-page .tps-reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

/* =============================================
   REVIEW CARD (used by grid + page)
   Scoped to both containers, NOT strip
   ============================================= */
.tps-reviews-container .tps-review-card,
.tps-reviews-page .tps-review-card {
    position: relative;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
    min-height: 220px;
    overflow: hidden;
}

.tps-reviews-container .tps-review-card:hover,
.tps-reviews-page .tps-review-card:hover {
    border-color: #c6d8ec;
    box-shadow: 0 8px 24px rgba(52, 152, 219, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
    transform: translateY(-3px);
}

.tps-reviews-container .tps-review-quote,
.tps-reviews-page .tps-review-quote {
    position: absolute;
    top: 14px;
    right: 14px;
    color: #00b67a;
    opacity: 0.07;
    pointer-events: none;
    line-height: 0;
}

.tps-reviews-container .tps-review-card-header,
.tps-reviews-page .tps-review-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

.tps-reviews-container .tps-reviewer-info,
.tps-reviews-page .tps-reviewer-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.tps-reviews-container .tps-reviewer-avatar,
.tps-reviews-page .tps-reviewer-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.tps-reviews-container .tps-reviewer-details,
.tps-reviews-page .tps-reviewer-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.tps-reviews-container .tps-reviewer-name,
.tps-reviews-page .tps-reviewer-name {
    font-weight: 700;
    font-size: 14px;
    color: #1a1a1a;
    text-transform: capitalize;
    line-height: 1.3;
}

.tps-reviews-container .tps-reviewer-location,
.tps-reviews-page .tps-reviewer-location {
    font-size: 12px;
    color: #888;
    line-height: 1.3;
}

.tps-reviews-container .tps-review-badges,
.tps-reviews-page .tps-review-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    flex-shrink: 0;
}

.tps-reviews-container .tps-return-badge,
.tps-reviews-page .tps-return-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #eaf2fc;
    color: #2d6cdf;
    padding: 3px 9px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.tps-reviews-container .tps-verified-badge-card,
.tps-reviews-page .tps-verified-badge-card {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e6f7ef;
    color: #00875a;
    padding: 3px 9px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.tps-reviews-container .tps-review-card-rating,
.tps-reviews-page .tps-review-card-rating {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.tps-reviews-container .tps-stars-row,
.tps-reviews-page .tps-stars-row {
    display: inline-flex;
    gap: 1px;
}

.tps-reviews-container .tps-review-star,
.tps-reviews-page .tps-review-star {
    color: #d4d4d4;
    font-size: 16px;
    line-height: 1;
}

.tps-reviews-container .tps-review-star.filled,
.tps-reviews-page .tps-review-star.filled {
    color: #00b67a;
}

.tps-reviews-container .tps-review-time,
.tps-reviews-page .tps-review-time {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    font-weight: 500;
}

.tps-reviews-container .tps-review-card-title,
.tps-reviews-page .tps-review-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    line-height: 1.35;
    position: relative;
    z-index: 1;
}

.tps-reviews-container .tps-review-card-text,
.tps-reviews-page .tps-review-card-text {
    font-size: 14px;
    color: #4a4a4a;
    line-height: 1.55;
    margin: 0;
    flex-grow: 1;
    position: relative;
    z-index: 1;
}

/* =============================================
   FOOTER (3 buttons) - HIGH SPECIFICITY
   Blue primary/secondary, Trust green tertiary
   ============================================= */
.tps-reviews-container .tps-reviews-footer {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.tps-reviews-container button.tps-load-more-btn,
.tps-reviews-container a.tps-see-all-btn,
.tps-reviews-container a.tps-trustpilot-btn,
.tps-reviews-container .tps-load-more-btn,
.tps-reviews-container .tps-see-all-btn,
.tps-reviews-container .tps-trustpilot-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 13px 26px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    line-height: 1 !important;
    min-height: 46px !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    letter-spacing: 0.2px !important;
    white-space: nowrap !important;
}

/* See more (PRIMARY - filled blue) */
.tps-reviews-container button.tps-load-more-btn,
.tps-reviews-container .tps-load-more-btn {
    background: #3498db !important;
    color: #fff !important;
    border: 2px solid #3498db !important;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.25) !important;
}

.tps-reviews-container button.tps-load-more-btn:hover,
.tps-reviews-container .tps-load-more-btn:hover {
    background: #2980b9 !important;
    border-color: #2980b9 !important;
    color: #fff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.35) !important;
}

.tps-reviews-container button.tps-load-more-btn:disabled,
.tps-reviews-container .tps-load-more-btn:disabled {
    opacity: 0.7 !important;
    cursor: wait !important;
    transform: none !important;
}

/* See all reviews (SECONDARY - outlined blue) */
.tps-reviews-container a.tps-see-all-btn,
.tps-reviews-container .tps-see-all-btn {
    background: #fff !important;
    color: #3498db !important;
    border: 2px solid #3498db !important;
}

.tps-reviews-container a.tps-see-all-btn:hover,
.tps-reviews-container a.tps-see-all-btn:focus,
.tps-reviews-container .tps-see-all-btn:hover,
.tps-reviews-container .tps-see-all-btn:focus {
    background: #3498db !important;
    color: #fff !important;
    text-decoration: none !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2) !important;
}

/* View Trustpilot (TERTIARY - filled trustpilot green) */
.tps-reviews-container a.tps-trustpilot-btn,
.tps-reviews-container .tps-trustpilot-btn {
    background: #00b67a !important;
    color: #fff !important;
    border: 2px solid #00b67a !important;
    box-shadow: 0 2px 8px rgba(0, 182, 122, 0.25) !important;
}

.tps-reviews-container a.tps-trustpilot-btn:hover,
.tps-reviews-container a.tps-trustpilot-btn:focus,
.tps-reviews-container .tps-trustpilot-btn:hover,
.tps-reviews-container .tps-trustpilot-btn:focus {
    background: #009f6a !important;
    border-color: #009f6a !important;
    color: #fff !important;
    text-decoration: none !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 182, 122, 0.35) !important;
}

.tps-reviews-container .tps-reviews-disclaimer {
    text-align: center;
    font-size: 12px;
    color: #999;
    margin: 0;
    font-weight: 500;
}

/* =============================================
   FULL REVIEWS PAGE  ([tps_reviews_page])
   ============================================= */
.tps-reviews-page .tps-reviews-page-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 28px;
    border-bottom: 1px solid #ececec;
}

.tps-reviews-page .tps-page-title {
    font-size: 34px;
    font-weight: 800;
    margin: 0 0 16px 0;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

.tps-reviews-page .tps-page-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.tps-reviews-page .tps-page-rating {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.tps-reviews-page .tps-page-stars {
    color: #00b67a;
    font-size: 24px;
    letter-spacing: 2px;
}

.tps-reviews-page .tps-page-score {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.tps-reviews-page .tps-page-count {
    font-size: 14px;
    color: #777;
    font-weight: 500;
}

.tps-reviews-page .tps-sort-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.tps-reviews-page .tps-sort-bar label {
    font-size: 14px;
    color: #555;
    font-weight: 600;
}

.tps-reviews-page .tps-sort-select {
    padding: 8px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
}

.tps-reviews-page .tps-sort-select:focus {
    outline: none;
    border-color: #3498db;
}

.tps-reviews-page .tps-reviews-footer {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.tps-reviews-page button.tps-load-more-btn,
.tps-reviews-page .tps-load-more-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 13px 32px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    min-height: 46px !important;
    background: #3498db !important;
    color: #fff !important;
    border: 2px solid #3498db !important;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.25) !important;
    font-family: inherit !important;
    letter-spacing: 0.2px !important;
}

.tps-reviews-page button.tps-load-more-btn:hover,
.tps-reviews-page .tps-load-more-btn:hover {
    background: #2980b9 !important;
    border-color: #2980b9 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.35) !important;
}

.tps-reviews-page .tps-reviews-disclaimer {
    text-align: center;
    font-size: 12px;
    color: #999;
    margin: 0;
    font-weight: 500;
}

/* =============================================
   STRIP SHORTCODE  ([tps_reviews_strip])
   This uses ITS OWN class names: .tps-strip-card,
   .tps-strip-card-avatar, .tps-strip-card-author,
   etc. Must style them all explicitly.
   ============================================= */
.tps-strip-container .tps-strip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 12px;
}

.tps-strip-container .tps-strip-title {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}

.tps-strip-container .tps-strip-stars {
    color: #00b67a;
    font-size: 18px;
    letter-spacing: 2px;
}

.tps-strip-container .tps-strip-text {
    color: #1a1a1a;
}

.tps-strip-container .tps-strip-disclaimer {
    font-size: 13px;
    color: #888;
    font-weight: 500;
}

.tps-strip-container .tps-strip-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 4px 14px 4px;
    scrollbar-width: thin;
    scrollbar-color: #00b67a #f0f0f0;
    -webkit-overflow-scrolling: touch;
}

.tps-strip-container .tps-strip-scroll::-webkit-scrollbar {
    height: 6px;
}

.tps-strip-container .tps-strip-scroll::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
}

.tps-strip-container .tps-strip-scroll::-webkit-scrollbar-thumb {
    background: #00b67a;
    border-radius: 3px;
}

.tps-strip-container .tps-strip-card {
    flex: 0 0 320px;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 18px;
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
    display: flex;
    flex-direction: column;
}

.tps-strip-container .tps-strip-card:hover {
    border-color: #c6d8ec;
    box-shadow: 0 6px 18px rgba(52, 152, 219, 0.08);
    transform: translateY(-2px);
}

.tps-strip-container .tps-strip-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.tps-strip-container .tps-strip-card-author {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.tps-strip-container .tps-strip-card-avatar {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    flex-shrink: 0 !important;
    text-transform: uppercase !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

.tps-strip-container .tps-strip-card-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.tps-strip-container .tps-strip-card-name {
    font-weight: 700;
    font-size: 14px;
    color: #1a1a1a;
    text-transform: capitalize;
    line-height: 1.3;
}

.tps-strip-container .tps-strip-return-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #eaf2fc;
    color: #2d6cdf;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    width: fit-content;
}

.tps-strip-container .tps-strip-card-stars {
    color: #00b67a;
    font-size: 14px;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.tps-strip-container .tps-strip-card-text {
    font-size: 13px;
    color: #4a4a4a;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =============================================
   RESPONSIVE  TABLET
   ============================================= */
@media (max-width: 992px) {
    .tps-reviews-container .tps-reviews-grid,
    .tps-reviews-page .tps-reviews-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =============================================
   RESPONSIVE  MOBILE
   ============================================= */
@media (max-width: 640px) {
    .tps-reviews-container,
    .tps-reviews-page,
    .tps-strip-container {
        margin: 24px auto;
        padding: 0 14px;
    }

    .tps-reviews-container .tps-reviews-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 20px;
        margin-bottom: 22px;
    }

    .tps-reviews-container .tps-reviews-header-rating {
        gap: 14px;
        width: 100%;
    }

    .tps-reviews-container .tps-rating-big {
        font-size: 44px;
    }

    .tps-reviews-container .tps-header-stars .tps-review-star {
        font-size: 18px;
    }

    .tps-reviews-container .tps-rating-meta-text {
        gap: 8px;
    }

    .tps-reviews-container .tps-rating-label {
        padding: 3px 10px;
        font-size: 11px;
    }

    .tps-reviews-container .tps-rating-count {
        font-size: 13px;
    }

    .tps-reviews-container .tps-header-badge {
        padding: 8px 14px;
        font-size: 12px;
    }

    .tps-reviews-container .tps-reviews-grid,
    .tps-reviews-page .tps-reviews-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-bottom: 22px;
    }

    .tps-reviews-container .tps-review-card,
    .tps-reviews-page .tps-review-card {
        padding: 18px;
        min-height: 0;
    }

    .tps-reviews-container .tps-reviewer-avatar,
    .tps-reviews-page .tps-reviewer-avatar {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }

    .tps-reviews-container .tps-reviewer-name,
    .tps-reviews-page .tps-reviewer-name {
        font-size: 14px;
    }

    .tps-reviews-container .tps-review-card-title,
    .tps-reviews-page .tps-review-card-title {
        font-size: 14px;
    }

    .tps-reviews-container .tps-review-card-text,
    .tps-reviews-page .tps-review-card-text {
        font-size: 13px;
    }

    .tps-reviews-container .tps-reviews-footer {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .tps-reviews-container button.tps-load-more-btn,
    .tps-reviews-container a.tps-see-all-btn,
    .tps-reviews-container a.tps-trustpilot-btn,
    .tps-reviews-container .tps-load-more-btn,
    .tps-reviews-container .tps-see-all-btn,
    .tps-reviews-container .tps-trustpilot-btn {
        width: 100% !important;
    }

    /* Reviews page mobile */
    .tps-reviews-page .tps-page-title {
        font-size: 26px;
    }

    .tps-reviews-page .tps-sort-bar {
        justify-content: center;
    }

    /* Strip mobile */
    .tps-strip-container .tps-strip-card {
        flex: 0 0 280px;
    }
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes tpsFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.tps-reviews-container .tps-review-card,
.tps-reviews-page .tps-review-card {
    animation: tpsFadeIn 0.4s ease both;
}
