/* 統一評分樣式系統 - 通用樣式 */

/* 評價摘要樣式 */
.rating-summary-section,
.clinic-intro-section,
.doctor-team-section {
    border: 1px solid var(--border-color);
    background-color: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #181D27;
    margin-bottom: 16px;
    position: relative;
    padding-bottom: 0;
    font-family: 'Inter', sans-serif;
}

.section-title:after {
    display: none;
}

.rating-summary-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rating-overview {
    display: flex;
    background-color: transparent;
    border-radius: 0;
    padding: 0;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 21px;
}

.rating-breakdown {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 280px;
}

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

.rating-number-small {
    width: 12px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #414651;
    flex-shrink: 0;
    font-family: 'Inter', sans-serif;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background-color: #E9EAEB;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-fill.rating-5,
.progress-fill.rating-4,
.progress-fill.rating-3,
.progress-fill.rating-2,
.progress-fill.rating-1 {
    background: linear-gradient(90deg, #B89B5E 0%, #D2B77D 100%);
}

.overall-rating-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: fit-content;
    flex-shrink: 0;
}

.overall-rating-number {
    font-size: 48px;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -2%;
    color: #181D27;
    font-family: 'Inter', sans-serif;
}

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

.overall-rating-stars .star-icon,
.overall-rating-stars .clinic-overall-star-icon {
    color: #F5F5F5;
}

.overall-rating-stars .star-icon .filled,
.overall-rating-stars .clinic-overall-star-icon .filled {
    color: #FDB022;
}

.overall-rating-text {
    font-size: 16px;
    color: #535862;
    text-align: center;
    font-weight: 400;
    line-height: 1.5;
    font-family: 'Inter', sans-serif;
}

/* 通用星星評分樣式 */
.rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0;
}

.stars {
    display: flex;
    gap: 4px;
}

.star-icon {
    width: 20px;
    height: 20px;
}

.rating .stars .star-icon i {
    font-size: 18px;
}

.rating .stars .star-icon i.filled {
    color: #FCD34D;
}

.rating .stars .star-icon i.far {
    color: #D1D5DB;
}

.rating .text {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    color: #181D27;
    margin: 0;
}

/* 評論項目中的評分樣式 */
.rating-stars {
    display: flex;
    gap: 2px;
    margin-bottom: 8px;
}

.rating-stars .star-icon {
    font-size: 12px;
    color: #F5F5F5;
}

.rating-stars .star-icon .filled {
    color: #FDB022;
}

/* 診所評論中的評分樣式 */
.clinic-review-rating-stars {
    display: flex;
    gap: 4px;
}

.clinic-review-rating-stars .star-icon {
    width: 20px;
    height: 20px;
    font-size: 20px;
    color: #F5F5F5;
}

.clinic-review-rating-stars .star-icon.filled {
    color: #FDB022;
}

.clinic-review-rating-and-date {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

/* 評論統計樣式 */
.rating-summary {
    display: flex;
    padding: 24px;
    background-color: transparent;
    border-radius: 0;
    flex-wrap: wrap;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .rating-summary {
        padding: 20px;
        background: white;
        border: 1px solid #E9EAEB;
        border-radius: 12px;
        box-shadow: 0px 1px 2px 0px rgba(10, 13, 18, 0.05);
    }
    
    .rating-overview {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }
    
    .rating-breakdown {
        width: 100%;
        min-width: auto;
    }
    
    .overall-rating-display {
        align-self: center;
        order: -1;
    }
    
    .rating-summary-section {
        width: 100%;
        padding: 20px;
        margin-bottom: 16px;
    }
    .clinic-intro-main-content{
        width: 100% !important;
    }
}

@media (min-width: 769px) {
    .rating-overview {
        flex-direction: row;
        align-items: stretch;
    }
    
    .rating-breakdown {
        flex: 1;
    }
    
    .overall-rating-display {
        min-width: fit-content;
    }
} 

/* 當 detail-container 開啟時，強制單欄佈局 */
body.detail-active .rating-overview {
    flex-direction: column;
    order: 0; /* Reset order to allow children ordering */
}

body.detail-active .overall-rating-display {
    order: -1;
} 