/**
 * Review Components CSS
 * Styling for review integration system
 * Matches existing gold/black theme
 */

/* Prevent scrollbar issues */
html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Review Section Base Styles */
.reviews-section {
    margin: 40px auto 200px auto !important;
    padding: 30px 20px 100px 20px !important;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    border-radius: 15px;
    position: relative;
    overflow: visible !important;
    z-index: 1;
    max-width: 1300px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    /* Override WordPress layout constraints */
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Force override WordPress layout constraints */
.is-layout-constrained > .reviews-section,
:where(.is-layout-constrained) > .reviews-section {
    max-width: 1300px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.reviews-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #FFEB3B, #FFEB3B, #FFEB3B); /* Gold gradient */
}

/* Review Header */
.reviews-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 20px;
}

.reviews-header h2 {
    color: #FFEB3B; /* Gold accent */
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.rating-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.stars {
    font-size: 2rem;
    color: #FFEB3B; /* Gold for stars */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.rating-text {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Review Container */
.reviews-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    padding: 0;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Review Card */
.review-card {
    background: rgba(255, 235, 59, 0.05); /* Gold tint */
    border: 1px solid rgba(255, 235, 59, 0.3); /* Gold border */
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    backdrop-filter: blur(10px);
    /* Prevent overflow */
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
    overflow: hidden;
}

.review-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 235, 59, 0.6); /* Brighter gold on hover */
    box-shadow: 0 10px 30px rgba(255, 235, 59, 0.3); /* Gold shadow */
}

.review-card.yelp {
    border-left: 4px solid #FF1A1A;
}

.review-card.zocdoc {
    border-left: 4px solid #00A0DC;
}

.review-card.website {
    border-left: 4px solid #FFEB3B;
}

.review-card.google {
    border-left: 4px solid #FFEB3B;
}

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

.review-platform {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #FFEB3B; /* Gold accent */
}

.platform-icon {
    font-size: 1.1rem;
}

.platform-name {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.review-rating {
    font-size: 1.2rem;
    color: #FFEB3B; /* Gold for ratings */
}

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

.review-text {
    color: #ffffff;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    font-style: italic;
}

/* Review Footer */
.review-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 235, 59, 0.2); /* Gold border */
}

.reviewer-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.reviewer-name {
    color: #FFEB3B; /* Gold accent */
    font-weight: 600;
    font-size: 0.95rem;
}

.reviewer-location {
    color: #cccccc;
    font-size: 0.85rem;
}

.review-date {
    color: #aaaaaa;
    font-size: 0.85rem;
}

/* Review Categories */
/* Categories removed - no category display */

/* Fade Slider */
.reviews-slider-main {
    position: relative;
    margin: 30px auto !important;
    max-width: 1200px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    /* Override WordPress constraints */
    margin-left: auto !important;
    margin-right: auto !important;
}

.slider-container {
    position: relative;
    width: 100% !important;
    min-height: 400px;
    margin: 0 auto !important;
    margin-bottom: 40px !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
    overflow: visible !important; /* Changed from hidden to visible to prevent card cutoff */
}

/* Fade Slides */
.reviews-fade-slide {
    position: relative; /* Changed from absolute to relative to prevent card cutoff */
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    pointer-events: none;
    min-height: 0; /* Allow natural height */
}

.reviews-fade-slide.active {
    opacity: 1;
    pointer-events: auto;
    position: relative; /* Ensure active slide flows properly */
}

/* Reviews Grid */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Fixed 3 columns for desktop */
    gap: 20px;
    padding: 20px !important;
    margin: 0 auto !important;
    margin-bottom: 20px !important;
    max-width: 1200px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    /* Prevent grid items from overflowing */
    min-width: 0;
    overflow: visible !important; /* Allow content to be fully visible */
}

.reviews-grid > * {
    min-width: 0;
    max-width: 100%;
}

.reviews-grid .review-card {
    flex: none;
    margin: 0 !important;
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    height: auto;
    min-height: 180px;
    box-sizing: border-box !important;
    overflow: visible !important;
}

.reviews-grid .review-card.empty {
    background: transparent;
    border: none;
    visibility: hidden;
}

/* Pagination */
.reviews-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0; /* Reduced from 30px 0 */
    padding: 20px;
}

.pagination-btn {
    background: rgba(255, 235, 59, 0.1); /* Gold background */
    border: 1px solid #FFEB3B; /* Gold border */
    color: #FFEB3B; /* Gold text */
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.pagination-btn:hover {
    background: rgba(255, 235, 59, 0.2); /* Brighter gold on hover */
    transform: translateY(-1px);
}

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

.pagination-info {
    color: #FFEB3B; /* Gold text */
    font-size: 0.9rem;
    margin: 0 15px;
}

/* Responsive Grid */
@media (max-width: 1200px) {
    .reviews-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for tablet */
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .reviews-grid {
        grid-template-columns: 1fr;
        padding: 15px;
    }
    .reviews-section {
        padding: 20px 15px 60px 15px !important;
        margin: 30px auto 100px auto !important;
    }
}

/* Category slide indicators removed - no categories */

/* View All Reviews Button */
.view-all-reviews {
    text-align: center;
    margin: 30px 0;
}

.view-all-btn {
    background: rgba(255, 235, 59, 0.1); /* Gold background */
    border: 2px solid #FFEB3B; /* Gold border */
    color: #FFEB3B; /* Gold text */
    padding: 15px 30px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 600;
}

.view-all-btn:hover {
    background: rgba(255, 235, 59, 0.2); /* Brighter gold on hover */
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 235, 59, 0.4); /* Gold shadow */
}

