/**
 * Common styles for all testimonial layouts
 */

/* Base styles */
.glowrev-testimonials {
    margin: 0.625 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: #333;
    box-sizing: border-box;
}

.glowrev-testimonial-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 0.625;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.glowrev-testimonial-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Testimonial header */
.glowrev-testimonial-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.glowrev-testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 1rem;
    border: 3px solid #f5f5f5;
}

.glowrev-default-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    overflow: hidden;
}

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

.glowrev-testimonial-meta {
    flex: 1;
}

.glowrev-testimonial-author {
    font-weight: 700;
    font-size: 2.1rem;
    margin: 10px auto !important;
    color: #2c3e50;
    line-height: 1.3;
}

/* Ensure testimonial name margins are applied with higher specificity */
.glowrev-testimonials .glowrev-testimonial-item .glowrev-testimonial-header .glowrev-testimonial-meta .glowrev-testimonial-author,
.glowrev-testimonials-grid .glowrev-testimonial-author,
.glowrev-testimonials-list .glowrev-testimonial-author,
.glowrev_testimonials-slider .glowrev_testimonial-author {
    margin-top: 10px !important;
    margin-bottom: 10px !important;
}

/* Override any conflicting margin styles */
.glowrev-testimonial-author {
    margin-top: 10px !important;
    margin-bottom: 10px !important;
}

/* Maximum specificity rules for author name margins */
.glowrev-testimonials .glowrev-testimonial-item .glowrev-testimonial-header .glowrev-testimonial-meta .glowrev-testimonial-author,
.glowrev-testimonials-grid .glowrev-testimonial-item .glowrev-testimonial-header .glowrev-testimonial-meta .glowrev-testimonial-author,
.glowrev-testimonials-list .glowrev-testimonial-item .glowrev-testimonial-header .glowrev-testimonial-meta .glowrev-testimonial-author,
.glowrev_testimonials-slider .glowrev_testimonial-item .glowrev_testimonial-header .glowrev_testimonial_meta .glowrev_testimonial-author,
body .glowrev-testimonials .glowrev-testimonial-author,
body .glowrev-testimonials-grid .glowrev-testimonial-author,
body .glowrev-testimonials-list .glowrev-testimonial-author,
body .glowrev_testimonials-slider .glowrev_testimonial-author {
    margin-top: 10px !important;
    margin-bottom: 10px !important;
}

/* Consistent margins for all testimonial fields */
.glowrev-testimonial-image,
.glowrev-testimonial-author,
.glowrev-testimonial-company,
.glowrev-testimonial-designation,
.glowrev-testimonial-position {
    margin-top: 10px !important;
    margin-bottom: 10px !important;
}

/* Higher specificity for all layout types */
.glowrev-testimonials .glowrev-testimonial-item .glowrev-testimonial-image,
.glowrev-testimonials .glowrev-testimonial-item .glowrev-testimonial-header .glowrev-testimonial-meta .glowrev-testimonial-author,
.glowrev-testimonials .glowrev-testimonial-item .glowrev-testimonial-header .glowrev-testimonial-meta .glowrev-testimonial-company,
.glowrev-testimonials .glowrev-testimonial-item .glowrev-testimonial-header .glowrev-testimonial-meta .glowrev-testimonial-designation,
.glowrev-testimonials .glowrev-testimonial-item .glowrev-testimonial-header .glowrev-testimonial-meta .glowrev-testimonial-position,
.glowrev-testimonials-grid .glowrev-testimonial-image,
.glowrev-testimonials-grid .glowrev-testimonial-author,
.glowrev-testimonials-grid .glowrev-testimonial-company,
.glowrev-testimonials-grid .glowrev-testimonial-designation,
.glowrev-testimonials-grid .glowrev-testimonial-position,
.glowrev-testimonials-list .glowrev-testimonial-image,
.glowrev-testimonials-list .glowrev-testimonial-author,
.glowrev-testimonials-list .glowrev-testimonial-company,
.glowrev-testimonials-list .glowrev-testimonial-designation,
.glowrev-testimonials-list .glowrev-testimonial-position,
.glowrev_testimonials-slider .glowrev_testimonial-image,
.glowrev_testimonials-slider .glowrev_testimonial-author,
.glowrev_testimonials-slider .glowrev_testimonial-company,
.glowrev_testimonials-slider .glowrev_testimonial-designation,
.glowrev_testimonials-slider .glowrev_testimonial-position {
    margin-top: 10px !important;
    margin-bottom: 10px !important;
}

.glowrev-testimonial-company,
.glowrev-testimonial-position {
    display: block;
    font-size: 0.9rem;
    color: #7f8c8d;
    line-height: 1.4;
}

.glowrev-testimonial-company {
    font-weight: 600;
    color: #3498db;
    margin-top: 5px;
    margin-bottom: 5px;
}

/* Testimonial content */
.glowrev-testimonial-content {
    font-size: 1rem;
    line-height: 1.7;
    color: #555;
    margin: 0.25rem 0;
}

.glowrev-testimonial-content p:last-child {
    margin-bottom: 0;
}

/* Rating */
.glowrev-testimonial-rating {
    color: #f1c40f;
    margin: 0.25rem 0;
    font-size: 3rem;
    letter-spacing: 2px;
}

.glowrev-testimonial-rating .dashicons {
    margin-right: 2px;
}

/* Date */
.glowrev-testimonial-date {
    display: block;
    font-size: 0.85rem;
    color: #95a5a6;
    margin-top: 1rem;
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .glowrev-testimonial-item {
        padding: 1.5rem;
    }
    
    .glowrev-testimonial-avatar {
        width: 50px;
        height: 50px;
    }
    
    .glowrev-testimonial-content {
        font-size: 0.95rem;
    }
}

/* FINAL OVERRIDE - Force 10px margins for author name */
.glowrev-testimonial-author,
.glowrev-testimonials .glowrev-testimonial-author,
.glowrev-testimonials-grid .glowrev-testimonial-author,
.glowrev-testimonials-list .glowrev-testimonial-author,
.glowrev_testimonials-slider .glowrev_testimonial-author,
div.glowrev-testimonial-author,
span.glowrev-testimonial-author,
h3.glowrev-testimonial-author,
h4.glowrev-testimonial-author {
    margin-top: 10px !important;
    margin-bottom: 10px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Remove default h4 margins from testimonial name in all layouts */
.glowrev-testimonial-name,
.glowrev_testimonial-name,
.glowrev-testimonials-grid .glowrev-testimonial-name,
.glowrev_testimonials-slider .glowrev_testimonial-name,
.glowrev-testimonials-list .glowrev-testimonial-name,
h4.glowrev-testimonial-name,
h4.glowrev_testimonial-name {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

/* No testimonials message */
.glowrev-no-testimonials {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    color: #7f8c8d;
    font-style: italic;
}

/* Responsive margin fixes for author name */
@media (max-width: 1200px) {
    .glowrev-testimonial-author {
        margin-top: 10px !important;
        margin-bottom: 10px !important;
    }
}

@media (max-width: 992px) {
    .glowrev-testimonial-author {
        margin-top: 10px !important;
        margin-bottom: 10px !important;
    }
}

@media (max-width: 768px) {
    .glowrev-testimonial-author {
        margin-top: 10px !important;
        margin-bottom: 10px !important;
    }
}

@media (max-width: 480px) {
    .glowrev-testimonial-author {
        margin-top: 10px !important;
        margin-bottom: 10px !important;
    }
}
