/**
 * Public/Frontend Styles
 * WP Reviews MH
 */

/* ========================================
   General Styles
   ======================================== */

.wprm-reviews-section {
    padding: 40px 0;
    margin: 40px 0;
    border-top: 1px solid #e5e5e5;
}

.wprm-section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
    color: #333;
}

/* ========================================
   Review Summary Header
   ======================================== */

.wprm-review-summary-header {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.wprm-summary-stats {
    display: flex;
    gap: 40px;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.wprm-average-rating {
    text-align: center;
    padding: 20px;
}

.wprm-rating-number {
    font-size: 48px;
    font-weight: 700;
    color: #f39c12;
    margin-bottom: 10px;
}

.wprm-total-reviews {
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

/* Rating Breakdown */
.wprm-rating-breakdown {
    flex: 1;
    max-width: 400px;
}

.wprm-rating-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.wprm-bar-label {
    display: flex;
    align-items: center;
    gap: 3px;
    min-width: 50px;
    font-size: 14px;
    color: #666;
}

.wprm-star-icon {
    color: #f39c12;
}

.wprm-bar-container {
    flex: 1;
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.wprm-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f39c12, #e67e22);
    transition: width 0.3s ease;
}

.wprm-bar-count {
    min-width: 30px;
    text-align: right;
    font-size: 14px;
    color: #666;
}

/* Add Review Button */
.wprm-add-review-button {
    text-align: center;
    margin-top: 20px;
}

.wprm-no-reviews {
    text-align: center;
    padding: 30px;
}

.wprm-no-reviews-text {
    font-size: 18px;
    color: #999;
    margin-bottom: 20px;
}

/* ========================================
   Review Form
   ======================================== */

.wprm-review-form-container {
    background: #fff;
    border: 2px solid #007bff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.wprm-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.wprm-form-header h3 {
    margin: 0;
    font-size: 20px;
    color: #007bff;
}

.wprm-close-form {
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 1;
}

.wprm-close-form:hover {
    color: #333;
}

.wprm-form-group {
    margin-bottom: 20px;
}

.wprm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.wprm-form-group input[type="text"],
.wprm-form-group input[type="email"],
.wprm-form-group input[type="tel"],
.wprm-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.wprm-form-group input:focus,
.wprm-form-group textarea:focus {
    outline: none;
    border-color: #007bff;
}

.wprm-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* Star Rating */
.wprm-star-rating {
    display: flex;
    gap: 10px;
    font-size: 40px;
    cursor: pointer;
}

.wprm-star-rating .wprm-star {
    color: #ddd;
    transition: color 0.2s;
}

.wprm-star-rating .wprm-star:hover,
.wprm-star-rating .wprm-star.selected {
    color: #f39c12;
}

/* Image Preview */
.wprm-image-preview {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.wprm-image-thumb {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #ddd;
}

.wprm-image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wprm-form-hint {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.wprm-form-message {
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.wprm-form-message.wprm-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.wprm-form-message.wprm-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ========================================
   Buttons
   ======================================== */

.wprm-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.wprm-btn-primary {
    background: #007bff;
    color: #fff;
}

.wprm-btn-primary:hover {
    background: #0056b3;
}

.wprm-btn-secondary {
    background: #6c757d;
    color: #fff;
}

.wprm-btn-secondary:hover {
    background: #545b62;
}

.wprm-btn-large {
    padding: 15px 40px;
    font-size: 16px;
}

.wprm-btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

.wprm-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========================================
   Filter Options
   ======================================== */

.wprm-reviews-filter {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
}

.wprm-filter-label {
    font-weight: 600;
    color: #333;
}

.wprm-filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.wprm-filter-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.wprm-filter-btn:hover {
    border-color: #007bff;
    color: #007bff;
}

.wprm-filter-btn.active {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

/* ========================================
   Review Items
   ======================================== */

.wprm-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.wprm-review-item {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 24px;
    transition: box-shadow 0.3s;
}

.wprm-review-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.wprm-review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.wprm-reviewer-info {
    display: flex;
    gap: 12px;
    align-items: center;
}

.wprm-reviewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    text-transform: uppercase;
}

.wprm-reviewer-name {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.wprm-reviewer-phone {
    font-size: 13px;
    color: #999;
}

.wprm-review-rating {
    text-align: right;
}

.wprm-review-title {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-top: 5px;
}

/* Stars */
.wprm-stars {
    display: flex;
    gap: 2px;
}

.wprm-star-filled {
    color: #f39c12;
}

.wprm-star-empty {
    color: #ddd;
}

.wprm-stars-small {
    font-size: 14px;
}

/* Badges */
.wprm-review-badges {
    margin-bottom: 12px;
}

.wprm-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #28a745;
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.wprm-verified-badge svg {
    width: 14px;
    height: 14px;
}

/* Review Content */
.wprm-review-content {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Review Media */
.wprm-review-media {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.wprm-media-item {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s;
}

.wprm-media-item:hover {
    transform: scale(1.05);
}

.wprm-media-item img,
.wprm-media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Review Meta */
.wprm-review-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.wprm-review-date {
    font-size: 13px;
    color: #999;
}

.wprm-helpful-buttons {
    display: flex;
    gap: 10px;
}

.wprm-helpful-btn,
.wprm-reply-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.wprm-helpful-btn:hover,
.wprm-reply-btn:hover {
    border-color: #007bff;
    color: #007bff;
}

.wprm-helpful-btn.voted {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
    cursor: default;
}

.wprm-helpful-btn .dashicons,
.wprm-reply-btn .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
}

/* Comments/Replies */
.wprm-review-comments {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.wprm-comment-item {
    display: flex;
    gap: 12px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
}

.wprm-comment-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.wprm-comment-content {
    flex: 1;
}

.wprm-comment-author {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wprm-admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #007bff;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.wprm-admin-badge .dashicons {
    width: 12px;
    height: 12px;
    font-size: 12px;
}

.wprm-comment-text {
    color: #555;
    line-height: 1.5;
    margin-bottom: 5px;
}

.wprm-comment-date {
    font-size: 12px;
    color: #999;
}

/* Reply Form */
.wprm-reply-form-container {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.wprm-reply-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    resize: vertical;
    min-height: 80px;
    margin-bottom: 10px;
}

.wprm-reply-actions {
    display: flex;
    gap: 10px;
}

/* Load More */
.wprm-load-more-container {
    text-align: center;
    margin-top: 30px;
}

/* Lightbox */
.wprm-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wprm-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.wprm-lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
}

.wprm-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Archive Rating */
.wprm-archive-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 8px 0;
}

.wprm-rating-text {
    font-size: 13px;
    color: #666;
}

/* ========================================
   Mobile Responsive
   ======================================== */

@media (max-width: 768px) {
    .wprm-reviews-section {
        padding: 20px 0;
    }
    
    .wprm-review-summary-header {
        padding: 20px;
    }
    
    .wprm-summary-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .wprm-rating-breakdown {
        width: 100%;
    }
    
    .wprm-review-form-container {
        padding: 20px;
    }
    
    .wprm-form-row {
        grid-template-columns: 1fr;
    }
    
    .wprm-reviews-filter {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .wprm-review-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .wprm-review-rating {
        text-align: left;
    }
    
    .wprm-review-meta {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .wprm-helpful-buttons {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .wprm-rating-number {
        font-size: 36px;
    }
    
    .wprm-star-rating {
        font-size: 32px;
    }
    
    .wprm-reviewer-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .wprm-media-item {
        width: 80px;
        height: 80px;
    }
    
    .wprm-filter-buttons {
        width: 100%;
    }
    
    .wprm-filter-btn {
        flex: 1;
        text-align: center;
    }
}

