/**
 * Top Rated Doctors Plugin Styles
 * Uses MyListing theme global styles for consistency
 */

.top-rated-doctors-container {
    max-width: 500px;
    margin: 0 auto;
    font-family: inherit;
}

.top-rated-doctors-container.top-rated-doctors-fluid {
    display: block;
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
}

.doctor-card {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    margin-bottom: 12px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
}

.doctor-card:last-child {
    margin-bottom: 0;
}


/* Link styling */
.doctor-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.2s ease;
    cursor: pointer;
}

.top-rated-doctors-container.top-rated-doctors-fluid .doctor-card-link {
    display: block;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
}

.top-rated-doctors-container.top-rated-doctors-fluid .doctor-card {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
}

.doctor-card-link:hover,
.doctor-card-link:focus {
    text-decoration: none;
    color: inherit;
    outline: none;
}

.doctor-card-link:hover .doctor-card {
    background-color: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

/* Rank Number */
.doctor-rank {
    flex-shrink: 0;
    margin-right: 16px;
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--accent, #007bff);
    color: #ffffff;
    font-weight: 700;
    font-size: 18px;
    border-radius: 50%;
    line-height: 1;
}

/* Doctor Information */
.doctor-info {
    flex: 1;
    min-width: 0;
}

.doctor-name {
    font-size: 16px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 4px;
    line-height: 1.3;
    word-wrap: break-word;
}

.verified-doctors-container .doctor-name {
    display: flex;
    align-items: center;
    gap: 6px;
}

.verified-doctor-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: var(--accent, #2f5bff);
    color: #ffffff;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
}

.doctor-specialty {
    font-size: 14px;
    color: #666666;
    line-height: 1.2;
}

/* Rating Section */
.doctor-rating {
    flex-shrink: 0;
    text-align: right;
    margin-left: 16px;
}

.stars-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 4px;
    gap: 2px;
}

.star-icon {
    font-size: 16px;
    line-height: 1;
    font-style: normal;
}

.star-full {
    color: #ffc107;
}

.star-half {
    color: #ffc107;
    opacity: 0.6;
}

.star-empty {
    color: #e4e5e9;
}

.rating-number {
    font-size: 16px;
    font-weight: 600;
    color: #333333;
    margin-left: 8px;
}

.reviews-count {
    font-size: 12px;
    color: #8c98a4;
    line-height: 1.2;
}

/* No doctors found message */
.no-doctors-found {
    text-align: center;
    padding: 40px 20px;
    color: #666666;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

/* Responsive Design */
@media (max-width: 480px) {
    .doctor-card {
        padding: 14px 16px;
    }
    
    .doctor-rank {
        margin-right: 12px;
    }
    
    .rank-number {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .doctor-name {
        font-size: 15px;
    }
    
    .doctor-specialty {
        font-size: 13px;
    }
    
    .doctor-rating {
        margin-left: 12px;
    }
    
    .star-icon {
        font-size: 14px;
    }
    
    .rating-number {
        font-size: 15px;
    }
    
    .reviews-count {
        font-size: 11px;
    }
}

@media (max-width: 360px) {
    .top-rated-doctors-container {
        margin: 0 -10px;
    }
    
    .doctor-card {
        padding: 12px 14px;
        border-radius: 8px;
        margin-bottom: 8px;
    }
}

/* Animation for loading */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.doctor-card {
    animation: fadeInUp 0.3s ease forwards;
}

.doctor-card:nth-child(1) { animation-delay: 0.1s; }
.doctor-card:nth-child(2) { animation-delay: 0.2s; }
.doctor-card:nth-child(3) { animation-delay: 0.3s; }
.doctor-card:nth-child(4) { animation-delay: 0.4s; }
.doctor-card:nth-child(5) { animation-delay: 0.5s; }
.doctor-card:nth-child(6) { animation-delay: 0.6s; }
.doctor-card:nth-child(7) { animation-delay: 0.7s; }
.doctor-card:nth-child(8) { animation-delay: 0.8s; }
.doctor-card:nth-child(9) { animation-delay: 0.9s; }
.doctor-card:nth-child(10) { animation-delay: 1.0s; }


/* ========================================
   RECENT DOCTOR REVIEWS SLIDER STYLES
   ======================================== */

.recent-doctor-reviews-container {
    max-width: 600px;
    margin: 0 auto;
    font-family: inherit;
    position: relative;
}

.recent-doctor-reviews-container .swiper {
    position: relative;
    /* Horizontal padding keeps card borders inside Swiper's overflow:hidden viewport */
    padding: 10px 4px 40px 4px;
}

.recent-doctor-reviews-container .swiper-slide {
    height: auto;
    display: flex;
    align-items: stretch;
    box-sizing: border-box;
}

/* Review Card Styles */
.review-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s ease;
    cursor: pointer;
}

.review-card-link:hover,
.review-card-link:focus {
    text-decoration: none;
    color: inherit;
    outline: none;
}

.review-card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 12px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    height: 100%;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.review-card-link:hover .review-card {
    background-color: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-1px);
    border-color: var(--accent, #007bff);
}

/* Review Card Top Section */
.review-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 8px;
    flex-shrink: 0;
    gap: 8px;
}

