/* Reviews feature styles */

/* ===== Star Rating Picker (form input) ===== */

/* Wrapper for clickable star picker — left-to-right with JS-driven state */
.star-rating-picker {
    display: inline-flex;
    flex-direction: row;
    gap: 4px;
    cursor: pointer;
    font-size: 1.5rem;
}

.star-rating-picker .star-icon {
    color: #ddd;
    transition: color 0.15s ease;
    cursor: pointer;
    line-height: 1;
}

.star-rating-picker .star-icon.filled,
.star-rating-picker .star-icon.hover {
    color: var(--sage, #A8C89A);
}

.star-rating-picker .star-icon:focus {
    outline: 2px solid #0d6efd;
    border-radius: 2px;
}

/* ===== Star Rating Display (read-only, in review cards) ===== */

.star-display {
    display: inline-flex;
    flex-direction: row;
    gap: 2px;
    font-size: 1rem;
    line-height: 1;
}

.star-display .star-icon {
    color: #ddd;
    line-height: 1;
}

.star-display .star-icon.filled {
    color: var(--sage, #A8C89A);
}

/* Large average rating star display (summary section) */
.star-display-lg {
    font-size: 1.25rem;
    gap: 3px;
}

/* ===== Rating Summary Section ===== */

.reviews-summary {
    padding: 1.25rem;
    background: var(--cream, #F5F0E8);
    border-radius: 0.5rem;
}

.average-rating-number {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    color: #212529;
}

.average-rating-label {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Rating bar chart rows */
.rating-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 0.875rem;
}

.rating-bar-label {
    flex: 0 0 50px;
    white-space: nowrap;
    color: #495057;
    text-align: right;
}

.rating-bar-track {
    flex: 1;
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    background: var(--sage, #A8C89A);
    border-radius: 6px;
    transition: width 0.3s ease;
}

.rating-bar-count {
    flex: 0 0 30px;
    color: #6c757d;
    text-align: left;
}

/* ===== Review Cards ===== */

.review-card {
    padding: 1.25rem 0;
    border-bottom: 1px solid #e9ecef;
}

.review-card:last-of-type {
    border-bottom: none;
}

.review-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.reviewer-name {
    font-weight: 600;
    color: #212529;
    font-size: 0.95rem;
}

.review-date {
    font-size: 0.85rem;
    color: #6c757d;
}

.review-title {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 1rem;
}

.review-text {
    color: #495057;
    line-height: 1.6;
    margin-bottom: 8px;
}

.review-text-truncated {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.review-text-full {
    display: block;
}

.read-more-link {
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: underline;
    background: none;
    border: none;
    padding: 0;
    color: var(--olive, #556B2F);
}

.read-more-link:hover {
    color: var(--olive-hover, #3D4F22);
}

/* ===== Verified Purchase Badge ===== */

.verified-badge {
    color: var(--olive, #556B2F);
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.verified-badge i {
    font-size: 0.95rem;
}

/* ===== Character Counter ===== */

.char-counter {
    font-size: 0.8rem;
    color: #6c757d;
    text-align: right;
}

.char-counter.near-limit {
    color: #dc3545;
    font-weight: 600;
}

/* ===== Modal ===== */

.review-modal-error {
    display: none;
    margin-top: 0.5rem;
}

/* Star picker validation error hint */
.star-validation-error {
    display: none;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 4px;
}

/* ===== Empty State ===== */

.reviews-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.reviews-empty-state i {
    font-size: 3rem;
    color: #dee2e6;
    margin-bottom: 1rem;
    display: block;
}

/* ===== Pagination ===== */

.reviews-pagination {
    margin-top: 1.5rem;
}

/* ===== Section Heading ===== */

.reviews-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 1.5rem;
}

/* ===== Write Review Button Area ===== */

.write-review-area {
    margin-bottom: 1.5rem;
}

/* ===== Toast Notification ===== */

.review-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1060;
    min-width: 280px;
}
