/**
 * Product Review Card Styles
 * For Merch Builder Plugin
 */

/* Container */
.review-card-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Main Card */
.review-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

/* Header Section */
.review-card-header {
    display: flex;
    justify-content: space-between;
    align-items: anchor-center;
    margin-bottom: 1.6rem;
    gap: 2rem;
}

.review-card-brand {
    flex-shrink: 0;
}

.review-card-logo {
    width: auto;
    max-width: 250px;
    object-fit: contain;
}

.review-card-logo-text {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

/* Overall Score Section */
.review-card-score-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 2px solid black;
    background: #F7F6EC;
    padding: .8rem 2rem;
    border-radius: 1.5rem;
}

.review-card-score-number {
    font-size: 3rem;
    font-weight: 700;
    color: #111827;
    line-height: 1;
}

.review-card-score-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.review-card-score-label {
    font-size: 0.875rem;
    color: #120808;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.review-card-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    font-size: 0.75rem;
    color: #6b7280;
}

/* Star Rating */
.review-card-stars {
    display: flex;
    align-items: center;
    gap: 0.125rem;
}

.review-card-star {
    font-size: 1rem;
    line-height: 1;
}

.review-card-star-full {
    color: #FF4D37;
}

.review-card-star-half {
    background: linear-gradient(90deg, #FF4D37 50%, #d1d5db 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.review-card-star-empty {
    color: #d1d5db;
}

.review-card-star-score {
    margin-left: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

/* Content Section */
.review-card-content {
    display: flex;
    gap: 3rem;
    margin-bottom: 1.5rem;
}

.review-card-left {
    flex: 1;
    min-width: 0;
}

.review-card-right {
    width: 280px;
    flex-shrink: 0;
    flex-basis: content;
}

/* Section */
.review-card-section {
    margin-bottom: 1.5rem;
}

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

.review-card-section-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #111827;
    margin: 0 0 0.75rem 0;
}

.review-card-overview-text {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #374151;
    margin: 0;
}

/* Tags */
.review-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.review-card-tag {
    display: inline-block;
    padding: 0.75rem 0.75rem;
    background: #f3f4f6;
    color: #374151;
    font-size: 0.875rem;
    border-radius: 0.25rem;
    line-height: 1.2;
}

/* Category Ratings */
.review-card-ratings {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 1rem;
}

.review-card-rating-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.review-card-rating-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    flex-shrink: 0;
}

.review-card-rating-value {
    flex-shrink: 0;
}

/* CTA Section */
.review-card-cta-section {
    margin-bottom: 1.5rem;
}

.review-card-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: #FF4D37;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    width: 33%;
}

.review-card-cta:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    color: white;
}

.review-card-arrow {
    font-size: 1.25rem;
    line-height: 1;
}

/* Footer */
.review-card-footer {
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    text-align: -webkit-center;
}

.review-card-details-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #0073e6;
    text-decoration: none;
    transition: color 0.2s;
}

.review-card-details-link:hover {
    color: #0052b3;
}

.review-card-chevron {
    width: 1rem;
    height: 1rem;
    stroke-width: 2;
}

/* Error State */
.merch-builder-error {
    padding: 1rem;
    background: #fee;
    border: 1px solid #fcc;
    color: #c00;
    border-radius: 0.5rem;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .review-card {
        padding: 1.5rem;
    }
    
    .review-card-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .review-card-score-section {
        align-self: anchor-center;
    }
    
    .review-card-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .review-card-right {
        width: 100%;
    }
    
    .review-card-logo-text {
        font-size: 1.5rem;
    }
    
    .review-card-score-number {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .review-card-container {
        padding: 0px;
    }
    
    .review-card {
        padding: 1rem;
    }
    
    .review-card-rating-row {
        flex-direction: row;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .review-card-cta {
        width: 100%;
    }
}

/**
 * Review Card Info Icon Tooltip
 */

/* Info icon container */
.review-card-info-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Info icon button */
.review-card-info-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #f0f0f0;
    border: 1px solid #d0d0d0;
    color: #666;
    font-size: 12px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
}

.review-card-info-icon:hover {
    background-color: #e0e0e0;
    border-color: #999;
    color: #333;
}

/* Tooltip modal */
.review-card-info-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 400px;
    max-width: 400px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 1000;
    pointer-events: none;
}

/* Show tooltip on hover */
.review-card-info-icon:hover .review-card-info-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Tooltip arrow */
.review-card-info-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50.2%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
}

.review-card-info-tooltip::before {
content: '';
    position: absolute;
    top: 100%;
    left: 28.5%;
    transform: translateX(430%);
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 9px solid #d0d0d0;
    margin-top: 1px;
    z-index: -1;
}

/* Tooltip content */
.review-card-info-tooltip-content {
    font-size: 13px;
    line-height: 1.5;
    color: #333;
    text-align: left;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .review-card-info-tooltip {
        min-width: 400px;
        max-width: 280px;
        font-size: 12px;
        bottom: calc(-800% + 10px);
        left: -430%;
    }

    .review-card-info-tooltip::before {
    top: -9%;
    left: 50%;
    border-bottom: 9px solid #d0d0d0;
    border-top: none;
}

.review-card-info-tooltip::after {
    top: -7%;
    left: 71.8%;
    border-bottom: 8px solid #fff;
    border-top: none;
}
    
    /* On mobile, position to the right if near left edge */
    .review-card-info-wrapper.mobile-right .review-card-info-tooltip {
        left: 0;
        transform: translateX(0);
    }
    
    .review-card-info-wrapper.mobile-right .review-card-info-tooltip::after,
    .review-card-info-wrapper.mobile-right .review-card-info-tooltip::before {
        left: 20px;
    }
}

/* Alternative: Position to the side instead of top */
.review-card-info-tooltip.tooltip-right {
    bottom: auto;
    top: 50%;
    left: calc(100% + 10px);
    transform: translateY(-50%);
}

.review-card-info-tooltip.tooltip-right::after {
    top: 50%;
    left: -8px;
    transform: translateY(-50%);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid white;
    border-left: none;
}

.review-card-info-tooltip.tooltip-right::before {
    top: 50%;
    left: -9px;
    transform: translateY(-50%);
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-right: 9px solid #d0d0d0;
    border-left: none;
    margin-top: 0;
}