/**
 * List Layout - Cleaned and Optimized
 */

/* Main container */
.glowrev-testimonials-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Testimonial item - Compact */
.glowrev-testimonial-list-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

/* Custom layouts in list - inherit default list design and effects */
.glowrev-testimonials-list .glowrev-testimonials-custom .glowrev-testimonial-card {
    background: #fff !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    margin-bottom: 0.75rem !important;
    overflow: hidden !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    position: relative !important;
}

/* Custom layouts in list - inherit quote mark */
.glowrev-testimonials-list .glowrev-testimonials-custom .glowrev-testimonial-card:before {
    content: '\201C' !important;
    position: absolute !important;
    top: 0.5rem !important;
    left: 0.75rem !important;
    font-size: 3rem !important;
    line-height: 1 !important;
    color: #ffc107 !important;
    font-family: Georgia, serif !important;
    z-index: 1 !important;
    opacity: 0.6 !important;
}

/* Compact quote mark */
.glowrev-testimonial-list-item:before {
    content: '\201C';
    position: absolute;
    top: 0.5rem;
    left: 0.75rem;
    font-size: 3rem;
    line-height: 1;
    color: #ffc107;
    font-family: Georgia, serif;
    z-index: 1;
    opacity: 0.6;
}

/* Compact inner grid layout */
.glowrev-testimonial-list-inner {
    display: grid;
    grid-template-columns: 120px 1fr;
    min-height: 120px;
}

/* Media section */
.glowrev-testimonial-list-media {
    background: #f8f9fa;
    min-height: 100%;
    overflow: hidden;
    position: relative;
}

/* Avatar image */
.glowrev-testimonial-avatar {
    height: 100%;
    left: 0;
    object-fit: cover;
    position: absolute;
    top: 0;
    width: 100%;
    border-radius: 0;
}

/* Avatar image fallback handling */
.glowrev-testimonial-avatar img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: 0;
}

/* Default avatar fallback */
.glowrev-default-avatar {
    align-items: center;
    background: linear-gradient(135deg, #f6f9fc 0%, #f0f4f8 100%);
    color: #4a5568;
    display: flex;
    font-size: 3.5rem;
    font-weight: 600;
    height: 100%;
    justify-content: center;
    width: 100%;
    position: relative;
}

.glowrev-default-avatar img {
    border-radius: 50%;
    height: 80px;
    width: 80px;
    object-fit: cover;
}

/* Compact content section */
.glowrev-testimonial-list-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem;
}

/* Compact header section */
.glowrev-testimonial-header {
    margin-bottom: 0.5rem;
    text-align: left;
}

/* Compact author name */
.glowrev-testimonial-author {
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Remove default h3 margins from testimonial author in list layout */
.glowrev-testimonials-list .glowrev-testimonial-author,
.glowrev-testimonials-list h3.glowrev-testimonial-author {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Compact meta fields */
.glowrev-testimonial-company {
    color: #4a5568;
    display: inline;
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0;
}

.glowrev-testimonial-position,
.glowrev-testimonial-designation {
    color: #64748b;
    display: inline;
    font-size: 0.8rem;
    margin: 0;
}

/* Compact testimonial content */
.glowrev-testimonials-list .glowrev-testimonial-list-content {
    border-left: 2px solid #e2e8f0;
    color: #4a5568;
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 3px 0;
    padding: 0;
    padding-left: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow: hidden;
}

/* Compact header/content/rating */
.glowrev-testimonials-list .glowrev-testimonial-header {
    margin-bottom: 0.25rem;
    order: 1;
}

.glowrev-testimonials-list .glowrev-testimonial-content {
    order: 2;
    flex: 1;
}

.glowrev-testimonials-list .glowrev-testimonial-rating {
    order: 3;
    margin-top: 0.25rem;
    font-size: 1.2rem;
}

/* Compact date */
.glowrev-testimonials-list .glowrev-testimonial-date-container {
    margin-top: 0.25rem;
    padding-top: 0.25rem;
    border-top: 1px solid #eee;
    text-align: left;
    order: 4;
}

.glowrev-testimonial-date {
    font-size: 0.75rem;
    color: #95a5a6;
}

/* Compact hover effects */
.glowrev-testimonial-list-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.glowrev-testimonial-avatar {
    transition: transform 0.5s ease;
}

.glowrev-testimonial-list-item:hover .glowrev-testimonial-avatar {
    transform: scale(1.03);
}

/* List Entrance Animation */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.glowrev-testimonial-list-item {
    animation: slideInLeft 0.5s ease-out forwards;
}

.glowrev-testimonial-list-item:nth-child(1) { animation-delay: 0s; }
.glowrev-testimonial-list-item:nth-child(2) { animation-delay: 0.1s; }
.glowrev-testimonial-list-item:nth-child(3) { animation-delay: 0.2s; }
.glowrev-testimonial-list-item:nth-child(4) { animation-delay: 0.3s; }
.glowrev-testimonial-list-item:nth-child(5) { animation-delay: 0.4s; }
.glowrev-testimonial-list-item:nth-child(6) { animation-delay: 0.5s; }

/* Border Accent Animation */
.glowrev-testimonial-list-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #667eea, #764ba2);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.glowrev-testimonial-list-item:hover::before {
    transform: scaleY(1);
}

/* Responsive styles */
@media (max-width: 767px) {
    .glowrev-testimonials-list {
        padding: 0 10px;
    }
    
    .glowrev-testimonial-list-item {
        margin-bottom: 0.5rem;
    }
    
    .glowrev-testimonial-list-inner {
        grid-template-columns: 80px 1fr;
        min-height: 80px;
    }
    
    .glowrev-testimonial-list-media {
        height: 80px;
        min-height: 80px;
    }
    
    .glowrev-testimonial-list-content {
        padding: 0.75rem;
    }
    
    .glowrev-testimonial-author {
        font-size: 1rem;
    }
    
    .glowrev-testimonial-company,
    .glowrev-testimonial-position,
    .glowrev-testimonial-designation {
        font-size: 0.75rem;
    }
    
    .glowrev-testimonials-list .glowrev-testimonial-list-content {
        font-size: 0.85rem;
    }
}

/* RTL support */
.rtl .glowrev-testimonial-list-inner {
    direction: rtl;
    text-align: right;
}
