/* ==========================================================================
   Customer Reviews Component Styling
   Matching original Appio widget: Color #b37380 / #B97C8C, 4.4 Badge, Bars, Cards
   ========================================================================== */

.customer-reviews-section {
    padding: 48px 0 64px;
    background: #ffffff;
    color: #222222;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.reviews-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.reviews-main-title {
    font-size: 26px;
    font-weight: 700;
    color: #111111;
    margin: 0 0 28px;
    letter-spacing: -0.3px;
}

/* Reviews Summary Layout */
.reviews-summary-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 36px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

/* Overall Score Box */
.reviews-score-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}

.reviews-score-badge {
    background-color: #b37380;
    color: #ffffff;
    width: 72px;
    height: 72px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(179, 115, 128, 0.25);
}

.reviews-score-number {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.reviews-score-label {
    margin-top: 10px;
    font-size: 13.5px;
    color: #555555;
    font-weight: 400;
    text-align: center;
}

/* Rating Breakdown */
.reviews-breakdown-list {
    flex: 1;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.breakdown-row {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.15s ease;
}

.breakdown-row:hover {
    background: #fdf5f6;
}

.breakdown-stars {
    display: flex;
    gap: 2px;
    min-width: 80px;
}

.star-icon {
    font-size: 14px;
    line-height: 1;
}

.star-filled {
    color: #b37380;
}

.star-empty {
    color: #e0e0e0;
}

.breakdown-bar-track {
    flex: 1;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.breakdown-bar-fill {
    height: 100%;
    background-color: #b37380;
    border-radius: 4px;
    transition: width 0.4s ease;
}

.breakdown-count {
    min-width: 22px;
    font-size: 13px;
    color: #444444;
    text-align: right;
    font-weight: 500;
}

/* Actions Box */
.reviews-actions-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.btn-write-review {
    background-color: #b37380;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 10px 22px;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: 0 2px 4px rgba(179, 115, 128, 0.2);
}

.btn-write-review:hover {
    background-color: #9e636f;
}

.btn-write-review:active {
    transform: scale(0.98);
}

/* Sort Dropdown */
.reviews-sort-wrapper {
    position: relative;
}

.btn-sort-toggle {
    background-color: #b37380;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-sort-toggle:hover {
    background-color: #9e636f;
}

.reviews-sort-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    min-width: 160px;
    z-index: 50;
    display: none;
    flex-direction: column;
    padding: 6px 0;
}

.reviews-sort-dropdown.show {
    display: flex;
}

.sort-option {
    background: none;
    border: none;
    padding: 8px 16px;
    text-align: left;
    font-size: 13.5px;
    color: #333333;
    cursor: pointer;
    transition: background 0.15s ease;
}

.sort-option:hover {
    background: #f7f7f7;
    color: #b37380;
}

.sort-option.active {
    font-weight: 600;
    color: #b37380;
    background: #fdf5f6;
}

/* Active Filter Pill */
.reviews-active-filter {
    background: #fdf5f6;
    border: 1px solid #f1d3d8;
    color: #b37380;
    padding: 8px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
}

.btn-clear-filter {
    background: none;
    border: none;
    color: #b37380;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 8px;
}

.btn-clear-filter:hover {
    text-decoration: underline;
}

/* Divider */
.reviews-divider {
    border: 0;
    border-top: 1px solid #eeeeee;
    margin: 24px 0 28px;
}

/* Reviews List */
.reviews-list {
    display: flex;
    flex-direction: column;
}

.review-card {
    padding: 22px 0;
    border-bottom: 1px solid #eeeeee;
    transition: opacity 0.3s ease;
}

.review-card.review-hidden {
    display: none !important;
}

.review-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.reviewer-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.reviewer-flag {
    font-size: 16px;
    line-height: 1;
}

.reviewer-name {
    font-size: 15px;
    font-weight: 700;
    color: #111111;
}

.review-date {
    font-size: 13.5px;
    color: #666666;
}

.review-stars-row {
    display: flex;
    gap: 3px;
    margin-bottom: 8px;
}

.review-stars-row .star-icon {
    font-size: 17px;
}

.review-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #111111;
    margin: 0 0 6px;
    line-height: 1.35;
}

.review-card-body {
    font-size: 14.5px;
    line-height: 1.55;
    color: #333333;
    margin-bottom: 8px;
}

.review-card-body p {
    margin: 0 0 6px;
}

.review-card-body p:last-child {
    margin-bottom: 0;
}

/* Review Photos */
.review-card-photos {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.review-photo-item {
    display: block;
    width: 68px;
    height: 68px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.review-photo-item:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.review-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Pagination & Load More */
.reviews-pagination-wrapper {
    text-align: center;
    margin-top: 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.btn-load-more-reviews {
    background: transparent;
    color: #b37380;
    border: 1.5px solid #b37380;
    padding: 11px 32px;
    font-size: 14.5px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-load-more-reviews:hover {
    background: #b37380;
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(179, 115, 128, 0.25);
}

.reviews-counter-text {
    font-size: 13.5px;
    color: #777777;
}

/* Write Review Form Card */
.write-review-form-wrapper {
    margin: 20px 0 28px;
}

.review-form-card {
    background: #faf7f8;
    border: 1px solid #eedbdf;
    border-radius: 8px;
    padding: 24px;
}

.review-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.review-form-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #111111;
}

.btn-close-form {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #777;
    cursor: pointer;
}

.customer-review-form .form-group {
    margin-bottom: 16px;
}

.customer-review-form label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 6px;
}

.customer-review-form input[type="text"],
.customer-review-form input[type="email"],
.customer-review-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    font-size: 14px;
    background: #ffffff;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.customer-review-form input:focus,
.customer-review-form textarea:focus {
    border-color: #b37380;
    outline: none;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.star-rating-picker-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.star-rating-picker-group label {
    margin-bottom: 0;
}

.star-picker {
    display: flex;
    gap: 4px;
    cursor: pointer;
}

.picker-star {
    font-size: 24px;
    color: #e0e0e0;
    transition: color 0.15s ease;
}

.picker-star.active,
.picker-star:hover {
    color: #b37380;
}

.btn-submit-review {
    background: #b37380;
    color: #ffffff;
    border: none;
    padding: 11px 28px;
    border-radius: 6px;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-submit-review:hover {
    background: #9e636f;
}

.review-submit-success {
    text-align: center;
    padding: 24px 0;
}

.review-submit-success .success-icon {
    font-size: 36px;
    color: #27ae60;
    margin-bottom: 10px;
}

.review-submit-success h4 {
    margin: 0 0 6px;
    font-size: 18px;
    color: #111;
}

.review-submit-success p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .reviews-summary-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .reviews-score-box {
        flex-direction: row;
        gap: 16px;
        align-items: center;
    }

    .reviews-score-label {
        margin-top: 0;
        text-align: left;
    }

    .reviews-breakdown-list {
        width: 100%;
        max-width: 100%;
    }

    .reviews-actions-box {
        width: 100%;
        justify-content: space-between;
        margin-left: 0;
    }

    .btn-write-review {
        flex: 1;
    }

    .form-row-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }
}
