/**
 * Home Kooking Recipe Reviews Styles
 */

/* Star Rating Display */
.hk-stars {
    display: inline-flex;
    gap: 2px;
}

.hk-star {
    color: #ddd;
    font-size: 1.2em;
    transition: color 0.2s ease;
}

.hk-star.filled {
    color: #f5a623;
}

.hk-star.half {
    background: linear-gradient(90deg, #f5a623 50%, #ddd 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Interactive Stars (for form) */
.hk-stars-interactive {
    cursor: pointer;
    display: inline-flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.hk-stars-interactive .hk-star {
    color: #ddd;
    transition: color 0.15s ease;
    padding: 0 3px;
    font-size: 1.8em;
}

.hk-stars-interactive .hk-star.filled {
    color: #f5a623;
}

/* CSS-only hover: reversed flex + sibling selector */
.hk-stars-interactive .hk-star:hover,
.hk-stars-interactive .hk-star:hover ~ .hk-star {
    color: #f5a623;
}

/* Rating Badge (for cards) */
.hk-rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    color: #666;
}

.hk-rating-badge .hk-stars {
    font-size: 0.9em;
}

.hk-rating-text {
    font-weight: 500;
}

/* Reviews Section */
.hk-reviews-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.hk-reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.hk-reviews-header h2 {
    margin: 0;
    font-size: 1.8em;
}

.hk-reviews-summary {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #f9f9f9;
    padding: 15px 25px;
    border-radius: 8px;
}

.hk-reviews-summary .hk-avg-rating {
    font-size: 2.5em;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

.hk-reviews-summary .hk-stars {
    font-size: 1.3em;
}

.hk-reviews-summary .hk-review-count {
    color: #666;
    font-size: 0.95em;
}

/* Review Form */
.hk-review-form-container {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.hk-review-form-container h3 {
    margin: 0 0 20px 0;
    font-size: 1.3em;
}

.hk-review-form .form-row {
    margin-bottom: 20px;
}

.hk-review-form .form-row-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .hk-review-form .form-row-inline {
        grid-template-columns: 1fr;
    }
}

.hk-review-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.hk-review-form input[type="text"],
.hk-review-form input[type="email"],
.hk-review-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hk-review-form input:focus,
.hk-review-form textarea:focus {
    outline: none;
    border-color: #f5a623;
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.1);
}

.hk-review-form textarea {
    min-height: 120px;
    resize: vertical;
}

.hk-rating-select {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hk-rating-select .hk-stars {
    font-size: 1.8em;
}

.hk-rating-select .rating-label {
    color: #666;
    font-size: 0.95em;
}

.hk-review-form .submit-btn {
    background: #f5a623;
    color: #fff;
    border: none;
    padding: 14px 35px;
    font-size: 1em;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hk-review-form .submit-btn:hover {
    background: #e09000;
    transform: translateY(-1px);
}

.hk-review-form .submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.hk-form-message {
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.hk-form-message.success {
    background: #d4edda;
    color: #155724;
}

.hk-form-message.error {
    background: #f8d7da;
    color: #721c24;
}

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

.hk-review-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 25px;
    transition: box-shadow 0.2s ease;
}

.hk-review-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.hk-review-item.hk-review-highlight {
    animation: highlightReview 2s ease;
}

@keyframes highlightReview {
    0% {
        background: #fff9e6;
        box-shadow: 0 0 20px rgba(245, 166, 35, 0.3);
    }
    100% {
        background: #fff;
        box-shadow: none;
    }
}

.hk-review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.hk-review-author {
    font-weight: 600;
    color: #333;
    font-size: 1.1em;
}

.hk-review-date {
    color: #999;
    font-size: 0.9em;
}

.hk-review-rating {
    margin-bottom: 12px;
}

.hk-review-rating .hk-stars {
    font-size: 1.1em;
}

.hk-review-text {
    color: #555;
    line-height: 1.7;
    margin-bottom: 15px;
}

.hk-review-footer {
    display: flex;
    align-items: center;
    gap: 15px;
}

.hk-helpful-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid #ddd;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9em;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hk-helpful-btn:hover {
    border-color: #f5a623;
    color: #f5a623;
}

.hk-helpful-btn.voted {
    background: #fff8e7;
    border-color: #f5a623;
    color: #f5a623;
}

.hk-helpful-btn .helpful-icon {
    font-size: 1.1em;
}

/* No Reviews State */
.hk-no-reviews {
    text-align: center;
    padding: 40px;
    color: #999;
}

.hk-no-reviews p {
    margin: 0;
    font-size: 1.1em;
}

/* Recipe Card Rating */
.recipe-card .hk-rating-badge {
    margin-top: 8px;
}

.recipe-card .hk-rating-badge .hk-star {
    font-size: 0.85em;
}

/* No Reviews Yet (for cards) */
.no-reviews-yet {
    color: #999;
    font-size: 0.85em;
    font-style: italic;
}

/* Recipe Rating Summary (top of recipe page) */
.recipe-rating-summary {
    margin: 0 0 15px 0;
}

.recipe-rating-summary .rating-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #666;
}

.recipe-rating-summary .rating-link:hover {
    color: #f5a623;
}

.recipe-rating-summary .hk-stars {
    font-size: 1.1em;
}

.recipe-rating-summary .rating-text {
    font-size: 0.9em;
}

.recipe-rating-summary .rating-text strong {
    color: #333;
}

/* Load More Button */
.hk-load-more-container {
    text-align: center;
    margin-top: 30px;
}

.hk-load-more-btn {
    background: #fff;
    border: 2px solid #f5a623;
    color: #f5a623;
    padding: 12px 30px;
    font-size: 1em;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hk-load-more-btn:hover {
    background: #f5a623;
    color: #fff;
}

.hk-load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
