/* =====================================================
   FLEXI COMMERCE — REVIEW SYSTEM
===================================================== */


/* =====================================================
   REVIEW PANEL
===================================================== */

.fc-reviews-panel {
    width: 100%;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}


/* =====================================================
   REVIEW SUMMARY BOX
===================================================== */

.fc-review-summary-box {
    width: 100%;
    padding: 28px;
    margin-bottom: 30px;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 14px;
    box-sizing: border-box;
}


.fc-review-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 25px;
}


.fc-review-summary-title h2 {
    margin: 0 0 6px;
    font-size: 24px;
    line-height: 1.3;
    font-weight: 700;
}


.fc-review-summary-count {
    display: block;
    color: #777777;
    font-size: 14px;
}


.fc-review-summary-rating {
    display: flex;
    align-items: center;
    gap: 12px;
}


.fc-review-average {
    display: flex;
    align-items: baseline;
    gap: 3px;
}


.fc-review-average strong {
    font-size: 32px;
    line-height: 1;
    font-weight: 700;
}


.fc-review-average span {
    color: #777777;
    font-size: 14px;
}


/* =====================================================
   STAR SYSTEM
===================================================== */

.fc-stars {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
}


.fc-star {
    display: inline-block;
    font-size: 18px;
    line-height: 1;
}


.fc-star-full {
    color: #f5a623;
}


.fc-star-empty {
    color: #d8d8d8;
}


.fc-star-half {
    color: #f5a623;
}


/* =====================================================
   SUMMARY STARS
===================================================== */

.fc-review-summary-stars .fc-star {
    font-size: 21px;
}


.fc-rating-stars-large .fc-star {
    font-size: 22px;
}


/* =====================================================
   NEW PRODUCT BADGE
===================================================== */

.fc-new-badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 20px;
    background: #f4f4f4;
    color: #555555;
    font-size: 13px;
    font-weight: 600;
}


/* =====================================================
   RATING BREAKDOWN
===================================================== */

.fc-review-summary-breakdown {
    width: 100%;
    max-width: 650px;
}


.fc-rating-breakdown {
    width: 100%;
}


.fc-rating-row {
    display: grid;
    grid-template-columns: 45px minmax(100px, 1fr) 45px;
    align-items: center;
    gap: 10px;
    margin-bottom: 9px;
}


.fc-rating-row:last-child {
    margin-bottom: 0;
}


.fc-rating-label {
    font-size: 13px;
    color: #555555;
    white-space: nowrap;
}


.fc-rating-label span {
    color: #f5a623;
}


.fc-rating-bar {
    position: relative;
    width: 100%;
    height: 8px;
    overflow: hidden;
    background: #eeeeee;
    border-radius: 10px;
}


.fc-rating-bar-fill {
    display: block;
    height: 100%;
    background: #f5a623;
    border-radius: 10px;
    transition: width 0.3s ease;
}


.fc-rating-count {
    text-align: right;
    color: #777777;
    font-size: 13px;
}


/* =====================================================
   RATING OVERVIEW
===================================================== */

.fc-rating-overview {
    display: flex;
    align-items: center;
    gap: 40px;
    width: 100%;
}


.fc-rating-score {
    min-width: 120px;
    text-align: center;
}


.fc-rating-number {
    display: block;
    margin-bottom: 6px;
    font-size: 38px;
    line-height: 1;
}


.fc-rating-total {
    display: block;
    margin-top: 7px;
    color: #777777;
    font-size: 13px;
}


.fc-rating-breakdown-wrap {
    flex: 1;
}


/* =====================================================
   REVIEW LIST
===================================================== */

.fc-review-list-wrapper {
    width: 100%;
    margin-bottom: 35px;
}


.fc-review-list {
    width: 100%;
}


.fc-review-item {
    position: relative;
    padding: 25px 0;
    border-bottom: 1px solid #e9e9e9;
}


.fc-review-item:first-child {
    padding-top: 0;
}


