/* WooCommerce Reviews Enhancement - Masterseeds.ca Grid Layout */
.wcre-reviews-container {
    max-width: 100%;
    padding: 10px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    border: none;
    font-family: inherit;
}

.wcre-reviews-title {
    font-size: 22px;
    font-weight: bold;
    text-align: center;
	margin: 0 0 10px;
}

/* Grid Layout */
.wcre-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
    align-items: start;
}

/* Left Column: Rating Info & CTA */
.wcre-left-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.wcre-rating-summary {
    padding: 25px;
    border-radius: 4px;
    border: 1px solid #A9988450;
}

.wcre-average-rating {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.wcre-rating-number {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.wcre-rating-stars {
    font-size: 18px;
    color: #ffa500;
    letter-spacing: 2px;
}

.wcre-rating-text {
    font-size: 14px;
    font-weight: 400;
    margin-left: auto;
}

/* CTA Section in Left Column */
.wcre-cta-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(169, 152, 132, 0.08);
    border-radius: 4px;
    border: 1px solid #A9988450;
}

.wcre-cta-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wcre-cta-text strong {
    font-size: 16px;
    color: #242424;
    font-weight: 600;
}

.wcre-cta-text span {
    font-size: 13px;
    color: #666;
    font-weight: 400;
}

.wcre-add-review-btn {
    background: #242424;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
    white-space: nowrap;
    text-align: center;
}

.wcre-add-review-btn:hover {
    background: #333;
    transform: none;
    box-shadow: none;
}

/* Right Column: Rating Filters */
.wcre-right-column .wcre-rating-filters {
    height: 100%;
}

/* Rating Filters - More Compact */
.wcre-star-filters {
    margin-bottom: 15px;
}

.wcre-star-filter-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 7px;
    padding: 5px 10px;
    background: rgba(169, 152, 132, 0.03);
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #A9988450;
    font-size: 12px;
}

.wcre-star-filter-item:hover {
    background: #f0f0f0;
    border-color: #ddd;
}

.wcre-star-filter-item.active {
    background: #f0f9f0;
    border-color: #4CAF50;
}

.wcre-star-label {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 100px;
}

.wcre-star-count {
    font-size: 12px;
    font-weight: 600;
    color: #242424;
    min-width: 60px;
}

.wcre-star-icons {
    font-size: 12px;
    color: #ffa500;
    letter-spacing: 1px;
    width: 55px;	
}

.wcre-bar-container {
    flex: 1;
    height: 5px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    min-width: 60px;
}

.wcre-rating-bar {
    display: block;
    height: 100%;
    background: #4CAF50;
    border-radius: 3px;
    transition: width 0.3s ease;
    min-width: 2px;
}

/* Ensure bars are visible even at 0% */
.wcre-rating-bar[style*="width: 0%"] {
    min-width: 0;
    background: transparent;
}

/* Make bars more visible */
.wcre-star-filter-item:hover .wcre-rating-bar {
    background: #45a049;
}

.wcre-star-filter-item.active .wcre-rating-bar {
    background: #2e7d32;
    box-shadow: 0 0 3px rgba(46, 125, 50, 0.3);
}

.wcre-rating-percentage {
    font-size: 12px;
    font-weight: 600;
    color: #242424;
    min-width: 70px;
    text-align: right;
}

.wcre-rating-count {
    font-size: 11px;
    font-weight: 400;
    color: #666;
    margin-left: 2px;
}

/* Filter Actions */
.wcre-filter-actions {
    text-align: right;
}

.wcre-clear-filters {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    background: #fff;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wcre-clear-filters:hover {
    background: #f5f5f5;
    border-color: #999;
    color: #333;
}

.wcre-clear-icon {
    font-size: 14px;
    line-height: 1;
    font-weight: 300;
}

/* Reviews Header - Match Q&A header style */
.wcre-reviews-header {
    margin-bottom: 25px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.wcre-reviews-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #242424;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
}

.wcre-star-rating {
    font-size: 16px;
    color: #ffa500;
    letter-spacing: 1px;
}

/* Customer Photos - Compact like their product images */
.wcre-customer-photos-section {
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #e2e2e2;
    margin-bottom: 25px;
}

