/* ===================================================
   waittime.css — 即時候診人數查詢頁
   使用頁面：waittime.html
=================================================== */

/* 步驟進度條 */
.wt_steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.wt_step {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    background: #e8f0fb;
    color: #6b8bb5;
    border: 1.5px solid #c8d8f0;
    letter-spacing: 0.2px;
}

.wt_step.active {
    background: #0a74da;
    color: #fff;
    border-color: #0a74da;
}

.wt_step.done {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
    cursor: pointer;
}

.wt_step.done:hover {
    background: #059669;
    border-color: #059669;
}

.wt_arrow {
    color: #b0c4de;
    font-size: 0.85rem;
}

/* 醫院卡片（選擇醫院步驟） */
.hospital_pick_list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.hospital_pick_card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #fff;
    border: 1.5px solid #c8d8f0;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 1px 4px rgba(10, 116, 218, 0.06);
}

.hospital_pick_card:hover {
    background: #f0f7ff;
    border-color: #0a74da;
    transform: translateX(4px);
    box-shadow: 0 3px 10px rgba(10, 116, 218, 0.15);
}

.hospital_pick_card .hp_name {
    font-weight: 700;
    font-size: 0.97rem;
    color: var(--text-primary);
}

.hospital_pick_card .hp_meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 3px;
}

.hospital_pick_card .hp_tag {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    background: #e8f4fd;
    color: #0a74da;
    white-space: nowrap;
    flex-shrink: 0;
}

.hospital_pick_card .hp_tag.supported {
    background: #d1fae5;
    color: #065f46;
}

/* 候診看板 */
.waittime_board {
    background: #f0f7ff;
    border: 1.5px solid #c8d8f0;
    border-radius: var(--radius-md);
    padding: 20px;
    margin-top: 8px;
}

.waittime_board_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.waittime_board_header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.wt_fetch_time {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.wt_refresh_btn {
    padding: 6px 14px;
    background: #0a74da;
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.wt_refresh_btn:hover {
    background: #085fad;
}

.wt_refresh_btn:disabled {
    background: #b0c4de;
    cursor: not-allowed;
}

/* 不支援提示 */
.wt_unsupported {
    text-align: center;
    padding: 32px 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.wt_unsupported .wt_icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 10px;
}

/* 科別候診格子 */
.wt_dept_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.wt_dept_cell {
    background: #fff;
    border: 1.5px solid #dce7f7;
    border-radius: var(--radius-sm);
    padding: 12px 10px;
    text-align: center;
    position: relative;
}

.wt_dept_cell .wt_dept_name {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.3;
}

.wt_dept_cell .wt_count {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.wt_dept_cell .wt_unit {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 3px;
}

/* 候診數顏色 */
.wt_count.low    { color: #10b981; }   /* 0–10  人 綠 */
.wt_count.mid    { color: #f59e0b; }   /* 11–25 人 橘 */
.wt_count.high   { color: #ef4444; }   /* 26+   人 紅 */
.wt_count.na     { color: #c0ccd8; font-size: 1.2rem; }

/* 載入動畫 */
.wt_loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.wt_spinner {
    display: inline-block;
    width: 36px;
    height: 36px;
    border: 4px solid #e0eaf7;
    border-top-color: #0a74da;
    border-radius: 50%;
    animation: wt_spin 0.8s linear infinite;
    margin-bottom: 12px;
}

@keyframes wt_spin {
    to { transform: rotate(360deg); }
}

/* 空結果提示 */
.wt_empty {
    text-align: center;
    padding: 28px 16px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    background: #fff;
    border: 1px dashed #c8d8f0;
    border-radius: var(--radius-md);
    margin-top: 8px;
}

/* RWD */
@media (max-width: 600px) {
    .wt_dept_grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 8px;
    }
    .wt_dept_cell .wt_count { font-size: 1.5rem; }
    .hospital_pick_card { padding: 12px 14px; }
}