.fc-review-item:last-child {
    border-bottom: 0;
}


/* =====================================================
   REVIEW HEADER
===================================================== */

.fc-review-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}


.fc-review-rating {
    display: inline-flex;
    align-items: center;
}


.fc-review-rating .fc-star {
    font-size: 17px;
}


.fc-review-title {
    margin: 0;
    font-size: 17px;
    line-height: 1.4;
    font-weight: 700;
    color: #222222;
}


/* =====================================================
   REVIEW META
===================================================== */

.fc-review-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 13px;
}


.fc-review-author {
    color: #222222;
    font-size: 14px;
    font-weight: 600;
}


.fc-review-date {
    color: #888888;
    font-size: 13px;
}


.fc-review-date::before {
    content: "•";
    margin-right: 8px;
    color: #bbbbbb;
}


/* =====================================================
   VERIFIED BUYER
===================================================== */

.fc-verified-buyer {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    background: #eef8f0;
    color: #2f7d32;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 600;
}


.fc-verified-buyer-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #2f7d32;
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
}


/* =====================================================
   REVIEW CONTENT
===================================================== */

.fc-review-content {
    max-width: 850px;
    color: #444444;
    font-size: 15px;
    line-height: 1.7;
}


.fc-review-content p {
    margin: 0 0 8px;
}


.fc-review-content p:last-child {
    margin-bottom: 0;
}


/* =====================================================
   REVIEW FOOTER
===================================================== */

.fc-review-footer {
    display: flex;
    align-items: center;
    margin-top: 15px;
}


.fc-review-helpful-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border: 1px solid #dddddd;
    border-radius: 5px;
    background: #ffffff;
    color: #666666;
    cursor: pointer;
    font-size: 12px;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}


.fc-review-helpful-button:hover {
    border-color: #bbbbbb;
    background: #f8f8f8;
    color: #222222;
}


.fc-review-helpful-count {
    font-weight: 600;
}


/* =====================================================
   EMPTY REVIEWS
===================================================== */

.fc-empty-reviews {
    padding: 45px 20px;
    text-align: center;
    border: 1px dashed #dddddd;
    border-radius: 12px;
    background: #fafafa;
}


.fc-empty-review-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: #f1f1f1;
    color: #c5c5c5;
    font-size: 22px;
}


.fc-empty-reviews h3 {
    margin: 0 0 7px;
    font-size: 18px;
    font-weight: 700;
}


.fc-empty-reviews p {
    margin: 0;
    color: #777777;
    font-size: 14px;
}


/* =====================================================
   REVIEW FORM
===================================================== */

.fc-review-form {
    display: grid;
    gap: 16px;
    width: 100%;
}

.fc-review-form-section {
    width: 100%;
    margin-top: 0;
    padding: 28px;
    border: 1px solid #e8e8e8;
    border-radius: 14px;
    background: #ffffff;
    box-sizing: border-box;
}


.fc-review-form-header {
    margin-bottom: 25px;
}


.fc-review-form-header h3 {
    margin: 0 0 6px;
    font-size: 21px;
    line-height: 1.4;
    font-weight: 700;
}


.fc-review-form-header p {
    margin: 0;
    color: #777777;
    font-size: 14px;
}


/* =====================================================
   FORM GRID
===================================================== */

.fc-review-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}


.fc-review-field {
    margin-bottom: 18px;
}


.fc-review-field label {
    display: block;
    margin-bottom: 7px;
    color: #222222;
    font-size: 14px;
    font-weight: 600;
}