.wcre-customer-photos-section h4 {
    font-size: 15px;
    font-weight: 600;
    color: #242424;
    margin: 0 0 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wcre-photos-count {
    font-size: 13px;
    color: #666;
    font-weight: 500;
    background: #f8f8f8;
    padding: 4px 8px;
    border-radius: 3px;
    border: 1px solid #e2e2e2;
}

/* Gallery Styles - More compact grid */
.wcre-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 8px;
    margin-top: 10px;
    overflow: hidden;
    max-height: 140px;
    transition: max-height 0.3s ease;
}

.wcre-gallery.expanded {
    max-height: 800px;
}

.wcre-review-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 6px;
    margin-top: 12px;
}

.wcre-gallery-item {
    display: block;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid #e2e2e2;
    transition: all 0.2s ease;
    background: #fff;
    aspect-ratio: 1/1;
}

.wcre-gallery-item:hover {
    border-color: #ccc;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.wcre-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Show More Button - Match their button style */
.wcre-show-more-container {
    text-align: center;
    margin: 15px 0 5px;
}

.wcre-show-more-photos {
    background: transparent;
    color: #242424;
    border: 1px solid #ddd;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.2s ease;
    display: inline-block;
}

.wcre-show-more-photos:hover {
    background: #f5f5f5;
    border-color: #999;
}

/* No Photos Message */
.wcre-no-photos {
    padding: 25px 20px;
    text-align: center;
    color: #505050;
    font-style: italic;
    background: #f9f9f9;
    border: 1px dashed #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-top: 10px;
}

/* Reviews List - Match Q&A item style exactly */
.wcre-reviews-list {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
}

.wcre-review {
    border-bottom: 1px solid #A9988450;
    padding: 10px 10px 20px;
    transition: all 0.2s ease;
    position: relative;
    background: transparent;
}

.wcre-review:hover {
    background: rgba(169, 152, 132, 0.08);
}

.wcre-review:last-child {
    border-bottom: none;
    padding-bottom: 10px;
}

.wcre-review:first-child {
    padding-top: 10px;
}

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

.wcre-reviewer-info {
    flex: 1;
    min-width: 0;
}

.wcre-reviewer-name {
    font-size: 15px;
    font-weight: 600;
    color: #242424;
    margin: 0 0 4px 0;
}

.wcre-review-date {
    font-size: 12px;
    color: #707070;
    font-weight: 400;
}

.wcre-review-rating {
    color: #ffa500;
    font-size: 14px;
    margin-left: 15px;
    white-space: nowrap;
    letter-spacing: 1px;
}

.wcre-review-content {
    font-size: 14px;
    line-height: 1.6;
    color: #444;
    margin: 0;
}

/* No Reviews Message */
.wcre-no-reviews {
    text-align: center;
    padding: 40px 30px;
    color: #505050;
    font-style: italic;
    background: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #e2e2e2;
    font-size: 14px;
    margin: 20px 0;
}

/* Pagination - Match their pagination style */
.wcre-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e2e2;
}

.wcre-page-btn {
    padding: 6px 12px;
    border: 1px solid #e2e2e2;
    background: #fff;
    color: #242424;
    cursor: pointer;
    border-radius: 3px;
    font-size: 13px;
    min-width: 36px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.wcre-page-btn:hover,
.wcre-page-btn.active {
    background: #242424;
    color: #fff;
    border-color: #242424;
}

.wcre-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Star Icons */
.wcre-star-icon {
    display: inline-block;
    position: relative;
}

.wcre-star-icon.wcre-star-full {
    color: #ffa500;
}

.wcre-star-icon.wcre-star-empty {
    color: #ddd;
}

.wcre-star-icon.wcre-star-half:after {
    content: '☆';
    position: absolute;
    left: 0;
    width: 50%;
    overflow: hidden;
    color: #ddd;
}

/* Modal Styles - More compact */
.wcre-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.wcre-modal-content {
    margin: 5% auto;
    padding: 30px;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    width: 90%;
    max-width: 500px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid #A99884;
	background-color: #ffffff!important;
	background:  repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.015) 0px, rgba(0, 0, 0, 0.015) 1px, transparent 3px, transparent 4px); 
}

.wcre-close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
    background: none;
    border: none;
    padding: 0;
}

.wcre-close-modal:hover {
    color: #242424;
}

