/* 診所詳情頁面統一樣式 */

/* Import Inter font for better design consistency */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

/* ========== 主要內容區域 ========== */
.header-section {
    padding: 0 32px;
    margin-bottom: 8px;
}

.main-content-area {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 0 60px 0;
    overflow-x: hidden;
    box-sizing: border-box;
}

.content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* ========== 文本和支援文本區域 ========== */
.text-and-supporting-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.text-and-supporting-text .text {
    font-family: Inter, sans-serif;
    font-weight: 600;
    font-size: 24px;
    line-height: 1.333;
    color: #181D27;
    margin: 0 0 4px 0;
}

/* ========== 評分區域 ========== */
.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;
}

/* ========== 支援文本 ========== */
.supporting-text {
    font-family: Inter, sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    color: #535862;
}

/* ========== 按鈕區域 ========== */
.actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.actions button {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border: 2px solid #D5D7DA;
    border-radius: 999px;
    background: white;
    color: #414651;
    font-family: Inter, sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.429;
    cursor: pointer;
    transition: all 0.2s;
    /* box-shadow: 0px 1px 2px 0px rgba(10, 13, 18, 0.05),
        inset 0px -2px 0px 0px rgba(10, 13, 18, 0.05),
        inset 0px 0px 0px 1px rgba(10, 13, 18, 0.18); */
}

/* 當 detail-container 開啟時，強制單欄佈局 */
body.detail-active .content-columns {
    flex-direction: column;
}

body.detail-active .info-sidebar {
    width: 100%;
    order: -1;
}

body.detail-active .clinic-intro-main-content {
    width: 100%;
}

/* 當 detail-container 開啟時，套用手機版樣式 */
body.detail-active .content {
    flex-direction: column;
    gap: 16px;
}

body.detail-active .clinic-photos-carousel {
    margin: 16px auto;
    padding: 0;
    max-width: 100%;
    border-radius: 0;
}

body.detail-active .swiper {
    height: 250px; /* 預設使用 768px 的高度 */
    border-radius: 0;
    margin: 0 auto;
    width: 100%;
}

