/* =========================================================
   看牙大小事｜診所資訊頁 /dentist/{id}/ 專用（template-clinic-info.php）
   class 一律 gdc- 開頭。色系沿用 primary.css 的 --blue-main 一組。

   ⚠️ 這頁同時會載入 primary.css 與 feedback.css，兩個有全站規則：
      feedback.css  * { margin:0; padding:0 }
      primary.css   a,h1,h2,h3,h4,ul { font-size:1rem; … }、body { font-size:.75em }
      所以這裡每個元素的字級、間距都明確寫出來，不靠瀏覽器預設。
   ========================================================= */

.gdc-page {
    --gdc-main: #3e6892;
    --gdc-dark: #3c5268;
    --gdc-mid: #809cbd;
    --gdc-soft: #f4f7f9;
    --gdc-tag: #e2e8f0;
    --gdc-text: #434953;
    --gdc-light: #7d8897;
    --gdc-line: #e6ecf2;
    --gdc-shadow: 0 10px 25px rgba(106, 140, 175, .16);

    display: block;
    font-family: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
    font-size: 15px;
    line-height: 1.8;
    color: var(--gdc-text);
    background: #fcfdfe;
    padding-bottom: 64px;
}

.gdc-page *,
.gdc-page *::before,
.gdc-page *::after {
    box-sizing: border-box;
}

/* 連結跟著外層字級（權重跟 primary.css 一樣低，不會壓過 .gdc-btn 自己的設定） */
:where(.gdc-page) a {
    font-size: inherit;
    font-family: inherit;
    text-decoration: none;
}

.gdc-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- 名稱區（整條淺色漸層，跟首頁搜尋區同一個調子） ---------- */
.gdc-hero {
    background: linear-gradient(180deg, #edf2f7 0%, #f8fafc 100%);
    border-bottom: 1px solid var(--gdc-line);
    padding: 36px 0 40px;
}

.gdc-crumb {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    font-size: 13px;
    color: var(--gdc-light);
    margin-bottom: 18px;
}

.gdc-crumb a {
    color: var(--gdc-light);
}

.gdc-crumb a:hover {
    color: var(--gdc-main);
}

.gdc-crumb span[aria-hidden] {
    color: #b8c4d1;
}

.gdc-page .gdc-title {
    margin: 0 0 14px;
    font-size: 32px;
    line-height: 1.35;
    font-weight: 700;
    color: var(--gdc-dark);
    letter-spacing: .03em;
}

.gdc-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.gdc-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    padding: 4px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--gdc-tag);
    font-size: 14px;
    color: var(--gdc-dark);
}

.gdc-chip small {
    font-size: 12px;
    color: var(--gdc-light);
}

.gdc-chip--star {
    color: #c98a00;
    font-weight: 700;
}

.gdc-chip--star small {
    font-weight: 400;
}

.gdc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.gdc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: 999px;
    border: 1px solid var(--gdc-main);
    background: #fff;
    color: var(--gdc-main);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    transition: background .2s, color .2s, box-shadow .2s;
}

.gdc-btn:hover {
    background: var(--gdc-soft);
}

.gdc-btn--solid {
    background: var(--gdc-main);
    color: #fff;
    box-shadow: 0 6px 14px rgba(62, 104, 146, .25);
}

.gdc-btn--solid:hover {
    background: var(--gdc-dark);
    color: #fff;
}

.gdc-btn svg {
    width: 18px;
    height: 18px;
    flex: none;
}

/* ---------- 主體 ---------- */
.gdc-body {
    display: grid;
    gap: 24px;
    margin-top: 32px;
}

.gdc-card {
    background: #fff;
    border-radius: 24px;
    box-shadow: var(--gdc-shadow);
    padding: 28px 32px;
}

/* 區塊標題：左邊一條藍線，跟首頁「進階篩選」同一種 */
.gdc-page .gdc-h2 {
    margin: 0 0 20px;
    padding-left: 12px;
    border-left: 4px solid var(--gdc-main);
    font-size: 19px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--gdc-dark);
}

/* ---------- 門診基本資訊：圖示卡片 ---------- */
.gdc-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.gdc-tile {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    border-radius: 16px;
    background: var(--gdc-soft);
}

.gdc-ico {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    color: var(--gdc-main);
    box-shadow: 0 2px 6px rgba(106, 140, 175, .18);
}

.gdc-ico svg {
    width: 20px;
    height: 20px;
}

.gdc-tile-label {
    display: block;
    font-size: 13px;
    color: var(--gdc-light);
    line-height: 1.5;
}

.gdc-tile-value {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--gdc-dark);
    line-height: 1.6;
    word-break: break-word;
}

a.gdc-tile-value {
    color: var(--gdc-main);
}

a.gdc-tile-value:hover {
    text-decoration: underline;
}

.gdc-tile-value small {
    font-size: 13px;
    font-weight: 400;
    color: var(--gdc-light);
    margin-left: 6px;
}

.gdc-muted {
    color: #9aa6b4 !important;
    font-weight: 400 !important;
}

/* ---------- 門診時間：星期直列 ---------- */
.gdc-hours {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 15px;
}

.gdc-hours th,
.gdc-hours td {
    padding: 13px 10px;
    border-bottom: 1px solid var(--gdc-line);
    text-align: center;
    vertical-align: middle;
}

.gdc-hours thead th {
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gdc-light);
    letter-spacing: .1em;
    white-space: nowrap;
    border-bottom: 2px solid var(--gdc-tag);
}

/* 「星期」表頭跟底下的週一、週二對齊 */
.gdc-hours thead th:first-child {
    text-align: left;
    padding-left: 16px;
}