.doctor-profile-section {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex: 1;
}

.doctor-profile-image {
    flex-shrink: 0;
}

.doctor-profile-image img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e5e5e5;
    transition: border-color 0.2s ease;
}

.review-card-link:hover .doctor-profile-image img {
    border-color: var(--accent, #007bff);
}

.doctor-reviewer-info {
    flex: 1;
    min-width: 0;
}

.doctor-reviewer-info h5.doctor-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent, #007bff);
    margin: 0 0 2px 0;
    line-height: 1.2;
    word-wrap: break-word;
}

.doctor-reviewer-info .reviewer-name {
    font-size: 16px;
    color: #666666;
    font-weight: 400;
    display: block;
    line-height: 1.1;
}

.review-rating {
    flex-shrink: 0;
}

.review-rating .stars-container {
    justify-content: flex-end;
    margin-bottom: 0;
    gap: 2px;
}

/* Review Text Box - Compact Version */
.review-text-box {
    flex: 1;
    margin-bottom: 6px;
}

.review-text-box .review-text {
    font-size: 12px;
    line-height: 1.4;
    color: #333333;
    margin: 0;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 0;
}

/* Review Date at Bottom */
.review-date-bottom {
    flex-shrink: 0;
    text-align: left;
}

.review-date-bottom .review-date {
    font-size: 10px;
    color: #999999;
    font-weight: 400;
}

/* Navigation removed - using pagination only */

/* Swiper Pagination Styles */
.recent-doctor-reviews-container .swiper-pagination {
    bottom: 15px;
}

.recent-doctor-reviews-container .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #cccccc;
    opacity: 1;
    transition: all 0.2s ease;
    margin: 0 4px;
}