.wcre-modal-content h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 10px 0;
    padding: 0;
    border: none;
}

.wcre-form-group {
    margin-bottom: 10px;
}

.wcre-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.wcre-star-rating-input {
    display: flex;
    gap: 6px;
    margin-bottom: 0px;
	margin-left: auto;
}

.wcre-star-rating-input span {
    font-size: 26px;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.wcre-star-rating-input span.selected,
.wcre-star-rating-input span:hover {
    color: #ffa500;
    transform: none;
}

.wcre-form-group input[type="text"],
.wcre-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e2e2;
    border-radius: 3px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s ease;
    background: #fff;
    box-sizing: border-box;
}

.wcre-form-group input[type="text"]:focus,
.wcre-form-group textarea:focus {
    outline: none;
    border-color: #999;
}

.wcre-form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.wcre-photo-upload-area {
    border: 2px dashed #e2e2e2;
    padding: 20px;
    text-align: center;
    border-radius: 3px;
    background: #f9f9f9;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.wcre-photo-upload-area:hover {
    border-color: #999;
    background: #f5f5f5;
}

.wcre-photo-upload-area p {
    margin: 0 0 5px 0;
    font-size: 13px;
}

.wcre-photo-upload-area input[type="file"] {
    width: 80%;
    padding: 10px;
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 3px;
    font-size: 13px;
    cursor: pointer;
}

.wcre-photo-count {
    color: #666;
    font-size: 13px;
    padding-left: 8px;
    font-weight: 500;
}

.wcre-submit-review {
    background: #242424;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 3px;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s ease;
    letter-spacing: 0.3px;
    margin-top: 10px;
}

.wcre-submit-review:hover {
    background: #333;
}

.wcre-submit-review:disabled {
    background: #999;
    cursor: not-allowed;
}

.wcre-submit-review.wcre-success-btn {
    background: #4CAF50;
}

/* Helper feedback */
.wcre-success {
    color: #2e7d32;
    background: #f0f9f0;
    border-left: 3px solid #2e7d32;
    padding: 10px 12px;
    border-radius: 3px;
    margin-bottom: 15px;
    font-size: 14px;
}

.wcre-error {
    color: #d32f2f;
    margin-top: 6px;
    font-size: 12px;
    display: block;
}

/* Loading states */
.wcre-reviews-list.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
    min-height: 100px;
}

.wcre-reviews-list.loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #242424;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */

/* For tablets and below (1024px and below) - Switch to single column ONLY */
@media (max-width: 1024px) {
    .wcre-grid-layout {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .wcre-left-column,
    .wcre-right-column {
        width: 100%;
    }
}

/* For mobile (768px and below) - Only adjust layout, NOT filter design */
@media (max-width: 768px) {
    /* Just make CTA button full width */
    .wcre-cta-section {
        flex-direction: column;
        gap: 15px;
    }
    
    .wcre-add-review-btn {
        width: 100%;
    }
    
    /* Reviews layout */
    .wcre-review-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .wcre-review-rating {
        margin-left: 0;
        align-self: flex-start;
    }
    
    /* Modal adjustments */
    .wcre-modal-content {
        padding: 25px 20px;
        margin: 10% auto;
        width: 95%;
    }
    
    /* Gallery adjustments */
    .wcre-gallery {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
        gap: 6px;
    }
    
    .wcre-review-gallery {
        grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
        gap: 5px;
    }
}

/* For small phones (480px and below) - Only adjust padding */
@media (max-width: 480px) {
    .wcre-rating-summary,
    .wcre-cta-section,
    .wcre-right-column .wcre-rating-filters,
    .wcre-customer-photos-section {
        padding: 15px;
    }
    
    .wcre-rating-number {
        font-size: 26px;
    }
    
    .wcre-gallery {
        grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
    }
    
    .wcre-modal-content {
        padding: 20px 15px;
        width: 88%;		
    }
	
	.wcre-grid-layout {
		display: block;
	}
	
	.wcre-left-column {
        gap: 10px;
        text-align: center;
	}
	
    .wcre-average-rating {
        display: block;
	}  
	
	.wcre-bar-container {
		min-width: 0;
	}
	.wcre-rating-percentage {
		min-width: 50px;
	}
}