/* ============================================
   The Lab - Product Reviews & Enhancements CSS
   Konak-style product page design
   ============================================ */

/* === Star Rating Summary (near title) === */
.thelab-rating-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 12px;
}
.thelab-stars-inline {
    display: flex;
    align-items: center;
    gap: 2px;
    color: #f5a623;
}
.thelab-star.empty { color: #ccc; }
.thelab-star.filled { color: #f5a623; }
.thelab-review-count-link {
    color: #555;
    font-size: 14px;
    text-decoration: underline;
    transition: color 0.2s;
}
.thelab-review-count-link:hover { color: #000; }
.thelab-review-count-link.thelab-no-reviews { color: #999; }

/* === Delivery Timeline === */
.thelab-delivery-timeline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    margin: 20px 0 10px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}
.thelab-timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}
.thelab-timeline-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f7f7f7;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}
.thelab-timeline-label {
    font-size: 12px;
    font-weight: 600;
    color: #333;
}
.thelab-timeline-date {
    font-size: 11px;
    color: #999;
}
.thelab-timeline-line {
    flex: 1;
    height: 2px;
    background: #ddd;
    margin: 0 8px;
    position: relative;
    top: -12px;
}

/* === Trust Badges === */
.thelab-trust-badges {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px 0;
    margin: 10px 0;
}
.thelab-trust-badge {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
}
.thelab-trust-badge svg {
    flex-shrink: 0;
    color: #333;
    margin-top: 2px;
}
.thelab-trust-badge strong {
    display: block;
    font-size: 13px;
    color: #333;
    line-height: 1.3;
}
.thelab-trust-badge span {
    display: block;
    font-size: 11px;
    color: #888;
    line-height: 1.3;
}

/* === Reviews Container === */
.thelab-reviews-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}
.thelab-reviews-heading {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: center;
}

/* === Reviews Overview (Rating + Breakdown) === */
.thelab-reviews-overview {
    display: flex;
    gap: 40px;
    margin-bottom: 30px;
    padding: 24px;
    background: #fafafa;
    border-radius: 12px;
    border: 1px solid #eee;
}
.thelab-reviews-overview-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 140px;
}
.thelab-big-rating {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    color: #333;
}
.thelab-stars-large {
    display: flex;
    gap: 2px;
    color: #f5a623;
    margin: 8px 0;
}
.thelab-stars-large .thelab-star.empty { color: #ddd; }
.thelab-total-reviews {
    font-size: 13px;
    color: #888;
}
.thelab-reviews-overview-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
}
.thelab-rating-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.thelab-bar-label {
    font-size: 13px;
    width: 36px;
    text-align: right;
    color: #666;
}
.thelab-rating-bar {
    flex: 1;
    height: 10px;
    background: #e9e9e9;
    border-radius: 5px;
    overflow: hidden;
}
.thelab-rating-bar-fill {
    height: 100%;
    background: #f5a623;
    border-radius: 5px;
    transition: width 0.5s ease;
}
.thelab-bar-count {
    font-size: 13px;
    width: 28px;
    text-align: left;
    color: #888;
}