/* All Reviews Container */
.all-reviews-container {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid rgba(255, 235, 59, 0.3); /* Gold border */
}

.slider-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.slider-btn {
    background: rgba(255, 235, 59, 0.1); /* Gold background */
    border: 2px solid #FFEB3B; /* Gold border */
    color: #FFEB3B; /* Gold text */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.slider-btn:hover {
    background: rgba(255, 235, 59, 0.2); /* Brighter gold on hover */
    transform: scale(1.1);
}

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

.slider-dots {
    display: flex;
    gap: 10px;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 235, 59, 0.3); /* Gold background */
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: #FFEB3B; /* Gold active */
    transform: scale(1.2);
}

/* Filter Controls removed - no categories */
/* .review-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

/* .filter-btn {
    ... removed - no categories
} */

/* Search Box */
.review-search {
    background: rgba(255, 235, 59, 0.05); /* Gold tint */
    border: 1px solid rgba(255, 235, 59, 0.3); /* Gold border */
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 25px;
    width: 300px;
    max-width: 100%;
    font-size: 1rem;
    margin: 20px auto;
    display: block;
}

.review-search::placeholder {
    color: #aaaaaa;
}

.review-search:focus {
    outline: none;
    border-color: #FFEB3B; /* Gold border on focus */
    box-shadow: 0 0 10px rgba(255, 235, 59, 0.4); /* Gold glow */
}

/* No Reviews Message */
.no-reviews {
    text-align: center;
    color: #aaaaaa;
    font-style: italic;
    padding: 40px 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .reviews-header h2 {
        font-size: 2rem;
    }
    
    .reviews-container {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }
    
    .review-card {
        padding: 20px;
    }
    
    .slider-container .review-card {
        flex: 0 0 calc(100% - 20px);
        margin-right: 20px;
        min-width: 280px;
    }
    
    /* .review-filters removed - no categories */
    /* .filter-btn removed - no categories */
    
    .review-search {
        width: calc(100% - 30px);
        margin: 15px;
    }
    
    .rating-summary {
        flex-direction: column;
        gap: 10px;
    }
    
    .view-all-btn {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .reviews-section {
        margin: 20px 0 150px 0 !important; /* Maintain bottom margin on mobile */
        padding: 20px 0 80px 0 !important; /* Maintain bottom padding on mobile */
    }
    
    .reviews-header h2 {
        font-size: 1.8rem;
    }
    
    .review-card {
        padding: 15px;
    }
    
    .review-text {
        font-size: 0.95rem;
    }
    
    .slider-container .review-card {
        min-width: 250px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

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

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

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

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

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

/* Loading States */
.reviews-loading {
    text-align: center;
    padding: 40px;
    color: #FFEB3B; /* Gold text */
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 235, 59, 0.3); /* Gold border */
    border-top: 4px solid #FFEB3B; /* Gold top */
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Review Modal Styles */
.review-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85); /* Black overlay */
    backdrop-filter: blur(5px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.review-modal.active {
    display: flex;
}

.review-modal-content {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%); /* Black gradient */
    border: 2px solid rgba(255, 235, 59, 0.4); /* Gold border */
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.review-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 235, 59, 0.2); /* Gold border */
}

.review-modal-title {
    color: #FFEB3B;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.review-modal-close {
    background: rgba(255, 235, 59, 0.2); /* Gold background */
    border: 1px solid rgba(255, 235, 59, 0.4); /* Gold border */
    color: #ffffff; /* White text */
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.review-modal-close:hover {
    background: rgba(255, 235, 59, 0.3); /* Gold hover */
    transform: scale(1.1);
}

.review-modal-text {
    color: #ffffff;
    font-size: 1.1rem;
    line-height: 1.7;
    font-style: italic;
    margin: 0 0 20px 0;
}

.review-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 235, 59, 0.2); /* Gold border */
}

.review-modal-platform {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #FFEB3B;
    font-size: 0.9rem;
    font-weight: 600;
}

.review-modal-rating {
    color: #FFEB3B;
    font-size: 1.2rem;
}

/* Read More Button */
.read-more-btn {
    background: rgba(255, 235, 59, 0.1);
    border: 1px solid rgba(255, 235, 59, 0.3);
    color: #FFEB3B;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 8px;
    display: inline-block;
}

.read-more-btn:hover {
    background: rgba(255, 235, 59, 0.2);
    transform: translateY(-1px);
}
