/**
 * Show Reviews CSS
 * Minimalistic styles for review display with modal functionality
 */

/* =================================================================
   Base Styles (min-width: 320px - Mobile First)
   ================================================================= */

.reviews-container {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    justify-content: center;
    margin:0 auto;
    max-width:360px;
}

/* Individual review item */
.reviews-container .review-item {
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    width:48%;
}

.reviews-container .review-item-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 10px 0px;
    position: relative;
    gap: 10px;
}

/*.reviews-container .review-item:hover,
.reviews-container .review-item:focus {
    border-color: #007cba;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.15);
    transform: translateY(-2px);
    outline: none;
}*/

/*.reviews-container .review-item:focus {
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.5);
}*/

/* Review icon */
.reviews-container .review-icon {
    width: 17px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left:4px;
}

.reviews-container .review-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    height:35px;
}

/* Review content */
.reviews-container .review-content {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    flex-wrap: wrap;
    
}

#top #wrap_all .reviews-container .review-title {
    font-size: 14px;;
    font-weight: 600;
    margin: 0;
    color: #333;
    line-height: 1.3;
    text-align: left;
}

.reviews-container .review-score {
    font-size: 18px;
    font-weight: 700;
    color: var(--blue);
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 5px;
    width:100%;
}

/* Star rating styles */
.reviews-container .review-stars {
    display: flex;
    gap: 2px;
}

.reviews-container .review-stars .star {
    width: 12px;
    height: 12px;
    position: relative;
}

.reviews-container .review-stars .star svg {
    width: 100%;
    height: 100%;
    fill: #ddd; /* Default empty star color */
}

.reviews-container .review-stars .star.full svg {
    fill: #FFB800; /* Gold color for filled stars */
}

.reviews-container .review-stars .star.half {
    position: relative;
    overflow: hidden;
}

.reviews-container .review-stars .star.half::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: #FFB800;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E") no-repeat 50% 50%;
    mask-size: 200% 100%;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E") no-repeat 50% 50%;
    -webkit-mask-size: 200% 100%;
}

.reviews-container .review-count {
    font-size: 0.875rem;
    color: #666;
    margin: 0;
    display: none;
}

/* Arrow icon */
.reviews-container .review-arrow {
    margin-left: auto;
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.4s ease;
}

.reviews-container .review-arrow svg {
    fill: currentColor;
}

.reviews-container .review-item.is-visible .review-arrow {
    opacity: 0.4;
    transform: translateX(0);
}

.reviews-container .review-item:hover .review-arrow {
    opacity: 1;
    transform: translateX(2px);
}

/* Hidden popup content */
.review-popup-content {
    display: none !important;
}

/* =================================================================
   Modal Styles
   ================================================================= */

.reviews-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
}

.reviews-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.modal-content {
    position: relative;
    background: #fff;
    border-radius: 8px;
    max-width: 90vw;
    max-height: 80vh;
    margin: auto;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    color: #666;
    border-radius: 4px;
    transition: all 0.2s ease;
    z-index: 1;
}

.modal-close:hover,
.modal-close:focus {
    background: #e5e5e5;
    color: #333;
    outline: none;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-body p:first-child {
    margin-top: 0;
}

.modal-body p:last-child {
    margin-bottom: 0;
}

/* =================================================================
   Tablet Styles (min-width: 768px)
   ================================================================= */

@media (min-width: 768px) {
    .reviews-container {
        gap: 1.5rem;
        padding: 1.5rem 0;
        justify-content: flex-start;
        max-width:unset;
    }
    
    .reviews-container .review-item {
        flex:unset;
        padding:10px 0px;
    }
    .reviews-container .review-icon{
        justify-content: flex-start;
    }
    
    .modal-content {
        max-width: 600px;
    }
    
    .modal-body {
        padding: 2rem;
    }
}

/* =================================================================
   Desktop Small Styles (min-width: 990px)
   ================================================================= */

@media (min-width: 990px) {
    
    .reviews-container .review-item {
        width:175px;
        justify-content: center;
    }
    
    .reviews-container .review-stars .star {
        width: 18px;
        height: 18px;
    }
    
    .modal-content {
        max-width: 700px;
    }
}

/* =================================================================
   Desktop Large Styles (min-width: 1280px)
   ================================================================= */

@media (min-width: 1280px) {
    .reviews-container {
       
    }
    
    .reviews-container .review-item {
        

    }

    
    .modal-content {
        max-width: 800px;
        max-height: 85vh;
    }
    
    .modal-body {
        padding: 2.5rem;
    }
    
    .modal-close {
        font-size: 1.75rem;
        padding: 0.75rem;
        top: 1.5rem;
        right: 1.5rem;
    }
}

/* =================================================================
   Animation Styles
   ================================================================= */

/* Modal fade-in animation */
.reviews-modal.active {
    animation: modalFadeIn 0.3s ease-out;
}

.reviews-modal.active .modal-content {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .reviews-container .review-item {
        transition: none;
    }
    
    .reviews-modal.active,
    .reviews-modal.active .modal-content {
        animation: none;
    }
}

/* Print styles */
@media print {
    .reviews-modal {
        display: none !important;
    }
    
    .reviews-container .review-item:hover,
    .reviews-container .review-item:focus {
        transform: none;
        box-shadow: none;
    }
} 