/* 
 * Estilos para Widget de Avaliações do Google
 * Zurcad Transportes - 2024
 */

.google-reviews-container {
    width: 100%;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.reviews-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.rating-summary {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.rating-stars {
    font-size: 24px;
    margin-bottom: 10px;
    color: #ffd700;
}

.rating-score {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 5px;
}

.rating-count {
    font-size: 14px;
    opacity: 0.9;
}

.reviews-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    margin-top: 30px;
    width: 100%;
    justify-content: center;
    align-items: stretch;
}

.review-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex: 0 0 280px;
    max-width: 320px;
    min-height: 200px;
}

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

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

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

.author-info {
    flex: 1;
}

.author-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 2px;
}

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

.author-badges {
    margin-bottom: 2px;
}

.local-guide-badge {
    background: #4285f4;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 500;
    margin-right: 5px;
}

.review-stats {
    font-size: 11px;
    color: #718096;
}

.review-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.review-like-btn,
.review-share-btn,
.review-more-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #718096;
}

.review-like-btn:hover,
.review-share-btn:hover,
.review-more-btn:hover {
    background-color: #f7fafc;
}

.like-icon,
.share-icon,
.more-icon {
    font-size: 14px;
}

.like-count {
    font-size: 11px;
    color: #718096;
}

/* Controles de Ordenação */
.sort-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.sort-controls label {
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

.sort-select {
    padding: 8px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    color: #2d3748;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.sort-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Controles de Paginação */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.pagination-info {
    font-size: 14px;
    color: #718096;
    font-weight: 500;
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    background: white;
    color: #2d3748;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 40px;
    text-align: center;
}

.pagination-btn:hover {
    background: #f7fafc;
    border-color: #a0aec0;
}

.pagination-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.prev-btn, .next-btn {
    font-weight: 600;
}

/* Responsividade para controles */
@media (max-width: 768px) {
    .pagination-controls {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .pagination-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .sort-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .sort-select {
        width: 100%;
    }
}

.review-rating {
    color: #ffd700;
    font-size: 16px;
}

.review-text {
    color: #4a5568;
    line-height: 1.6;
    font-size: 14px;
}

/* Responsividade */
@media (max-width: 1200px) {
    .reviews-container {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 18px;
    }
}

@media (max-width: 768px) {
    .reviews-container {
        grid-template-columns: 1fr;
        gap: 15px;
        max-width: 100%;
    }
    
    .review-item {
        max-width: 100%;
        padding: 15px;
        min-height: auto;
    }
    
    .rating-summary {
        padding: 15px;
    }
    
    .rating-stars {
        font-size: 20px;
    }
    
    .rating-score {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .google-reviews-container {
        margin: 10px 0;
    }
    
    .reviews-container {
        gap: 10px;
    }
    
    .reviews-grid {
        gap: 10px;
    }
    
    .review-item {
        max-width: 100%;
        padding: 15px;
    }
    
    .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .review-rating {
        align-self: flex-start;
    }
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.review-item {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Estilo para modo escuro (se aplicável) */
@media (prefers-color-scheme: dark) {
    .review-item {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .author-name {
        color: #e2e8f0;
    }
    
    .review-text {
        color: #cbd5e0;
    }
    
    .review-date {
        color: #a0aec0;
    }
}

/* Estilo para impressão */
@media print {
    .google-reviews-container {
        break-inside: avoid;
    }
    
    .review-item {
        box-shadow: none;
        border: 1px solid #ccc;
        margin-bottom: 10px;
    }
}

/* Novos estilos para funcionalidades avançadas */
.search-container {
    margin-bottom: 20px;
}

.search-input-wrapper {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

#search-reviews {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

#search-reviews:focus {
    outline: none;
    border-color: #324673;
    box-shadow: 0 0 0 3px rgba(50, 70, 115, 0.1);
}

.advanced-filters {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.filter-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: end;
}

.filter-item {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.filter-item label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2d3748;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-item select {
    padding: 8px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-item select:focus {
    outline: none;
    border-color: #324673;
    box-shadow: 0 0 0 3px rgba(50, 70, 115, 0.1);
}

/* Estilos para botão de escrever avaliação */
.write-review-btn {
    background: linear-gradient(135deg, #324673 0%, #ff6b35 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(50, 70, 115, 0.3);
    position: relative;
    overflow: hidden;
}

.write-review-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
    transition: left 0.3s ease;
    z-index: -1;
}

.write-review-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(50, 70, 115, 0.4);
}

.write-review-btn:hover::before {
    left: 0;
}

/* Estilos para notificações */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #324673;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 10000;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* Estilos para botões de ação das avaliações */
.review-like-btn.liked {
    background: #ff6b35 !important;
    color: white !important;
    transform: scale(1.1);
}

.review-like-btn:hover {
    background: #f7fafc;
    transform: scale(1.05);
}

.review-share-btn:hover {
    background: #f7fafc;
    transform: scale(1.05);
}

.review-more-btn:hover {
    background: #f7fafc;
    transform: scale(1.05);
}

/* Estilos para destaque de busca */
mark {
    background: #ffeb3b;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

/* Estilos para loading state */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #324673;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Estilos para modo escuro */
@media (prefers-color-scheme: dark) {
    .search-input-wrapper input {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .filter-item select {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .advanced-filters {
        border-top-color: #4a5568;
    }
}

/* Responsividade para filtros avançados */
@media (max-width: 768px) {
    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-item {
        min-width: auto;
        width: 100%;
    }
    
    .search-input-wrapper {
        max-width: 100%;
    }
}

/* Animações de entrada */
.review-item {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estilos para estatísticas melhoradas */
.stats-section {
    position: relative;
    overflow: hidden;
}

.stats-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(30,60,114,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>') repeat;
    opacity: 0.3;
    pointer-events: none;
}

/* Melhorias na responsividade */
@media (max-width: 480px) {
    .rating-filters {
        padding: 15px;
    }
    
    .rating-filter {
        padding: 10px 16px;
        margin: 4px;
        font-size: 13px;
    }
    
    .write-review-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .filter-group {
        gap: 10px;
    }
}