.fc-review-field input,
.fc-review-field select,
.fc-review-field textarea {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 10px 13px;
    border: 1px solid #dcdcdc;
    border-radius: 7px;
    outline: none;
    background: #ffffff;
    color: #222222;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


.fc-review-field textarea {
    min-height: 130px;
    resize: vertical;
    line-height: 1.6;
}


.fc-review-field input:focus,
.fc-review-field select:focus,
.fc-review-field textarea:focus {
    border-color: #999999;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}


.fc-review-field input::placeholder,
.fc-review-field textarea::placeholder {
    color: #aaaaaa;
}


/* =====================================================
   FORM ACTIONS
===================================================== */

.fc-review-form-actions {
    display: flex;
    align-items: center;
    margin-top: 5px;
}


.fc-review-submit-button {
    position: relative;
    min-width: 150px;
    min-height: 44px;
    padding: 10px 20px;
    border: 0;
    border-radius: 7px;
    background: #222222;
    color: #ffffff;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    transition:
        background 0.2s ease,
        transform 0.2s ease,
        opacity 0.2s ease;
}


.fc-review-submit-button:hover {
    background: #000000;
    transform: translateY(-1px);
}


.fc-review-submit-button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}


.fc-review-submit-loading[hidden] {
    display: none;
}


/* =====================================================
   REVIEW MESSAGE
===================================================== */

.fc-review-message {
    display: none;
    margin-top: 15px;
    padding: 11px 14px;
    border-radius: 7px;
    font-size: 14px;
    line-height: 1.5;
}


.fc-review-message.is-visible {
    display: block;
}


.fc-review-message.success {
    border: 1px solid #cce8d0;
    background: #f0faf2;
    color: #287436;
}


.fc-review-message.error {
    border: 1px solid #f0cccc;
    background: #fff4f4;
    color: #a22a2a;
}


.fc-review-message.info {
    border: 1px solid #d5e3f5;
    background: #f4f8fd;
    color: #315b8c;
}


/* =====================================================
   ACCESSIBILITY
===================================================== */

.fc-review-helpful-button:focus-visible,
.fc-review-submit-button:focus-visible,
.fc-review-field input:focus-visible,
.fc-review-field select:focus-visible,
.fc-review-field textarea:focus-visible {
    outline: 2px solid #555555;
    outline-offset: 2px;
}


/* =====================================================
   ADMIN STATUS CLASSES
   Safe to share with admin review markup
===================================================== */

.fc-review-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}


.fc-status-approved {
    background: #edf8ef;
    color: #28733a;
}


.fc-status-pending {
    background: #fff7e5;
    color: #996b00;
}


.fc-status-rejected {
    background: #fff0f0;
    color: #a12c2c;
}


/* =====================================================
   ADMIN RATING
===================================================== */

.fc-admin-rating {
    display: inline-flex;
    align-items: center;
    gap: 1px;
}


.fc-admin-rating .fc-star-filled {
    color: #f5a623;
}


.fc-admin-rating .fc-star-empty {
    color: #cccccc;
}


/* =====================================================
   RESPONSIVE — TABLET
===================================================== */

@media (max-width: 768px) {

    .fc-review-summary-box,
    .fc-review-form-section {
        padding: 22px;
    }


    .fc-review-summary-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
    }


    .fc-rating-overview {
        align-items: flex-start;
        flex-direction: column;
        gap: 25px;
    }


    .fc-rating-score {
        text-align: left;
    }


    .fc-review-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

}


/* =====================================================
   RESPONSIVE — MOBILE
===================================================== */

@media (max-width: 480px) {

    .fc-reviews-panel {
        margin-top: 25px;
    }


    .fc-review-summary-box,
    .fc-review-form-section {
        padding: 18px;
        border-radius: 10px;
    }


    .fc-review-summary-title h2 {
        font-size: 20px;
    }


    .fc-review-average strong {
        font-size: 28px;
    }


    .fc-review-summary-stars .fc-star {
        font-size: 18px;
    }


    .fc-rating-row {
        grid-template-columns: 40px minmax(70px, 1fr) 35px;
        gap: 7px;
    }


    .fc-review-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }


    .fc-review-title {
        font-size: 16px;
    }


    .fc-review-content {
        font-size: 14px;
        line-height: 1.65;
    }


    .fc-review-form-header h3 {
        font-size: 19px;
    }


    .fc-review-submit-button {
        width: 100%;
    }

}