.gdc-hours tbody th {
    width: 84px;
    text-align: left;
    padding-left: 16px;
    font-weight: 700;
    color: var(--gdc-dark);
    white-space: nowrap;
}

.gdc-hours tbody tr:last-child th,
.gdc-hours tbody tr:last-child td {
    border-bottom: 0;
}

.gdc-hours tbody tr.is-weekend th,
.gdc-hours tbody tr.is-weekend td {
    background: #f8fafc;
}

.gdc-hours tbody tr:hover th,
.gdc-hours tbody tr:hover td {
    background: var(--gdc-soft);
}

.gdc-hours .gdc-col-times {
    width: 38%;
    text-align: left;
}

.gdc-times {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    font-size: 14px;
    color: var(--gdc-text);
    font-variant-numeric: tabular-nums;
}

/* 手機才顯示：時間放在星期底下 */
.gdc-times--inline {
    display: none;
}

/* 有看診：藍色膠囊 */
.gdc-on {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--gdc-mid), var(--gdc-main));
    vertical-align: middle;
}

/* 休診：空心小圓 */
.gdc-off {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #cdd6e0;
    vertical-align: middle;
}

.gdc-legend {
    display: flex;
    gap: 20px;
    margin-top: 16px;
    font-size: 13px;
    color: var(--gdc-light);
}

.gdc-legend span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.gdc-legend .gdc-on {
    width: 10px;
    height: 10px;
}

.gdc-legend .gdc-off {
    width: 10px;
    height: 10px;
}

.gdc-note {
    margin: 14px 0 0;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--gdc-soft);
    font-size: 13px;
    color: var(--gdc-light);
    line-height: 1.7;
}

.gdc-empty {
    margin: 0;
    padding: 20px;
    border-radius: 14px;
    background: var(--gdc-soft);
    color: var(--gdc-light);
    font-size: 15px;
}

/* ---------- 官方網站、社群連結：並排 ---------- */
.gdc-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.gdc-site {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 16px;
    background: var(--gdc-soft);
    font-size: 15px;
    color: var(--gdc-dark);
    word-break: break-all;
}

a.gdc-site:hover {
    background: var(--gdc-tag);
}

.gdc-page .gdc-sns {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.gdc-sns a,
.gdc-sns span.is-pending {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px 8px 8px;
    border-radius: 999px;
    background: var(--gdc-soft);
    font-size: 15px;
    color: var(--gdc-dark);
}

.gdc-sns a:hover {
    background: var(--gdc-tag);
}

.gdc-sns-ico {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
}

.gdc-sns-ico.is-facebook { background: #1877f2; font-size: 19px; }
.gdc-sns-ico.is-instagram { background: linear-gradient(45deg, #f9a825, #e1306c 55%, #833ab4); }

/* 還沒有資料：整塊變淡 */
.gdc-page .is-pending {
    color: #9aa6b4;
}

.gdc-page .is-pending .gdc-ico {
    color: #b8c4d1;
    box-shadow: none;
}

.gdc-page .is-pending .gdc-sns-ico {
    background: #cdd6e0;
}

/* ---------- 頁尾說明 ---------- */
.gdc-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--gdc-light);
}

.gdc-foot a {
    color: var(--gdc-main);
    font-weight: 600;
}

/* ---------- 找不到診所 ---------- */
.gdc-missing {
    max-width: 520px;
    margin: 80px auto 0;
    padding: 40px 32px;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--gdc-shadow);
    text-align: center;
}

.gdc-page .gdc-missing h1 {
    margin: 0 0 10px;
    font-size: 24px;
    color: var(--gdc-dark);
}

.gdc-missing p {
    margin: 0 0 24px;
    color: var(--gdc-light);
}

.gdc-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- 平板／手機 ---------- */
@media (max-width: 820px) {
    .gdc-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .gdc-hero {
        padding: 24px 0 28px;
    }

    .gdc-page .gdc-title {
        font-size: 25px;
    }

    .gdc-actions .gdc-btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .gdc-wrap {
        padding: 0 14px;
    }

    .gdc-card {
        padding: 22px 16px;
        border-radius: 20px;
    }

    /* 手機：拿掉右邊「看診時間」欄，時間改放在星期底下 */
    .gdc-hours .gdc-col-times {
        display: none;
    }

    .gdc-times--inline {
        display: flex;
        margin-top: 4px;
        font-size: 12px;
        font-weight: 400;
        gap: 0 8px;
        white-space: normal;
    }

    .gdc-hours tbody th {
        width: auto;
        padding-left: 8px;
    }

    .gdc-hours th,
    .gdc-hours td {
        padding: 12px 4px;
    }

    /* 上午／下午／晚上三欄固定寬度，表頭不會被擠成直排 */
    .gdc-hours thead th:not(:first-child),
    .gdc-hours td {
        width: 50px;
        letter-spacing: 0;
    }

    .gdc-hours thead th:first-child {
        padding-left: 8px;
    }

    .gdc-on {
        width: 10px;
        height: 10px;
    }
}

/* ---------- 2026-11-24 健保署同步：停止特約提示、資料更新日期 ---------- */
.gdc-page .gdc-ended {
    margin: 0 0 16px;
    padding: 12px 16px;
    border: 1px solid #f0d9a8;
    border-left: 4px solid #d9a23d;
    border-radius: 8px;
    background: #fff9ec;
    color: #6b5427;
    font-size: 15px;
    line-height: 1.7;
}
.gdc-page .gdc-note.gdc-updated {
    margin-top: 6px;
    color: var(--gdc-light);
    font-size: 13px;
}
