/* WooCommerce Product Reviews Display Styles */

.wc-product-reviews-container {
    margin: 0 auto;
    padding: 20px;
    background: #fff;
}

.wc-product-reviews-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
}

.wcpr-trust-card {
    border: 1px solid #ececec;
    border-radius: 14px;
    background: #fff;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.wcpr-avatar-stack {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.wcpr-avatar-bubble {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e9edf3;
    color: #192330;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    margin-left: -8px;
}

.wcpr-avatar-bubble:first-child {
    margin-left: 0;
}

.wcpr-rating-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.wcpr-rating-value {
    font-size: 28px;
    font-weight: 700;
    color: #192330;
}

.wc-product-reviews-stars-container {
    display: inline-flex;
    align-items: center;
}

.wc-product-reviews-star {
    font-size: 15px;
    margin-right: 1px;
    color: #ddd;
}

.wc-product-reviews-star.filled,
.wc-product-reviews-star.half-filled {
    color: #f4c430;
}

.wcpr-based-on {
    color: #666;
    font-size: 13px;
    margin-bottom: 16px;
}

.wcpr-platforms {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
    margin-bottom: 18px;
    padding: 12px 0;
    border-top: 1px solid #efefef;
    border-bottom: 1px solid #efefef;
}

.wcpr-platforms span {
    font-size: 18px;
    font-weight: 700;
    color: #2d2d2d;
    line-height: 1;
}

.wc-product-reviews-write-btn {
    display: inline-block;
    width: 100%;
    text-align: center;
    padding: 11px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    background: #ffdd26;
    color: #192330;
    border: 2px solid #ffdd26;
    transition: all 0.3s ease;
}

.wc-product-reviews-write-btn:hover {
    background: #192330;
    color: #ffdd26;
    text-decoration: none;
}

.wcpr-reviews-panel {
    position: relative;
}

.wc-product-reviews-title {
    margin: 0 0 8px;
    color: #192330;
    font-size: 34px;
    line-height: 1.2;
    font-weight: 700;
}

.wcpr-subtitle {
    margin: 0 0 18px;
    color: #555;
    font-size: 24px;
    line-height: 1.35;
}

.wcpr-carousel {
    display: grid;
    grid-template-columns: 34px 1fr 34px;
    gap: 8px;
    align-items: center;
}

.wcpr-viewport {
    overflow: hidden;
}

.wcpr-track {
    display: flex;
    gap: 14px;
    transition: transform 0.25s ease;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 2px 2px 6px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.wcpr-track::-webkit-scrollbar {
    display: none;
}

.wc-product-review-item {
    flex: 0 0 calc(33.33% - 10px);
    min-width: 280px;
    max-width: 360px;
    background: #f3f3f3;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 16px;
}

.wcpr-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.wc-product-review-author {
    font-size: 22px;
    color: #192330;
    line-height: 1.25;
    font-weight: 700;
    flex: 1 1 auto;
    word-break: break-word;
}

.wcpr-source {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    flex: 0 0 auto;
}

.wcpr-source-icon {
    width: 22px;
    height: 22px;
    display: block;
}

.wcpr-review-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.wcpr-review-rating .wc-product-reviews-stars-container {
    transform: translateY(1px);
}

.wcpr-review-rating-value {
    font-size: 14px;
    font-weight: 700;
    color: #192330;
}

.wc-product-review-text {
    color: #444;
    font-size: 16px;
    line-height: 1.6;
}

.wcpr-nav {
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: #192330;
    font-size: 34px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.3s ease;
}

.wcpr-nav:hover:not(:disabled) {
    color: #ffc973;
}

.wcpr-nav:disabled {
    opacity: 0.3;
    cursor: default;
}

.wc-product-reviews-no-reviews {
    color: #666;
    padding: 12px;
}

.wc-product-reviews-loading {
    padding: 16px;
    color: #666;
}

/* Responsive Design */
@media (max-width: 991px) {
    .wc-product-reviews-layout {
        grid-template-columns: 1fr;
    }

    .wc-product-reviews-title {
        font-size: 30px;
    }

    .wcpr-subtitle {
        font-size: 20px;
    }

    .wc-product-review-item {
        flex: 0 0 calc(50% - 8px);
        min-width: 260px;
    }
}

@media (max-width: 768px) {
    .wc-product-reviews-container {
        padding: 14px;
    }

    .wc-product-reviews-title {
        font-size: 24px;
    }

    .wcpr-subtitle {
        font-size: 18px;
    }

    .wc-product-review-author {
        font-size: 20px;
    }

    .wcpr-source {
        font-size: 13px;
    }

    .wcpr-source-icon {
        width: 18px;
        height: 18px;
    }

    .wc-product-review-text {
        font-size: 15px;
    }
}

/* Focus States for Accessibility */
.wc-product-reviews-write-btn:focus,
.wcpr-nav:focus {
    outline: 2px solid #192330;
    outline-offset: 2px;
}

/* Review Modal Styles */
.wc-review-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.wc-review-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.wc-review-modal-content {
    background-color: #fff;
    margin: 20px;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.wc-review-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e0e0e0;
    background: #192330;
    color: white;
    border-radius: 12px 12px 0 0;
}

.wc-review-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.wc-review-modal-close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.2s;
}

.wc-review-modal-close:hover {
    transform: scale(1.2);
}

.wc-review-modal-body {
    padding: 25px;
}

.wc-review-form-group {
    margin-bottom: 20px;
}

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

.wc-review-form-group input[type="text"],
.wc-review-form-group input[type="email"],
.wc-review-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

.wc-review-form-group input:focus,
.wc-review-form-group textarea:focus {
    outline: none;
    border-color: #192330;
    box-shadow: 0 0 0 3px rgba(25, 35, 48, 0.1);
}

.wc-review-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Star Rating Input */
.wc-review-stars-input {
    display: flex;
    flex-direction: row-reverse;
    gap: 5px;
}

.wc-review-stars-input input[type="radio"] {
    display: none;
}

.wc-review-stars-input label {
    font-size: 30px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    user-select: none;
}

.wc-review-stars-input label:hover,
.wc-review-stars-input label:hover ~ label,
.wc-review-stars-input input[type="radio"]:checked ~ label {
    color: #f4c430;
    transform: scale(1.1);
}

.wc-review-stars-input label.selected {
    color: #f4c430;
}

/* Form Actions */
.wc-review-form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    justify-content: flex-end;
}

.wc-review-submit-btn,
.wc-review-cancel-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 120px;
}

.wc-review-submit-btn {
    background: #ffdd26;
    color: #192330;
    border: 2px solid #ffdd26;
}

.wc-review-submit-btn:hover {
    background: #192330;
    color: #ffdd26;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(25, 35, 48, 0.2);
}

.wc-review-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.wc-review-cancel-btn {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e0e0e0;
}

.wc-review-cancel-btn:hover {
    background: #e9ecef;
    color: #495057;
}

/* Modal Open Body */
body.modal-open {
    overflow: hidden;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .wc-review-modal-content {
        width: 95%;
        margin: 10px;
        max-height: 95vh;
    }
    
    .wc-review-modal-header {
        padding: 15px 20px;
    }
    
    .wc-review-modal-header h3 {
        font-size: 18px;
    }
    
    .wc-review-modal-body {
        padding: 20px;
    }
    
    .wc-review-form-actions {
        flex-direction: column;
    }
    
    .wc-review-submit-btn,
    .wc-review-cancel-btn {
        width: 100%;
    }
    
    .wc-review-stars-input label {
        font-size: 25px;
    }
}