.recent-doctor-reviews-container .swiper-pagination-bullet-active {
    background: var(--accent, #007bff);
    transform: scale(1.2);
}

/* No Content Message */
.recent-reviews-no-content {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
}

.recent-reviews-no-content p {
    color: #666666;
    font-size: 16px;
    margin: 0;
    font-style: italic;
}

/* Responsive Design for Review Slider - Compact */
@media (max-width: 768px) {
    .recent-doctor-reviews-container {
        margin: 0 -10px;
    }
    
    .review-card {
        padding: 10px;
        min-height: 130px;
        border-radius: 6px;
    }
    
    .review-card-top {
        margin-bottom: 6px;
        gap: 6px;
    }
    
    .doctor-profile-section {
        gap: 6px;
    }
    
    .doctor-profile-image img {
        width: 28px;
        height: 28px;
    }
    
    .doctor-reviewer-info h5.doctor-name {
        font-size: 15px;
    }
    
    .doctor-reviewer-info .reviewer-name {
        font-size: 14px;
    }
    
    .review-text-box {
        margin-bottom: 4px;
    }
    
    .review-text-box .review-text {
        font-size: 11px;
        line-height: 1.3;
    }
    
    .review-date-bottom .review-date {
        font-size: 9px;
    }
    
}

@media (max-width: 480px) {
    .review-card {
        padding: 8px;
        min-height: 120px;
        border-radius: 6px;
    }
    
    .review-card-top {
        gap: 5px;
        margin-bottom: 5px;
    }
    
    .doctor-profile-section {
        gap: 5px;
    }
    
    .doctor-profile-image img {
        width: 26px;
        height: 26px;
    }
    
    .doctor-reviewer-info h5.doctor-name {
        font-size: 14px;
    }
    
    .doctor-reviewer-info .reviewer-name {
        font-size: 12px;
    }
    
    .review-text-box .review-text {
        font-size: 10px;
        line-height: 1.3;
    }
    
    .review-date-bottom .review-date {
        font-size: 8px;
    }
    
    
    .recent-reviews-no-content {
        padding: 40px 16px;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    .review-card,
    .review-card-link:hover .review-card,
    .recent-doctor-reviews-container .swiper-pagination-bullet {
        transition: none;
    }
    
    .review-card-link:hover .review-card {
        transform: none;
    }
}

/* Focus states for accessibility */
.review-card-link:focus .review-card {
    outline: 2px solid var(--accent, #007bff);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.15);
}


/* ========================================
   MOST REVIEWED DOCTORS SLIDER STYLES
   ======================================== */

.most-reviewed-doctors-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: inherit;
    position: relative;
    padding: 0 80px; /* Space for external arrows */
}

.most-reviewed-doctors-container .swiper {
    position: relative;
    padding: 20px 0 60px 0; /* Space for pagination */
    overflow: hidden;
}

.most-reviewed-doctors-container .swiper-slide {
    height: auto;
    display: flex;
    align-items: stretch;
    box-sizing: border-box;
}

.most-reviewed-doctors-container .swiper-wrapper {
    align-items: stretch;
}

/* Most Reviewed Doctor Card Styles - REDESIGNED TO MATCH IMAGE */
.most-reviewed-doctor-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    transition: all 0.3s ease;
    cursor: pointer;
}

.most-reviewed-doctor-card-link:hover,
.most-reviewed-doctor-card-link:focus {
    text-decoration: none;
    color: inherit;
    outline: none;
}

.most-reviewed-doctor-card {
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: relative;
}

.most-reviewed-doctor-card-link:hover .most-reviewed-doctor-card {
    background-color: #ffffff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transform: translateY(-2px);
    border-color: var(--accent, #4285f4);
}

/* Header with Profile Pic and Rating */
.doctor-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.doctor-profile-section {
    flex-shrink: 0;
}

/* Profile Picture - Rounded Square (only when image exists) */
.doctor-profile-pic {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e8eaed;
}

.doctor-profile-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Rating Section - Top Right with Stars */
.doctor-rating-section {
    flex-shrink: 0;
}

.doctor-rating-section .stars-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 0;
    gap: 4px;
}

.doctor-rating-section .star-icon {
    font-size: 14px;
    line-height: 1;
    font-style: normal;
}

.doctor-rating-section .rating-number {
    font-size: 14px;
    font-weight: 600;
    color: #333333;
    margin-left: 6px;
}

/* Card Content */
.doctor-card-content {
    flex: 1;
    text-align: left;
    width: 100%;
}

h6.doctor-card-name {
    font-size: 16px;
    font-weight: 600;
    color: #202124;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.doctor-card-specialty {
    font-size: 14px;
    font-weight: 400;
    color: var(--accent, #4285f4);
    margin-bottom: 8px;
    line-height: 1.2;
}

.doctor-card-location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #5f6368;
    line-height: 1.2;
    margin-bottom: 12px;
}

.location-icon {
    font-size: 12px;
    opacity: 0.7;
}

/* Card Footer with Reviews Badge */
.doctor-card-footer {
    margin-top: auto;
}

.doctor-reviews-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f0f4ff;
    border: 1px solid #e0ebff;
    border-radius: 20px;
    font-size: 12px;
    color: var(--accent, #4285f4);
    font-weight: 500;
    transition: all 0.3s ease;
}

.most-reviewed-doctor-card-link:hover .doctor-reviews-badge {
    background: var(--accent, #4285f4);
    color: #ffffff;
    border-color: var(--accent, #4285f4);
}

.review-icon {
    font-size: 12px;
    opacity: 0.8;
}

.review-count {
    font-weight: 600;
    margin-left: 2px;
}

/* Swiper Navigation Styles - Outside the cards */
.most-reviewed-doctors-container .swiper-button-next,
.most-reviewed-doctors-container .swiper-button-prev {
    width: 44px;
    height: 44px;
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 50%;
    color: var(--accent, #4285f4);
    font-size: 18px;
    font-weight: bold;
    margin-top: -22px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.most-reviewed-doctors-container .swiper-button-prev {
    left: -60px;
}

.most-reviewed-doctors-container .swiper-button-next {
    right: -60px;
}

.most-reviewed-doctors-container .swiper-button-next:hover,
.most-reviewed-doctors-container .swiper-button-prev:hover {
    background: var(--accent, #4285f4);
    color: #ffffff;
    border-color: var(--accent, #4285f4);
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(66, 133, 244, 0.3);
}

.most-reviewed-doctors-container .swiper-button-next::after,
.most-reviewed-doctors-container .swiper-button-prev::after {
    font-size: 16px;
    font-weight: 600;
}

/* Swiper Pagination Styles */
.most-reviewed-doctors-container .swiper-pagination {
    bottom: 20px;
}

.most-reviewed-doctors-container .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: #dadce0;
    opacity: 1;
    transition: all 0.3s ease;
    margin: 0 4px;
}

.most-reviewed-doctors-container .swiper-pagination-bullet-active {
    background: var(--accent, #4285f4);
    transform: scale(1.2);
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.4);
}

/* No Content Message */
.most-reviewed-doctors-no-content {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
}

.most-reviewed-doctors-no-content p {
    color: #666666;
    font-size: 16px;
    margin: 0;
    font-style: italic;
}

/* Responsive Design for Most Reviewed Doctors Slider */
@media (max-width: 1024px) {
    .most-reviewed-doctors-container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .most-reviewed-doctor-card {
        padding: 14px;
    }
    
    .doctor-profile-pic {
        width: 50px;
        height: 50px;
    }
    
    .doctor-rating-section .star-icon {
        font-size: 13px;
    }
    
    .doctor-rating-section .rating-number {
        font-size: 13px;
    }
    
    h6.doctor-card-name {
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .most-reviewed-doctors-container {
        padding: 0 60px; /* Reduced padding for mobile but still space for arrows */
    }
    
    .most-reviewed-doctors-container .swiper-button-prev {
        left: -40px;
    }

    .most-reviewed-doctors-container .swiper-button-next {
        right: -40px;
    }
    
    .most-reviewed-doctor-card {
        padding: 12px;
    }
    
    .doctor-card-header {
        margin-bottom: 10px;
    }
    
    .doctor-profile-pic {
        width: 44px;
        height: 44px;
        border-radius: 10px;
    }
    
    .doctor-rating-section .star-icon {
        font-size: 12px;
    }
    
    .doctor-rating-section .rating-number {
        font-size: 12px;
    }
    
    h6.doctor-card-name {
        font-size: 14px;
        margin-bottom: 5px;
    }
    
    .doctor-card-specialty {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .doctor-card-location {
        font-size: 11px;
        margin-bottom: 10px;
    }
    
    .location-icon {
        font-size: 10px;
    }
    
    .doctor-reviews-badge {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    .review-icon {
        font-size: 10px;
    }
    
    .most-reviewed-doctors-container .swiper-button-next,
    .most-reviewed-doctors-container .swiper-button-prev {
        width: 36px;
        height: 36px;
        font-size: 14px;
        margin-top: -18px;
    }
    
    .most-reviewed-doctors-container .swiper-button-next::after,
    .most-reviewed-doctors-container .swiper-button-prev::after {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .most-reviewed-doctors-container {
        padding: 0 50px; /* Even more reduced padding for small mobile */
    }
    
    .most-reviewed-doctors-container .swiper-button-prev {
        left: -35px;
        width: 36px;
        height: 36px;
    }

    .most-reviewed-doctors-container .swiper-button-next {
        right: -35px;
        width: 36px;
        height: 36px;
    }
    
    .most-reviewed-doctor-card {
        padding: 10px;
    }
    
    .doctor-card-header {
        margin-bottom: 8px;
    }
    
    .doctor-profile-pic {
        width: 40px;
        height: 40px;
        border-radius: 8px;
    }
    
    .doctor-rating-section .star-icon {
        font-size: 11px;
    }
    
    .doctor-rating-section .rating-number {
        font-size: 11px;
    }
    
    h6.doctor-card-name {
        font-size: 13px;
        margin-bottom: 4px;
    }
    
    .doctor-card-specialty {
        font-size: 11px;
        margin-bottom: 5px;
    }
    
    .doctor-card-location {
        font-size: 10px;
        margin-bottom: 8px;
    }
    
    .location-icon {
        font-size: 9px;
    }
    
    .doctor-reviews-badge {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    .review-icon {
        font-size: 9px;
    }
    
    .most-reviewed-doctors-no-content {
        padding: 40px 15px;
    }
    
    .most-reviewed-doctors-no-content p {
        font-size: 14px;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    .most-reviewed-doctor-card,
    .most-reviewed-doctor-card-link:hover .most-reviewed-doctor-card,
    .doctor-profile-pic img,
    .doctor-reviews-badge,
    .most-reviewed-doctors-container .swiper-pagination-bullet,
    .most-reviewed-doctors-container .swiper-button-next,
    .most-reviewed-doctors-container .swiper-button-prev {
        transition: none;
    }
    
    .most-reviewed-doctor-card-link:hover .most-reviewed-doctor-card,
    .most-reviewed-doctor-card-link:hover .doctor-reviews-badge,
    .most-reviewed-doctors-container .swiper-button-next:hover,
    .most-reviewed-doctors-container .swiper-button-prev:hover {
        transform: none;
    }
}

/* Focus states for accessibility */
.most-reviewed-doctor-card-link:focus .most-reviewed-doctor-card {
    outline: 2px solid var(--accent, #4285f4);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.15);
}

