/**
 * Rental Reviews Frontend Styles
 *
 * @package RentalReviews
 */

/* Reviews List */
.rental-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Review Card */
.rental-review-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.rental-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.rental-review-author {
    font-weight: 600;
    font-size: 1.1em;
    color: #333;
}

.rental-review-rating {
    display: flex;
    align-items: center;
}

/* Star Rating */
.rental-review-stars,
.rental-reviews-stars {
    display: inline-flex;
    gap: 2px;
}

.rental-review-star {
    font-size: 1.2em;
    line-height: 1;
}

.rental-review-star.filled {
    color: #ffc107;
}

.rental-review-star.half {
    color: #ffc107;
    position: relative;
}

.rental-review-star.empty {
    color: #ddd;
}

/* Review Meta */
.rental-review-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 0.9em;
    color: #666;
}

.rental-review-date {
    color: #888;
}

/* Source Badges */
.rental-review-source {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
}

.rental-review-source-local {
    background: #e3f2fd;
    color: #1565c0;
}

.rental-review-source-airbnb {
    background: #ffebee;
    color: #c62828;
}

.rental-review-source-vrbo {
    background: #e8f5e9;
    color: #2e7d32;
}

.rental-review-source-booking {
    background: #e3f2fd;
    color: #0d47a1;
}

/* Review Content */
.rental-review-content {
    color: #444;
    line-height: 1.6;
}

.rental-review-content p {
    margin: 0 0 10px;
}

.rental-review-content p:last-child {
    margin-bottom: 0;
}

/* Pagination */
.rental-reviews-pagination {
    margin-top: 30px;
    text-align: center;
}

.rental-reviews-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
}

.rental-reviews-pagination .page-numbers:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.rental-reviews-pagination .page-numbers.current {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

/* Empty State */
.rental-reviews-empty {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    color: #666;
}

/* Summary Widget */
.rental-reviews-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
}

.rental-reviews-summary-rating {
    font-size: 2.5em;
    font-weight: 700;
    color: #333;
    line-height: 1;
    margin-bottom: 10px;
}

.rental-reviews-summary-max {
    font-size: 0.5em;
    color: #888;
    font-weight: 400;
}

.rental-reviews-summary-stars {
    margin-bottom: 10px;
}

.rental-reviews-summary-stars .rental-review-star {
    font-size: 1.5em;
}

.rental-reviews-summary-count {
    color: #666;
    font-size: 0.95em;
}

.rental-reviews-summary-empty {
    background: #f9f9f9;
}

/* Responsive */
@media (max-width: 600px) {
    .rental-review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .rental-review-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .rental-reviews-summary-rating {
        font-size: 2em;
    }
}


/* Review Form */
.rental-review-form-wrapper {
    max-width: 600px;
}

.rental-review-form {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
}

.rental-review-form-field {
    margin-bottom: 20px;
}

.rental-review-form-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
}

.rental-review-form-field .required {
    color: #d63638;
}

.rental-review-form-field input[type="text"],
.rental-review-form-field input[type="email"],
.rental-review-form-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    transition: border-color 0.2s ease;
}

.rental-review-form-field input:focus,
.rental-review-form-field textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.rental-review-form-field.has-error input,
.rental-review-form-field.has-error textarea {
    border-color: #d63638;
}

.rental-review-form-error {
    display: none;
    color: #d63638;
    font-size: 0.9em;
    margin-top: 5px;
}

/* Star Rating Input */
.rental-review-rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 5px;
}

.rental-review-rating-input input {
    display: none;
}

.rental-review-rating-input label {
    cursor: pointer;
    font-size: 1.8em;
    color: #ddd;
    transition: color 0.15s ease;
    margin-bottom: 0;
}

/* Hover: highlight hovered star and all stars to its left (lower values in DOM = higher visual position) */
.rental-review-rating-input label:hover,
.rental-review-rating-input label:hover ~ label {
    color: #ffc107;
}

/* Checked: highlight checked star and all stars to its left */
.rental-review-rating-input input:checked ~ label {
    color: #ffc107;
}

/* Submit Button */
.rental-review-form-submit {
    margin-top: 25px;
}

.rental-review-submit-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.rental-review-submit-btn:hover {
    background: #005a87;
}

.rental-review-submit-btn:disabled {
    background: #999;
    cursor: not-allowed;
}

/* Form Messages */
.rental-review-form-message {
    margin-top: 20px;
    padding: 12px 15px;
    border-radius: 4px;
}

.rental-review-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.rental-review-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}


/* Review Text (cleaned content) */
.rental-review-text {
    margin-bottom: 0;
}

.rental-review-text p {
    margin: 0 0 10px;
}

.rental-review-text p:last-child {
    margin-bottom: 0;
}

/* Host Response */
.rental-review-response {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-left: 3px solid #0073aa;
    border-radius: 0 6px 6px 0;
}

.rental-review-response .response-header {
    margin-bottom: 8px;
    font-size: 0.9em;
}

.rental-review-response .response-header strong {
    color: #333;
}

.rental-review-response .response-time {
    color: #888;
    font-size: 0.9em;
    margin-left: 5px;
}

.rental-review-response .response-content {
    color: #555;
    font-size: 0.95em;
    line-height: 1.5;
}

.rental-review-response .response-content p {
    margin: 0;
}

/* Trip Type Badge */
.rental-review-trip-type {
    margin-top: 10px;
}

.trip-type-badge {
    display: inline-block;
    padding: 3px 10px;
    background: #e8f4fd;
    color: #1976d2;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
}

/* Reviewer Location */
.rental-review-location {
    margin-top: 8px;
    color: #888;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 4px;
}

.rental-review-location .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}