/* === Write Review === */
.thelab-write-review-wrap {
    text-align: center;
    margin: 24px 0;
}
.thelab-btn {
    display: inline-block;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.thelab-btn-write-review {
    background: #333;
    color: #fff;
}
.thelab-btn-write-review:hover {
    background: #555;
}
.thelab-btn-submit {
    background: #333;
    color: #fff;
}
.thelab-btn-submit:hover {
    background: #555;
}
.thelab-btn-cancel {
    background: transparent;
    color: #888;
    border: 1px solid #ddd;
}
.thelab-btn-cancel:hover {
    color: #333;
    border-color: #aaa;
}

/* === Review Form === */
.thelab-review-form-wrap {
    max-width: 600px;
    margin: 0 auto 30px;
    padding: 24px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.thelab-review-form h3 {
    margin: 0 0 20px;
    font-size: 18px;
}
.thelab-form-group {
    margin-bottom: 16px;
}
.thelab-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}
.thelab-form-group label .required {
    color: #e74c3c;
}
.thelab-form-group input[type="text"],
.thelab-form-group input[type="email"],
.thelab-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.thelab-form-group input:focus,
.thelab-form-group textarea:focus {
    border-color: #333;
    outline: none;
}
.thelab-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Star Selector */
.thelab-star-selector {
    display: flex;
    gap: 4px;
    cursor: pointer;
}
.thelab-star-select {
    color: #ddd;
    transition: color 0.15s;
    cursor: pointer;
}
.thelab-star-select.active,
.thelab-star-select.hover {
    color: #f5a623;
    fill: #f5a623;
}
.thelab-star-select.active polygon,
.thelab-star-select.hover polygon {
    fill: #f5a623;
}

/* Photo Upload */
.thelab-photo-upload {
    position: relative;
}
.thelab-photo-upload input[type="file"] {
    font-size: 14px;
}
.thelab-photo-preview {
    position: relative;
    display: inline-block;
    margin-top: 10px;
}
.thelab-photo-preview img {
    max-width: 120px;
    max-height: 120px;
    border-radius: 8px;
    object-fit: cover;
}
.thelab-remove-photo {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e74c3c;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thelab-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}
.thelab-review-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
}
.thelab-review-message.success {
    background: #e8f8ef;
    color: #27ae60;
    border: 1px solid #a3e4bc;
}
.thelab-review-message.error {
    background: #fde8e8;
    color: #e74c3c;
    border: 1px solid #f5b7b7;
}

/* === Review Items === */
.thelab-reviews-list {
    margin-top: 20px;
}
.thelab-review-item {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}
.thelab-review-item:last-child {
    border-bottom: none;
}
.thelab-review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}
.thelab-review-author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.thelab-review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #333;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}
.thelab-review-author {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}
.thelab-verified-badge {
    display: inline-block;
    font-size: 11px;
    color: #27ae60;
    font-weight: 500;
}
.thelab-review-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}
.thelab-review-stars {
    display: flex;
    gap: 1px;
    color: #f5a623;
}
.thelab-review-stars .thelab-star.empty { color: #ddd; }
.thelab-review-date {
    font-size: 12px;
    color: #999;
}
.thelab-review-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 6px;
    color: #333;
}
.thelab-review-content {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}
.thelab-review-photo {
    margin-top: 12px;
}
.thelab-review-photo img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s;
}
.thelab-review-photo img:hover {
    transform: scale(1.05);
}

/* No reviews state */
.thelab-no-reviews-yet {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 15px;
}

/* Login/Purchase notices */
.thelab-login-to-review,
.thelab-purchase-required {
    text-align: center;
    padding: 16px;
    background: #f9f9f9;
    border-radius: 8px;
    color: #666;
    font-size: 14px;
}
.thelab-login-to-review a {
    color: #333;
    font-weight: 600;
}

/* Load More */
.thelab-load-more-wrap {
    text-align: center;
    margin: 24px 0;
}
.thelab-btn-load-more {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}
.thelab-btn-load-more:hover {
    background: #eee;
}

/* === Volume Discount === */
.thelab-volume-discount {
    text-align: center;
    padding: 20px;
    background: #fffbe6;
    border: 1px solid #f0e6b2;
    border-radius: 12px;
    margin: 10px auto 20px;
    max-width: 900px;
}
.thelab-volume-title {
    font-size: 16px;
    margin-bottom: 12px;
}
.thelab-volume-tiers {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
.thelab-tier {
    padding: 8px 16px;
    background: #fff;
    border-radius: 6px;
    font-size: 13px;
    border: 1px solid #e8dca0;
}

/* === FAQ Items (in accordion tabs) === */
.thelab-faq-item {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}
.thelab-faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.thelab-faq-item h4 {
    font-size: 15px;
    margin: 0 0 6px;
    color: #333;
}
.thelab-faq-item p {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* === Responsive === */
@media (max-width: 768px) {
    .thelab-reviews-overview {
        flex-direction: column;
        gap: 20px;
    }
    .thelab-trust-badges {
        grid-template-columns: 1fr;
    }
    .thelab-form-row {
        grid-template-columns: 1fr;
    }
    .thelab-review-header {
        flex-direction: column;
    }
    .thelab-delivery-timeline {
        gap: 4px;
    }
    .thelab-volume-tiers {
        flex-direction: column;
        align-items: center;
    }
}
