/* includes/reviews_block.php — винесено з inline <style> 20260908_2104 */
:root {
    --white: #ffffff;
    --black: #000000;
    --text-gray: #6b7280;
    --primary-black: #000000;
    --light-gray: #f5f5f5;
}

/* Reviews Section - інтегрований в сторінку товару */
.reviews-section {
    background: transparent;
    border-radius: 0;
    padding: 12px 0 0 0;
    margin: 0;
    box-shadow: none;
    border: none;
}

.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.reviews-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--black);
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.reviews-stats {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reviews-rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rating-stars {
    display: flex;
    gap: 3px;
}

.rating-stars .star-svg {
    width: 18px;
    height: 18px;
    color: #ddd;
    transition: all 0.3s ease;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

.rating-stars .star-svg.filled {
    color: #ffd700;
}

.rating-number {
    font-size: 16px;
    font-weight: 600;
    color: var(--black);
}

.reviews-count {
    font-size: 14px;
    color: var(--text-gray);
}

/* Reviews List */
.reviews-list {
    margin-bottom: 25px;
}

.review-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: box-shadow 0.3s ease;
}

.review-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.review-item:last-child {
    margin-bottom: 0;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.review-author {
    font-weight: 600;
    color: var(--black);
    font-size: 16px;
}

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

.review-rating .star-svg {
    width: 16px;
    height: 16px;
    color: #ddd;
    transition: all 0.3s ease;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

.review-rating .star-svg.filled {
    color: #ffd700;
}

.review-date {
    font-size: 14px;
    color: var(--text-gray);
}

.review-text {
    color: var(--black);
    line-height: 1.6;
    font-size: 15px;
}

/* Розділювач - прибрано для інтеграції в сторінку товару */
.reviews-separator {
    display: none;
}

/* No Reviews */
.no-reviews {
    text-align: center;
    padding: 20px;
    color: var(--text-gray);
    font-style: italic;
    margin-bottom: 25px;
}

/* All Reviews Link */
.all-reviews-link {
    text-align: center;
    margin: 25px 0;
}

.btn-all-reviews {
    display: inline-block;
    padding: 10px 20px;
    background: var(--black);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-all-reviews:hover {
    background: #333;
    text-decoration: none;
    color: var(--white);
    transform: translateY(-2px);
}

/* Add Review Button */
.add-review-section {
    padding-top: 0;
    margin-top: 0;
    text-align: center;
}

.add-review-btn {
    background: var(--black);
    color: var(--white);
    border: none;
    padding: 15px 40px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 300px;
    min-height: 50px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

.add-review-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.add-review-btn:active {
    transform: translateY(0);
    background: var(--black);
}

/* Success/Error Messages */
.review-success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
    animation: slideDown 0.5s ease;
}

.review-error-message {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    animation: slideDown 0.5s ease;
}

.review-error-message p {
    margin: 0 0 5px 0;
}

.review-error-message p:last-child {
    margin-bottom: 0;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Reviews */
@media (min-width: 769px) {
    .review-header {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 0 !important;
        flex-wrap: nowrap !important;
    }
    
    .review-info {
        display: flex !important;
        flex-direction: row !important;
        width: 75% !important;
        gap: 0 !important;
        align-items: center !important;
    }
    
    .review-author {
        width: 50% !important;
        font-size: 15px !important;
        word-wrap: break-word;
        line-height: 1.2;
        text-align: left !important;
    }
    
    .review-date {
        width: 50% !important;
        font-size: 12px !important;
        text-align: left !important;
        white-space: nowrap;
    }
    
    .review-rating {
        width: 25% !important;
        justify-content: flex-end !important;
        margin-left: 0 !important;
        margin-bottom: 0 !important;
    }
}

@media (max-width: 768px) {
    .reviews-section {
        padding: 20px;
        margin: 20px 0;
    }
    
    .reviews-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .reviews-title {
        font-size: 20px;
    }
    
    .review-header {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
        margin-bottom: 10px !important;
    }
    
    .review-info {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        gap: 10px !important;
    }
    
    .review-author {
        font-size: 16px !important;
        font-weight: 600 !important;
        flex: 1 !important;
        text-align: left !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        line-height: 1.2 !important;
    }
    
    .review-date {
        font-size: 12px !important;
        color: var(--text-gray) !important;
        text-align: right !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }
    
    .review-rating {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        width: auto !important;
        margin: 0 !important;
        gap: 4px !important;
    }
    
    .review-text {
        margin-top: 8px !important;
        line-height: 1.6 !important;
        font-size: 15px !important;
    }
    
    .add-review-btn {
        width: 100%;
        max-width: none;
        padding: 18px 30px;
        font-size: 18px;
        min-height: 56px;
    }
}

@media (max-width: 480px) {
    .reviews-section {
        padding: 15px;
        margin: 15px 0;
    }
    
    .rating-stars .star-svg {
        width: 16px;
        height: 16px;
    }
    
    .review-rating .star-svg {
        width: 14px;
        height: 14px;
    }
}
