/* Store Reviews Plugin Styles */

.store-reviews-container {
    margin-bottom: 30px;
}

/* Overall Rating Summary Styles */
.store-reviews-summary {
    background: #fff;
    padding: 0;
    border-radius: 0;
    margin-bottom: 30px;
    box-shadow: none;
    border: none;
}

/* Collapsed view - single line */
.rating-summary-collapsed {
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.rating-summary-line {
    display: flex;
    align-items: center;
    gap: 12px;
}

.summary-stars-display {
    display: flex;
    gap: 4px;
    font-size: 20px;
    color: #ffc107;
}

.summary-review-count {
    font-size: 14px;
    color: #333;
    font-weight: 400;
}

.summary-toggle-btn {
    margin-left: auto;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #666;
    font-size: 14px;
    transition: all 0.3s ease;
}

.summary-toggle-btn:hover {
    color: #333;
}

.summary-toggle-btn i {
    transition: transform 0.3s ease;
    display: inline-block;
}

.summary-toggle-btn.expanded i {
    transform: rotate(180deg);
}

/* Expanded view */
.rating-details-expanded {
    padding: 30px 0 20px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 600px;
    }
}

.rating-expanded-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
}

.rating-star-icon {
    font-size: 48px;
    color: #ffc107;
}

.rating-average-large {
    font-size: 72px;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

.rating-bars-container {
    max-width: 500px;
    margin: 0 auto;
}

.rating-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.rating-stars-label {
    display: flex;
    gap: 2px;
    font-size: 16px;
    color: #ffc107;
    min-width: 100px;
}

.rating-bar-wrapper {
    flex: 1;
}

.rating-bar-track {
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    background: #ffc107;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.rating-count {
    min-width: 60px;
    text-align: right;
    font-size: 14px;
    color: #666;
}

/* Load More Button */
.load-more-reviews {
    padding: 12px 32px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.load-more-reviews:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.load-more-reviews:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.store-review {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.store-review-rating {
    color: #ffc107;
}

.store-review-reply {
    border-left: 4px solid #007bff;
}

.store-review-images img {
    border-radius: 4px;
    transition: transform 0.2s ease-in-out;
}

.store-review-images img:hover {
    transform: scale(1.05);
}

/* Star Rating Styles */
.star-rating {
    font-size: 24px;
    cursor: pointer;
}

.star-rating .star {
    margin-right: 5px;
    color: #ffc107;
    transition: color 0.2s;
}

.star-rating .star:hover,
.star-rating .star.active {
    color: #ffc107;
}

.star-rating .star i {
    transition: font-weight 0.2s;
}

.star-rating .star.active i {
    font-weight: bold;
}

/* Review Form Styles */
.review-images-container {
    margin-top: 10px;
}

.review-images-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.review-image-preview {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.review-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.review-image-preview .remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    color: #dc3545;
    transition: background-color 0.2s;
}

.review-image-preview .remove-image:hover {
    background: rgba(255, 255, 255, 1);
}

/* Modal Styles */
#storeReviewModal .modal-dialog {
    max-width: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100% - 1rem);
}

#storeReviewModal .modal-content {
    margin: 0 auto;
}

#storeReviewModal .form-label {
    font-weight: 600;
}

#storeReviewModal .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Button Styles */
.store-review-btn {
    background-color: #007bff;
    border-color: #007bff;
    padding: 10px 20px;
    font-weight: 600;
    transition: background-color 0.2s, border-color 0.2s;
}

.store-review-btn:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

#add-review-image {
    margin-top: 10px;
}

/* Success/Error Messages */
.store-reviews-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: 500;
}

.store-reviews-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.store-reviews-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Loading Spinner */
.store-reviews-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #007bff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .store-review {
        margin-bottom: 20px;
    }
    
    .store-review-images img {
        max-width: 80px;
        max-height: 80px;
    }
    
    #storeReviewModal .modal-dialog {
        margin: 10px;
    }
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    margin-top: 5%;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
}