/* AppsBay Google Reviews - Frontend Styles */

.appsbay-reviews-container {
    max-width: 100%;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Reviews Grid Layout */
.appsbay-reviews-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.appsbay-reviews-grid.per-row-1 {
    grid-template-columns: 1fr;
}

.appsbay-reviews-grid.per-row-2 {
    grid-template-columns: repeat(2, 1fr);
}

.appsbay-reviews-grid.per-row-3 {
    grid-template-columns: repeat(3, 1fr);
}

.appsbay-reviews-grid.per-row-4 {
    grid-template-columns: repeat(4, 1fr);
}

.appsbay-reviews-grid.per-row-5 {
    grid-template-columns: repeat(5, 1fr);
}

.appsbay-reviews-grid.per-row-6 {
    grid-template-columns: repeat(6, 1fr);
}

/* Review Card Styles */
.appsbay-review-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(20px);
}

.appsbay-review-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.appsbay-review-card.hover-effect,
.appsbay-review-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #cbd5e0;
}

.appsbay-review-card.focused,
.appsbay-review-card:focus {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
}

.appsbay-review-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0073aa, #005a87);
}

/* Review Header */
.review-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 12px;
}

.author-photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e1e5e9;
}

.author-photo-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
    text-transform: uppercase;
}

.author-info {
    flex: 1;
}

.author-name {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    line-height: 1.2;
}

.review-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.review-rating .stars-container {
    display: flex;
    gap: 2px;
}

.review-rating .star {
    font-size: 16px;
    line-height: 1;
}

.review-rating .star.filled {
    color: #f39c12;
}

.review-rating .star.empty {
    color: #e0e0e0;
}

.review-date {
    font-size: 12px;
    color: #718096;
    font-weight: 500;
}

/* Review Content */
.review-content {
    margin-bottom: 15px;
}

.review-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #4a5568;
}

/* Review Footer */
.review-footer {
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
    margin-top: 15px;
}

.business-name {
    font-size: 12px;
    color: #718096;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Google Reviews Links Section */
.appsbay-google-links-container {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.google-links-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    text-align: center;
}

.appsbay-google-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.appsbay-google-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: #ffffff;
    border: 2px solid #4285f4;
    border-radius: 8px;
    color: #4285f4;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.15);
    position: relative;
    overflow: hidden;
}

.appsbay-google-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.appsbay-google-link:hover {
    background: #4285f4;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 133, 244, 0.4);
    text-decoration: none;
    border-color: #3367d6;
}

.appsbay-google-link:hover::before {
    left: 100%;
}

.appsbay-google-link:active {
    transform: translateY(0);
    box-shadow: 0 3px 12px rgba(66, 133, 244, 0.3);
}

.appsbay-google-link:focus {
    outline: 3px solid rgba(66, 133, 244, 0.3);
    outline-offset: 2px;
}

.google-icon {
    font-size: 18px;
    animation: pulse-glow 3s infinite;
}

@keyframes pulse-glow {
    0% { 
        transform: scale(1);
        filter: brightness(1);
    }
    50% { 
        transform: scale(1.05);
        filter: brightness(1.2);
    }
    100% { 
        transform: scale(1);
        filter: brightness(1);
    }
}

.business-name {
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-arrow {
    transition: transform 0.3s ease;
}

.appsbay-google-link:hover .link-arrow {
    transform: translateX(3px);
}

.appsbay-google-link:hover .business-name {
    color: white;
}

/* No Reviews Message */
.no-reviews {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
    font-size: 16px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin: 20px 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .appsbay-reviews-grid.per-row-4,
    .appsbay-reviews-grid.per-row-5,
    .appsbay-reviews-grid.per-row-6 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .appsbay-reviews-grid.per-row-3,
    .appsbay-reviews-grid.per-row-4,
    .appsbay-reviews-grid.per-row-5,
    .appsbay-reviews-grid.per-row-6 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .appsbay-reviews-grid {
        gap: 15px;
    }
    
    .appsbay-review-card {
        padding: 16px;
    }
    
    .author-photo,
    .author-photo-placeholder {
        width: 40px;
        height: 40px;
    }
    
    .author-photo-placeholder {
        font-size: 16px;
    }
    
    .author-name {
        font-size: 15px;
    }
    
    .review-content p {
        font-size: 13px;
    }
    
    /* Google Links responsive */
    .appsbay-google-links {
        flex-direction: column;
        align-items: center;
    }
    
    .appsbay-google-link {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .business-name {
        max-width: 180px;
    }
}

@media (max-width: 480px) {
    .appsbay-reviews-grid.per-row-2,
    .appsbay-reviews-grid.per-row-3,
    .appsbay-reviews-grid.per-row-4,
    .appsbay-reviews-grid.per-row-5,
    .appsbay-reviews-grid.per-row-6 {
        grid-template-columns: 1fr;
    }
    
    .appsbay-reviews-container {
        margin: 15px 0;
    }
    
    .appsbay-reviews-grid {
        gap: 12px;
    }
    
    .appsbay-review-card {
        padding: 14px;
    }
    
    .review-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    /* Google Links mobile */
    .appsbay-google-links-container {
        margin-top: 20px;
        padding: 15px;
    }
    
    .google-links-title {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .appsbay-google-link {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .business-name {
        max-width: 150px;
    }
}

/* Animation for new reviews */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.appsbay-review-card {
    animation: slideInUp 0.4s ease-out;
}

/* Print Styles */
@media print {
    .appsbay-load-more-container,
    .appsbay-reviews-counter,
    .appsbay-google-links-container {
        display: none;
    }
    
    .appsbay-review-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .appsbay-reviews-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .appsbay-review-card {
        border: 2px solid #000;
    }
    
    .review-rating .star.filled {
        color: #000;
    }
    
    .review-rating .star.empty {
        color: #666;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .appsbay-review-card {
        transition: none;
        animation: none;
    }
    
    .appsbay-review-card:hover {
        transform: none;
    }
    
    .appsbay-load-more-btn:hover {
        transform: none;
    }
    
    .appsbay-loading::after {
        animation: none;
    }
} 