﻿/* Reviews Widget Styles */

.reviews-widget-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 28px 20px;
}

/* Filter Tabs */
.reviews-filter-tabs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.reviews-filter-tab {
    padding: 8px 18px;
    border: 2px solid #e0e0e0;
    background: #ffffff;
    color: #333333;
    font-size: 13px;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reviews-filter-tab:hover {
    border-color: #007bff;
    color: #007bff;
}

.reviews-filter-tab.active {
    background-color: #007bff;
    border-color: #007bff;
    color: #ffffff;
}

/* Overall Rating */
.reviews-overall-rating {
    text-align: center;
    margin-bottom: 28px;
}

.reviews-rating-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.reviews-rating-score .rating-number {
    font-size: 38px;
    font-weight: 700;
    color: #333333;
    line-height: 1;
}

.reviews-rating-stars {
    display: flex;
    gap: 4px;
}

.reviews-rating-score .rating-count {
    font-size: 14px;
    color: #999999;
}

.reviews-rating-breakdown {
    display: flex;
    gap: 22px;
    justify-content: center;
    flex-wrap: wrap;
}

.platform-rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.platform-logo {
    height: 20px;
    width: auto;
}

.platform-score {
    font-size: 15px;
    font-weight: 600;
    color: #333333;
}

.platform-count {
    font-size: 14px;
    color: #999999;
}

/* Carousel */
.reviews-carousel {
    position: relative;
    margin-bottom: 28px;
}

.reviews-carousel .swiper-container {
    overflow: hidden;
    padding: 10px 0;
}

.reviews-carousel .swiper-wrapper {
    display: flex;
}

.reviews-carousel .swiper-slide {
    height: auto;
    align-self: stretch;
}

.reviews-carousel .swiper-slide:has(.review-card.is-expanded) {
    height: auto !important;
    align-self: flex-start;
}

.reviews-slide-stash {
    display: none !important;
}

.reviews-carousel-empty {
    margin: 0;
    padding: 32px 16px;
    text-align: center;
    color: #666666;
    font-size: 15px;
}

/* Review Card */
.review-card {
    --review-accent: #007bff;
    --review-expanded-max-h: min(240px, 52vh);
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #fcfafb 100%);
    border: 1px solid rgba(0, 123, 255, 0.1);
    border-radius: 14px;
    padding: 18px 18px 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 6px 18px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    overflow: hidden;
}

.review-card.is-expanded {
    height: auto;
    overflow: visible;
}

.review-card::before {
    content: '\201C';
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 2.75rem;
    line-height: 1;
    color: rgba(0, 123, 255, 0.07);
    font-family: Georgia, 'Times New Roman', serif;
    pointer-events: none;
}

.review-card::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--review-accent);
    border-radius: 14px 0 0 14px;
}

.review-card--google {
    --review-accent: #4285f4;
}

.review-card--tripadvisor {
    --review-accent: #00af87;
}

.review-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 123, 255, 0.18);
    box-shadow:
        0 2px 4px rgba(15, 23, 42, 0.05),
        0 10px 28px rgba(15, 23, 42, 0.1);
}

.review-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-right: 28px;
}

.review-card-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 3px rgba(0, 123, 255, 0.12);
}

.review-card-info {
    flex: 1;
    min-width: 0;
}

.review-card-name {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}

.review-card-platform {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    background: rgba(15, 23, 42, 0.04);
    border-radius: 999px;
}

.review-card-platform .platform-icon {
    height: 14px;
    width: auto;
}

.review-card-rating {
    display: flex;
    gap: 3px;
    margin-bottom: 12px;
}

.review-star {
    width: 16px;
    height: 16px;
}

.review-star.filled {
    fill: #f59e0b;
}

.review-star.empty {
    fill: #e2e8f0;
}

.review-card-content {
    flex: 1;
    font-size: 13px;
    line-height: 1.6;
    color: #475569;
    margin-bottom: 8px;
    min-width: 0;
}

.review-card-content__inner {
    position: relative;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
}

.review-card:not(.is-expanded) .review-card-content__inner::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1.75em;
    background: linear-gradient(to bottom, rgba(252, 250, 251, 0), #fcfafb 88%);
    pointer-events: none;
}

.review-card.is-expanded .review-card-content__inner {
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: var(--review-expanded-max-h);
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 123, 255, 0.35) transparent;
    padding-right: 4px;
}

.review-card.is-expanded .review-card-content__inner::-webkit-scrollbar {
    width: 5px;
}

