/* Local Business Review Widget - Frontend Styles */

/* Base widget styles */
.lbrw-widget {
    max-width: 600px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Carousel container */
.lbrw-carousel-container {
    position: relative;
    padding: 20px;
}

.lbrw-carousel-track {
    position: relative;
    min-height: 250px;
}

/* Review card */
.lbrw-review-card {
    padding: 20px;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    pointer-events: none;
}

.lbrw-review-card.active {
    opacity: 1;
    transform: translateX(0);
    position: relative;
    pointer-events: auto;
}

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

.lbrw-author-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.lbrw-author-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 20px;
    font-weight: 600;
}

.lbrw-review-meta {
    flex: 1;
    min-width: 0;
}

.lbrw-author-name {
    font-weight: 600;
    font-size: 16px;
    color: #1a1a1a;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Rating stars */
.lbrw-rating {
    display: flex;
    gap: 2px;
}

.lbrw-star {
    font-size: 18px;
    line-height: 1;
}

.lbrw-star-filled {
    color: #fbbf24;
}

.lbrw-star-empty {
    color: #d1d5db;
}

/* Review text */
.lbrw-review-text {
    margin: 15px 0;
    color: #4b5563;
    line-height: 1.6;
}

.lbrw-text-content {
    margin: 0;
    font-size: 15px;
}

.lbrw-read-more {
    color: #667eea;
    background: none;
    border: none;
    padding: 0;
    margin-left: 5px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: underline;
    transition: color 0.2s;
}

.lbrw-read-more:hover {
    color: #5568d3;
}

/* Review time */
.lbrw-review-time {
    font-size: 13px;
    color: #9ca3af;
    margin-top: 10px;
}

/* Navigation buttons */
.lbrw-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
    color: #374151;
}

.lbrw-nav:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
    color: #667eea;
}

.lbrw-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.lbrw-nav-prev {
    left: -15px;
}

.lbrw-nav-next {
    right: -15px;
}

.lbrw-nav svg {
    width: 20px;
    height: 20px;
}

/* Dots indicator */
.lbrw-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.lbrw-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s;
}

.lbrw-dot.active {
    background: #667eea;
    width: 24px;
    border-radius: 4px;
}

.lbrw-dot:hover:not(.active) {
    background: #9ca3af;
}

/* Branding (free version) */
.lbrw-branding {
    padding: 15px 20px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.lbrw-branding a {
    font-size: 13px;
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s;
}

.lbrw-branding a:hover {
    color: #5568d3;
    text-decoration: underline;
}

/* No reviews message */
.lbrw-no-reviews {
    padding: 40px 20px;
}

.lbrw-message {
    text-align: center;
    color: #6b7280;
}

.lbrw-message svg {
    color: #d1d5db;
    margin-bottom: 15px;
}

.lbrw-message p {
    margin: 8px 0;
}

.lbrw-message-hint {
    font-size: 14px;
    color: #9ca3af;
}

/* Free version specific */
.lbrw-free .lbrw-review-card {
    position: relative;
    opacity: 1;
    transform: none;
}

/* Mobile responsive */
@media (max-width: 640px) {
    .lbrw-widget {
        margin: 15px;
        border-radius: 8px;
    }
    
    .lbrw-carousel-container {
        padding: 15px;
    }
    
    .lbrw-review-card {
        padding: 15px;
    }
    
    .lbrw-author-photo {
        width: 40px;
        height: 40px;
    }
    
    .lbrw-author-initials {
        font-size: 16px;
    }
    
    .lbrw-author-name {
        font-size: 15px;
    }
    
    .lbrw-star {
        font-size: 16px;
    }
    
    .lbrw-text-content {
        font-size: 14px;
    }
    
    .lbrw-nav {
        width: 36px;
        height: 36px;
    }
    
    .lbrw-nav-prev {
        left: -10px;
    }
    
    .lbrw-nav-next {
        right: -10px;
    }
    
    .lbrw-nav svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .lbrw-widget {
        margin: 10px;
    }
    
    .lbrw-carousel-container {
        padding: 10px;
    }
    
    .lbrw-review-header {
        gap: 12px;
    }
    
    .lbrw-author-photo {
        width: 36px;
        height: 36px;
    }
    
    .lbrw-nav {
        width: 32px;
        height: 32px;
    }
    
    .lbrw-nav svg {
        width: 16px;
        height: 16px;
    }
}

/* Animation for carousel transitions */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-30px);
    }
}

.lbrw-review-card.sliding-in {
    animation: slideInRight 0.4s ease forwards;
}

.lbrw-review-card.sliding-out {
    animation: slideOutLeft 0.4s ease forwards;
}

/* Print styles */
@media print {
    .lbrw-nav,
    .lbrw-dots,
    .lbrw-branding {
        display: none;
    }
    
    .lbrw-widget {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .lbrw-widget {
        background: #1f2937;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    .lbrw-author-name {
        color: #f9fafb;
    }
    
    .lbrw-review-text {
        color: #d1d5db;
    }
    
    .lbrw-review-time {
        color: #9ca3af;
    }
    
    .lbrw-nav {
        background: rgba(31, 41, 55, 0.95);
        border-color: #374151;
        color: #d1d5db;
    }
    
    .lbrw-nav:hover {
        background: #1f2937;
        border-color: #667eea;
        color: #667eea;
    }
    
    .lbrw-dots {
        border-top-color: #374151;
    }
    
    .lbrw-branding {
        background: #111827;
        border-top-color: #374151;
    }
    
    .lbrw-message {
        color: #9ca3af;
    }
}