body.detail-active .swiper-slide {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

body.detail-active .swiper-button-next,
body.detail-active .swiper-button-prev {
    display: none;
}


.actions button:hover {
    background-color: #f8f8f8;
}

.actions button i {
    color: #A4A7AE;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== 返回按鈕 (手機版) ========== */
.back-button {
    display: none;
    align-items: center;
    gap: 6px;
    color: #535862;
    text-decoration: none;
    font-family: Inter, sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.429;
    margin-top: 16px;
}

.back-button i {
    color: #A4A7AE;
    width: 20px;
    height: 20px;
}

/* ========== 診所照片輪播 ========== */
.clinic-photos-carousel {
    width: 100%;
    max-width: 1200px;
    margin: 24px auto;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

.swiper {
    width: 100%;
    max-width: 100%;
    height: 320px;
    overflow: hidden;
    position: relative;
    border-radius: 12px;
    box-sizing: border-box;
    margin: 0 auto;
}

.swiper-wrapper {
    height: 100%;
    align-items: center;
}

.swiper-slide {
    text-align: center;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    box-sizing: border-box;
    flex-shrink: 0;
    margin: 0 auto;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* ========== 未認領橫幅 ========== */
.unclaimed-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    padding: 28px 32px;
    background: #FAFAFA;
    border-radius: 16px;
    border-top: 2px solid #BE9F34;
    box-sizing: border-box;
    overflow-x: hidden;
}

.unclaimed-banner .heading-and-supporting-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.unclaimed-banner .heading {
    font-family: Inter, sans-serif;
    font-weight: 600;
    font-size: 20px;
    line-height: 1.5;
    color: #181D27;
    margin: 0;
}

.unclaimed-banner .supporting-text {
    font-family: Inter, sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.556;
    color: #535862;
    margin: 0;
}

.claim-button {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    border: 2px solid #D5D7DA;
    border-radius: 999px;
    background: white;
    color: #414651;
    font-family: Inter, sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.5;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.claim-button:hover {
    background-color: #f8f8f8;
     
}

/* ========== 選項卡導航 ========== */
.tabs-navigation {
    margin: 32px 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.horizontal-tabs {
    border-bottom: 1px solid #E9EAEB;
}

.tabs {
    display: flex;
    gap: 24px;
    justify-content: center;
}

.tab-button {
    position: relative;
    padding: 8px 8px 12px;
    background: transparent;
    border: none;
    font-family: Inter, sans-serif;
    font-weight: 600;
    font-size: 18px;
    line-height: 1.5555;
    color: #717680;
    cursor: pointer;
}

.tab-button.active {
    color: #835E25;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #835E25;;
    border-radius: 4px;
}

.swiper-pagination {
    position: absolute;
    bottom: 16px !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 10;
}

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    margin: 0 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.swiper-pagination-bullet-active {
    background: white;
    transform: scale(1.2);
}

.swiper-button-next,
.swiper-button-prev {
    color: white !important;
    background: rgba(0, 0, 0, 0.3);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    top: 50% !important;
    margin-top: -22px !important;
    transition: all 0.2s;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: scale(1.1);
}

.swiper-button-next {
    right: 20px !important;
}

.swiper-button-prev {
    left: 20px !important;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 18px;
}

/* ========== Toast 提示 ========== */
.clinic-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
    max-width: 400px;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
}

/* ========== 評價摘要樣式已移至 common-rating.css ========== */

/* ========== 麵包屑導航 ========== */
.breadcrumbs {
    width: 100%;
    padding: 0 16px;
    box-sizing: border-box;
}

/* ========== 標籤內容區域 ========== */
.tab-contents {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* ========== 側邊欄樣式 ========== */
.content-columns {
    display: flex;
    gap: 32px;
}

.clinic-intro-main-content {
    flex: 2;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.info-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
    width: 360px;
}

.clinic-info-card,
.business-hours-card {
    background: white;
    border: 1px solid #E9EAEB;
    border-radius: 12px;
    box-shadow: 0px 1px 2px 0px rgba(10, 13, 18, 0.05);
    padding: 24px;
    min-width: 0;
    line-height: 1.5;
}

.card-title {
    font-family: Inter;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.56;
    color: #181D27;
    margin: 0 0 24px 0;
}

.info-item {
    margin-bottom: 24px;
    min-width: 0;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-label {
    font-family: Inter;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.43;
    color: #535862;
    margin-bottom: 8px;
}

.info-value {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: none;
    min-width: 0;
    width: 100%;
}

.info-value i {
    width: 20px;
    height: 20px;
    color: #BE9F34;
    font-size: 16px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-value span {
    font-family: Inter;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    color: #835E25;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    min-width: 0;
    flex: 1;
    text-align: left;
}

.info-value:hover {
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

/* ========== 營業時間樣式 ========== */
.hours-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.hours-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    margin-bottom: 16px;
    border-bottom: none;
}

.hours-item:last-child {
    margin-bottom: 0;
}

.day {
    font-family: Inter;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: #535862;
    min-width:120px;
}

.time {
    font-family: Inter;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: #535862;
}

/* ========== 空狀態樣式 ========== */

.empty-state {
    text-align: center;
    padding: 48px 24px;
    background-color: #f9fafb;
    border-radius: 12px;
    border: 1px dashed #e5e7eb;
    margin: 24px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty-reviews-section {
    text-align: center;
    padding: 40px 20px;
    background-color: #f8f9fa;
    border-radius: 12px;
    /* border: 2px dashed #e5e7eb; */
}

.empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background-color: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-icon i {
    font-size: 24px;
    color: #9ca3af;
}

.empty-title {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.empty-description {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* ==========================================================================
   Responsive Layout: Standardized and Refactored
   ========================================================================== */

/* Medium screens (tablets landscape) */
@media (max-width: 1024px) {
    .content-columns {
        flex-direction: column;
    }
    .info-sidebar {
        width: 100%;
        order: -1;
    }
    .clinic-intro-main-content {
        width: 100%;
    }

    .header-section {
        padding: 0 16px;
    }
    .clinic-photos-carousel {
        margin: 16px auto;
        max-width: 100%;
    }
    .swiper {
        height: 280px;
        margin: 0 auto;
    }
    .swiper-slide {
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
    }
    .unclaimed-banner, .tabs-navigation {
    margin: 24px 0;
    width: 100%;
    box-sizing: border-box;
}
    .actions button {
        padding: 8px 12px;
        font-size: 13px;
    }
    
}

/* Small screens (tablets portrait) */
@media (max-width: 768px) {
    .content-columns {
        gap: 16px;
    }
    .info-sidebar {
        order: -1;
    }
    .clinic-intro-main-content {
        order: 2;
        max-width: 100%;
    }
    .header-section {
        padding: 0;
    }
    .main-content-area {
        margin: 0;
    }
    .content {
        flex-direction: column;
        gap: 16px;
    }
    .actions {
        width: 100%;
        justify-content: stretch;
    }
    .actions button {
        flex: 1;
        padding: 8px 10px;
        font-size: 14px;
    }
    .clinic-photos-carousel {
        margin: 16px auto;
        padding: 0;
        max-width: 100%;
        border-radius: 0;
    }
    .swiper {
        height: 250px;
        border-radius: 0;
        margin: 0 auto;
        width: 100%;
    }
    .swiper-slide {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }
    .unclaimed-banner {
        padding: 24px 16px;
        flex-direction: column;
    }
    .back-button {
        display: inline-flex;
    }
    .text-and-supporting-text .text {
        font-size: 22px;
    }
    .rating {
        margin: 4px 0;
    }
    .swiper-button-next, .swiper-button-prev {
        display: none;
    }
}

/* Extra-small screens (phones) */
@media (max-width: 576px) {
    .clinic-photos-carousel {
        margin: 12px auto;
        padding: 0;
        max-width: 100%;
    }
    body.detail-active .swiper,
    .swiper {
        height: 220px;
        margin: 0 auto;
        width: 100%;
    }
    .swiper-slide {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }
    .text-and-supporting-text .text {
        font-size: 20px;
    }
    .unclaimed-banner {
        padding: 20px 16px;
    }
    .unclaimed-banner .heading {
        font-size: 18px;
    }
    .unclaimed-banner .supporting-text {
        font-size: 16px;
    }
    .claim-button {
        padding: 12px 16px;
        font-size: 14px;
    }
}

.content,
.actions button {
    -webkit-tap-highlight-color: transparent;
}

.actions button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(184, 155, 94, 0.2);
}

.claim-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(184, 155, 94, 0.2);
} 