.review-card.is-expanded .review-card-content__inner::-webkit-scrollbar-thumb {
    background: rgba(0, 123, 255, 0.35);
    border-radius: 999px;
}

.review-card.is-expanded .review-card-content__inner::-webkit-scrollbar-track {
    background: transparent;
}

.review-card.is-expanded .review-card-content__inner::after {
    display: none;
}

.review-card-content__inner p {
    margin: 0 0 0.5em;
}

.review-card-content__inner p:last-child {
    margin-bottom: 0;
}

.review-card-read-more {
    display: inline-flex;
    align-items: center;
    margin-top: 8px;
    padding: 5px 12px;
    border: 1px solid rgba(0, 123, 255, 0.3);
    border-radius: 999px;
    background: transparent;
    color: #007bff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.review-card-read-more:hover,
.review-card-read-more:focus-visible {
    background: rgba(0, 123, 255, 0.06);
    border-color: #007bff;
    color: #6d1627;
    outline: none;
}

.review-card-footer {
    border-top: 0;
    padding-top: 10px;
    margin-top: auto;
}

.review-card-date {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
}

/* Navigation Arrows */
.reviews-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    color: #333333;
}

.reviews-nav-arrow:hover {
    background: #007bff;
    border-color: #007bff;
    color: #ffffff;
}

.reviews-nav-arrow:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.reviews-nav-arrow.prev {
    left: -20px;
}

.reviews-nav-arrow.next {
    right: -20px;
}

.reviews-nav-arrow.swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Platform Links */
.reviews-platform-links {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.reviews-platform-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #007bff;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.reviews-platform-link:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.reviews-platform-link img {
    height: 18px;
    width: auto;
    filter: brightness(0) invert(1);
}

.reviews-platform-link.tripadvisor {
    background: #00af87;
}

.reviews-platform-link.tripadvisor:hover {
    background: #008c6d;
}

.reviews-platform-link.google {
    background: #4285f4;
}

.reviews-platform-link.google:hover {
    background: #3367d6;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .reviews-carousel .swiper-slide {
        width: 50%;
    }
    
    .reviews-nav-arrow.prev {
        left: 0;
    }
    
    .reviews-nav-arrow.next {
        right: 0;
    }
}

@media (max-width: 768px) {
    .reviews-widget-container {
        padding: 20px 12px 24px;
    }

    .reviews-overall-rating {
        margin-bottom: 18px;
    }

    .reviews-carousel {
        margin-bottom: 20px;
    }

    .reviews-carousel .swiper-container {
        padding: 4px 0;
    }
    
    .reviews-carousel .swiper-slide {
        width: 100%;
        height: auto;
    }
    
    .reviews-rating-score {
        gap: 6px;
        margin-bottom: 12px;
    }

    .reviews-rating-score .rating-number {
        font-size: 32px;
    }

    .reviews-rating-breakdown {
        gap: 16px;
    }
    
    .reviews-filter-tabs {
        gap: 8px;
        margin-bottom: 16px;
    }
    
    .reviews-filter-tab {
        padding: 7px 14px;
        font-size: 12px;
    }
    
    .review-card {
        --review-expanded-max-h: min(220px, 48vh);
        padding: 16px 16px 14px;
        height: auto;
    }

    .review-card-header {
        gap: 10px;
        margin-bottom: 10px;
        padding-right: 24px;
    }

    .review-card-avatar {
        width: 40px;
        height: 40px;
    }

    .review-card-name {
        font-size: 15px;
    }

    .review-card-rating {
        margin-bottom: 10px;
    }

    .review-star {
        width: 15px;
        height: 15px;
    }

    .review-card-content {
        flex: 0 0 auto;
        margin-bottom: 6px;
        font-size: 13px;
        line-height: 1.55;
    }

    .review-card-content__inner {
        -webkit-line-clamp: 4;
    }

    .review-card-footer {
        padding-top: 8px;
        margin-top: 0;
    }
    
    .reviews-nav-arrow {
        width: 32px;
        height: 32px;
        top: 42%;
    }
    
    .reviews-nav-arrow.prev {
        left: 2px;
    }
    
    .reviews-nav-arrow.next {
        right: 2px;
    }
    
    .reviews-platform-links {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .reviews-platform-link {
        justify-content: center;
        padding: 11px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .reviews-widget-container {
        padding-inline: 10px;
    }

    .review-card-content__inner {
        -webkit-line-clamp: 3;
    }

    .reviews-rating-score .rating-number {
        font-size: 28px;
    }

    .platform-logo {
        height: 20px;
    }
}
