/* FluentCart Mpaddi-Style Reviews — v1.0.0
   Clean, mobile-first, inspired by Mpaddi Shop review UI */

/* ── Reset & Root ──────────────────────────────────────── */
.fcr-widget {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #1a1a1a;
    max-width: 680px;
    margin: 2rem 0;
}

/* ── Summary ────────────────────────────────────────────── */
.fcr-summary {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 20px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 14px;
    margin-bottom: 14px;
}

.fcr-summary__score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 88px;
}

.fcr-big-rating {
    font-size: 44px;
    font-weight: 700;
    line-height: 1;
    color: #1a1a1a;
    letter-spacing: -1px;
}

.fcr-stars { display: flex; gap: 2px; }
.fcr-star  { font-size: 16px; color: #ddd; }
.fcr-star--filled { color: #ff6600; }
.fcr-stars--lg .fcr-star { font-size: 18px; }

.fcr-total-count {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
    white-space: nowrap;
}

.fcr-summary__bars {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.fcr-bar-row {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    border-radius: 6px;
    padding: 2px 4px;
    transition: background 0.15s;
}
.fcr-bar-row:hover { background: #f5f5f5; }

.fcr-bar-label { font-size: 12px; font-weight: 600; min-width: 10px; }
.fcr-bar-star  { font-size: 12px; color: #ff6600; }
.fcr-bar-track {
    flex: 1;
    height: 6px;
    background: #ebebeb;
    border-radius: 999px;
    overflow: hidden;
}
.fcr-bar-fill {
    height: 100%;
    background: #ff6600;
    border-radius: 999px;
    transition: width 0.5s ease;
}
.fcr-bar-count { font-size: 11px; color: #888; min-width: 24px; text-align: right; }

/* ── Filter Chips ──────────────────────────────────────── */
.fcr-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.fcr-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    color: #444;
    font-weight: 500;
}
.fcr-chip:hover { border-color: #ff6600; color: #ff6600; }
.fcr-chip--active {
    background: #ff6600;
    border-color: #ff6600;
    color: #fff;
}
.fcr-chip--active:hover { background: #e55a00; border-color: #e55a00; color: #fff; }
.fcr-chip-count {
    background: rgba(0,0,0,0.08);
    border-radius: 999px;
    padding: 1px 7px;
    font-size: 11px;
}
.fcr-chip--active .fcr-chip-count { background: rgba(255,255,255,0.25); }

/* ── Review List ──────────────────────────────────────── */
.fcr-list { display: flex; flex-direction: column; gap: 0; }

/* Loading */
.fcr-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #888;
    padding: 24px 0;
}
.fcr-spinner {
    width: 20px; height: 20px;
    border: 2px solid #e0e0e0;
    border-top-color: #ff6600;
    border-radius: 50%;
    animation: fcr-spin 0.7s linear infinite;
}
@keyframes fcr-spin { to { transform: rotate(360deg); } }

/* Review Card */
.fcr-review {
    padding: 18px 0;
    border-bottom: 1px solid #f0f0f0;
    animation: fcr-fade-in 0.3s ease;
}
@keyframes fcr-fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.fcr-review:last-child { border-bottom: none; }

.fcr-review__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.fcr-review__author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fcr-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6600, #ff9900);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.fcr-review__name {
    font-weight: 600;
    font-size: 14px;
    color: #1a1a1a;
    line-height: 1.2;
}
.fcr-review__meta {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.fcr-verified {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #00a86b;
    font-size: 11px;
    font-weight: 600;
}
.fcr-verified svg { vertical-align: middle; }

.fcr-review__rating { display: flex; gap: 2px; }
.fcr-review__rating .fcr-star { font-size: 14px; }

/* Item/Variant tag */
.fcr-variant {
    display: inline-block;
    font-size: 11px;
    color: #888;
    background: #f5f5f5;
    border-radius: 4px;
    padding: 2px 7px;
    margin-bottom: 8px;
}

/* Review text */
.fcr-review__content {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    margin: 0;
}

/* Media thumbnails */
.fcr-media {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.fcr-media__thumb {
    width: 72px; height: 72px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #e8e8e8;
    cursor: pointer;
    transition: opacity 0.15s;
}
.fcr-media__thumb:hover { opacity: 0.85; }

/* Helpful */
.fcr-review__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
}
.fcr-helpful-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #888;
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 999px;
    padding: 4px 12px;
    cursor: pointer;
    transition: all 0.15s;
}
.fcr-helpful-btn:hover { border-color: #ff6600; color: #ff6600; }
.fcr-helpful-btn--voted { border-color: #ff6600; color: #ff6600; background: #fff5f0; }
.fcr-helpful-count { font-size: 11px; color: #bbb; }

/* Empty state */
.fcr-empty {
    text-align: center;
    padding: 48px 24px;
    color: #aaa;
    font-size: 15px;
}

/* ── Load More ─────────────────────────────────────────── */
.fcr-pagination { text-align: center; margin: 20px 0 10px; }
.fcr-load-more {
    padding: 10px 28px;
    border: 1.5px solid #ff6600;
    border-radius: 999px;
    background: #fff;
    color: #ff6600;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.fcr-load-more:hover { background: #ff6600; color: #fff; }

/* ── Write Review ──────────────────────────────────────── */
.fcr-write { margin-top: 24px; }

.fcr-write-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 22px;
    background: #ff6600;
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.fcr-write-toggle:hover { background: #e55a00; }

.fcr-form-wrap {
    margin-top: 16px;
    animation: fcr-fade-in 0.2s ease;
}

.fcr-form {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 14px;
    padding: 20px;
}

.fcr-form__title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 16px;
}

/* Star Picker */
.fcr-star-picker {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
    margin-bottom: 14px;
}
.fcr-star-picker input[type="radio"] { display: none; }
.fcr-star-picker label {
    font-size: 30px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.1s;
}
.fcr-star-picker input:checked ~ label,
.fcr-star-picker label:hover,
.fcr-star-picker label:hover ~ label {
    color: #ff6600;
}

/* Inputs */
.fcr-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 10px;
    box-sizing: border-box;
    transition: border-color 0.15s;
    font-family: inherit;
    color: #1a1a1a;
    background: #fff;
}
.fcr-input:focus { outline: none; border-color: #ff6600; }
.fcr-textarea { resize: vertical; min-height: 100px; }

.fcr-form__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    gap: 12px;
}

.fcr-form__notice {
    font-size: 13px;
    color: #00a86b;
    flex: 1;
}
.fcr-form__notice--error { color: #e53935; }

.fcr-submit-btn {
    padding: 10px 24px;
    background: #ff6600;
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}
.fcr-submit-btn:hover { background: #e55a00; }
.fcr-submit-btn:disabled { background: #ffb380; cursor: not-allowed; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 480px) {
    .fcr-summary { flex-direction: column; align-items: stretch; gap: 16px; }
    .fcr-summary__score { flex-direction: row; justify-content: flex-start; flex-wrap: wrap; gap: 8px; }
    .fcr-big-rating { font-size: 36px; }
    .fcr-chip { padding: 5px 11px; font-size: 12px; }
}

/* ── Skeleton loading state ────────────────────────────── */
.fcr-summary--loading .fcr-big-rating,
.fcr-summary--loading .fcr-total-count {
    color: transparent;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: fcr-shimmer 1.2s infinite;
    border-radius: 4px;
}
.fcr-summary--loading .fcr-star { color: #ebebeb !important; }
.fcr-summary--loading .fcr-bar-fill { background: #ebebeb !important; }
@keyframes fcr-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.fcr-review__date { font-size:12px; color:#ccc; white-space:nowrap; flex-shrink:0; }
