/**
 * Rocketship SEO Reviews Styles
 * 
 * @package Rocketship_Seo
 * @since 1.0.0
 */

/* Main Reviews Container */
.rocketship-reviews {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
}

/* Error Messages */
.rocketship-reviews-error,
.rocketship-reviews-no-reviews {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 10px 0;
}

/* Grid Layout */
.rocketship-reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* List Layout */
.rocketship-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Carousel Layout */
.rocketship-reviews-carousel {
    position: relative;
    overflow: hidden;
}

.rocketship-reviews-carousel .rocketship-reviews-slider {
    display: flex;
    transition: transform 0.5s ease;
    position: relative;
}

.rocketship-reviews-carousel .rocketship-review-slide {
    flex: 0 0 100%;
    padding: 0 10px;
}

/* Masonry Layout */
.rocketship-reviews-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    grid-auto-rows: masonry;
    gap: 20px;
    align-items: start;
}

/* Testimonial Layout */
.rocketship-reviews-testimonial {
    display: flex;
    flex-direction: column;
    gap: 30px;
    text-align: center;
}

/* Card Layout */
.rocketship-reviews-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

/* Individual Review Item */
.rocketship-review-item {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.rocketship-review-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Review Header */
.rocketship-review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

/* Review Author */
.rocketship-review-author {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
}

/* Star Rating */
.rocketship-review-rating {
    display: flex;
    align-items: center;
}

.rocketship-stars {
    display: inline-flex;
    font-size: 18px;
    line-height: 1;
}

.rocketship-star {
    color: #ffc107;
    margin-right: 2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.rocketship-star-empty {
    color: #e9ecef;
}

.rocketship-star-half {
    background: linear-gradient(90deg, #ffc107 50%, #e9ecef 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Review Date */
.rocketship-review-date {
    color: #6c757d;
    font-size: 14px;
    white-space: nowrap;
}

/* Review Text */
.rocketship-review-text {
    color: #495057;
    margin-bottom: 15px;
    line-height: 1.6;
}

.rocketship-review-text p {
    margin: 0 0 10px 0;
}

.rocketship-review-text p:last-child {
    margin-bottom: 0;
}

/* Review Place */
.rocketship-review-place {
    border-top: 1px solid #e9ecef;
    padding-top: 15px;
    color: #6c757d;
    font-size: 14px;
}

.rocketship-review-place strong {
    color: #495057;
    font-weight: 600;
}

.rocketship-review-place small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
}

/* Slider Navigation */
.rocketship-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
}

.rocketship-slider-prev,
.rocketship-slider-next {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rocketship-slider-prev:hover,
.rocketship-slider-next:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.rocketship-slider-prev {
    margin-left: 10px;
}

.rocketship-slider-next {
    margin-right: 10px;
}

/* Slider Dots */
.rocketship-slider-dots {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 8px;
}

.rocketship-slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rocketship-slider-dot.active {
    background: #007cba;
    transform: scale(1.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .rocketship-reviews-grid {
        grid-template-columns: 1fr;
    }
    
    .rocketship-review-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .rocketship-review-date {
        white-space: normal;
    }
    
    .rocketship-reviews-carousel .rocketship-review-item {
        padding: 0 5px;
    }
}

@media (max-width: 480px) {
    .rocketship-review-item {
        padding: 15px;
    }
    
    .rocketship-review-header {
        margin-bottom: 10px;
    }
    
    .rocketship-stars {
        font-size: 16px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .rocketship-review-item {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .rocketship-review-author {
        color: #f7fafc;
    }
    
    .rocketship-review-text {
        color: #e2e8f0;
    }
    
    .rocketship-review-place {
        border-color: #4a5568;
        color: #a0aec0;
    }
    
    .rocketship-review-place strong {
        color: #f7fafc;
    }
    
    .rocketship-review-place small {
        color: #a0aec0;
    }
    
    .rocketship-reviews-error,
    .rocketship-reviews-no-reviews {
        background: #742a2a;
        color: #f8d7da;
        border-color: #f5c6cb;
    }
}

/* Loading State */
.rocketship-reviews-loading {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.rocketship-reviews-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: rocketship-spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes rocketship-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   STYLE VARIATIONS
   ========================================================================== */

/* Modern Style */
.rocketship-reviews-style-modern .rocketship-review-item {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border: none;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 30px;
    transition: all 0.4s ease;
}

.rocketship-reviews-style-modern .rocketship-review-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.rocketship-reviews-style-modern .rocketship-stars {
    font-size: 20px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Classic Style */
.rocketship-reviews-style-classic .rocketship-review-item {
    background: #ffffff;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 25px;
    position: relative;
}

.rocketship-reviews-style-classic .rocketship-review-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007cba 0%, #0073aa 100%);
    border-radius: 8px 8px 0 0;
}

/* Minimal Style */
.rocketship-reviews-style-minimal .rocketship-review-item {
    background: transparent;
    border: none;
    border-left: 4px solid #007cba;
    border-radius: 0;
    padding: 20px 20px 20px 30px;
    box-shadow: none;
}

.rocketship-reviews-style-minimal .rocketship-review-header {
    margin-bottom: 10px;
}

.rocketship-reviews-style-minimal .rocketship-review-text {
    font-style: italic;
    color: #666;
}

/* Elegant Style */
.rocketship-reviews-style-elegant .rocketship-review-item {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.rocketship-reviews-style-elegant .rocketship-review-text {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 25px;
}

.rocketship-reviews-style-elegant .rocketship-review-author {
    font-weight: 600;
    color: #333;
    font-size: 18px;
}

/* Bold Style */
.rocketship-reviews-style-bold .rocketship-review-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.rocketship-reviews-style-bold .rocketship-review-text {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
}

.rocketship-reviews-style-bold .rocketship-review-author {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.rocketship-reviews-style-bold .rocketship-stars .rocketship-star {
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Testimonial Style Specific */
.rocketship-reviews-style-testimonial .rocketship-review-item {
    text-align: center;
    padding: 40px 30px;
    background: #f9f9f9;
    border-radius: 15px;
    position: relative;
}

.rocketship-reviews-style-testimonial .rocketship-review-quote::before {
    content: '"';
    font-size: 60px;
    color: #007cba;
    position: absolute;
    top: 10px;
    left: 20px;
    font-family: serif;
}

.rocketship-reviews-style-testimonial .rocketship-review-text {
    font-size: 18px;
    font-style: italic;
    line-height: 1.6;
    margin: 20px 0;
}

.rocketship-reviews-style-testimonial .rocketship-review-meta {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e1e1e1;
}

/* Card Style Specific */
.rocketship-reviews-style-card .rocketship-review-item {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.rocketship-reviews-style-card .rocketship-review-card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rocketship-reviews-style-card .rocketship-review-text {
    padding: 25px;
    font-size: 15px;
    line-height: 1.6;
}

.rocketship-reviews-style-card .rocketship-review-footer {
    background: #f8f9fa;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e9ecef;
}

/* ==========================================================================
   GOOGLE-LIKE STYLES
   ========================================================================== */

/* Google Cards Style */
.rocketship-reviews-style-google_cards .rocketship-review-item {
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    display: flex;
    gap: 12px;
    min-height: 120px;
    transition: box-shadow 0.2s ease;
}

.rocketship-reviews-style-google_cards .rocketship-review-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.rocketship-reviews-style-google_cards .rocketship-review-avatar {
    position: relative;
    flex-shrink: 0;
}

.rocketship-reviews-style-google_cards .rocketship-review-avatar img,
.rocketship-reviews-style-google_cards .rocketship-review-avatar-fallback {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1a73e8;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 14px;
}

.rocketship-reviews-style-google_cards .rocketship-google-icon {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: white;
    border-radius: 50%;
    padding: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.rocketship-reviews-style-google_cards .rocketship-review-content {
    flex: 1;
}

.rocketship-reviews-style-google_cards .rocketship-review-author {
    font-size: 14px;
    font-weight: 500;
    color: #202124;
    margin-bottom: 2px;
}

.rocketship-reviews-style-google_cards .rocketship-review-date {
    font-size: 12px;
    color: #5f6368;
    margin-bottom: 8px;
}

.rocketship-reviews-style-google_cards .rocketship-review-rating {
    margin-bottom: 8px;
}

.rocketship-reviews-style-google_cards .rocketship-review-text {
    font-size: 14px;
    line-height: 1.4;
    color: #3c4043;
}

/* Google Slider Style */
.rocketship-reviews-style-google_slider .rocketship-review-item {
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    min-height: 200px;
    display: flex;
    flex-direction: column;
}

.rocketship-reviews-style-google_slider .rocketship-google-icon-header {
    text-align: center;
    margin-bottom: 12px;
}

.rocketship-reviews-style-google_slider .rocketship-review-rating {
    margin-bottom: 16px;
    justify-content: center;
}

.rocketship-reviews-style-google_slider .rocketship-review-text {
    font-size: 14px;
    line-height: 1.5;
    color: #3c4043;
    flex: 1;
    margin-bottom: 16px;
}

.rocketship-reviews-style-google_slider .rocketship-review-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: auto;
}

.rocketship-reviews-style-google_slider .rocketship-review-avatar img,
.rocketship-reviews-style-google_slider .rocketship-review-avatar-fallback {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1a73e8;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 14px;
}

.rocketship-reviews-style-google_slider .rocketship-review-author {
    font-size: 14px;
    font-weight: 500;
    color: #202124;
}

.rocketship-reviews-style-google_slider .rocketship-review-date {
    font-size: 12px;
    color: #5f6368;
}

/* Google Testimonial Style */
.rocketship-reviews-style-google_testimonial .rocketship-review-item {
    background: linear-gradient(135deg, #e8f0fe 0%, #f3f4f6 100%);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.rocketship-reviews-style-google_testimonial .rocketship-review-rating {
    margin-bottom: 16px;
    justify-content: center;
}

.rocketship-reviews-style-google_testimonial .rocketship-google-icon-center {
    text-align: center;
    margin-bottom: 16px;
}

.rocketship-reviews-style-google_testimonial .rocketship-review-text {
    font-size: 16px;
    line-height: 1.6;
    color: #3c4043;
    font-style: italic;
    margin-bottom: 24px;
    flex: 1;
}

.rocketship-reviews-style-google_testimonial .rocketship-review-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.rocketship-reviews-style-google_testimonial .rocketship-review-avatar img,
.rocketship-reviews-style-google_testimonial .rocketship-review-avatar-fallback {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1a73e8;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 16px;
}

.rocketship-reviews-style-google_testimonial .rocketship-review-author {
    font-size: 15px;
    font-weight: 600;
    color: #202124;
}

.rocketship-reviews-style-google_testimonial .rocketship-review-date {
    font-size: 13px;
    color: #5f6368;
}

/* Google List Style */
.rocketship-reviews-style-google_list .rocketship-review-item {
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.rocketship-reviews-style-google_list .rocketship-review-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.rocketship-reviews-style-google_list .rocketship-review-avatar img,
.rocketship-reviews-style-google_list .rocketship-review-avatar-fallback {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1a73e8;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 14px;
}

.rocketship-reviews-style-google_list .rocketship-review-meta {
    flex: 1;
}

.rocketship-reviews-style-google_list .rocketship-review-author {
    font-size: 14px;
    font-weight: 500;
    color: #202124;
}

.rocketship-reviews-style-google_list .rocketship-review-date {
    font-size: 12px;
    color: #5f6368;
}

.rocketship-reviews-style-google_list .rocketship-google-icon-header {
    margin-left: auto;
}

.rocketship-reviews-style-google_list .rocketship-review-rating {
    margin-bottom: 8px;
}

.rocketship-reviews-style-google_list .rocketship-review-text {
    font-size: 14px;
    line-height: 1.5;
    color: #3c4043;
}

/* Read More Functionality */
.rocketship-read-more {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.rocketship-read-more:hover {
    text-decoration: underline;
}

.rocketship-review-text-truncated {
    position: relative;
}

/* Text Truncation for Consistent Heights */
.rocketship-review-text {
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
}

/* Accessibility Improvements */
.rocketship-reviews:focus-within {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.rocketship-carousel-btn:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .rocketship-review-item {
        border-width: 2px;
    }
    
    .rocketship-star {
        text-shadow: none;
    }
    
    .rocketship-carousel-btn {
        border: 2px solid currentColor;
    }
}
